@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600;700&display=swap');

:root {
    --bg-color: #020617;
    --card-bg: rgba(30, 41, 59, 0.7);
    --primary: #38bdf8;
    --secondary: #818cf8;
    --accent: #22d3ee;
    --text-main: #f1f5f9;
    --text-muted: #94a3b8;
    --nav-bg: rgba(15, 23, 42, 0.8);
    --border-color: rgba(255, 255, 255, 0.1);
    --shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.light-mode {
    --bg-color: #f1f5f9;
    --card-bg: rgba(255, 255, 255, 0.7);
    --primary: #0f172a; /* Navy Blue */
    --secondary: #1e293b;
    --accent: #334155;
    --text-main: #0f172a;
    --text-muted: #475569;
    --nav-bg: rgba(241, 245, 249, 0.85);
    --border-color: rgba(15, 23, 42, 0.1);
    --shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    background-color: var(--bg-color);
    background-image: 
        radial-gradient(at 0% 0%, rgba(56, 189, 248, 0.15) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(129, 140, 248, 0.15) 0px, transparent 50%);
    background-attachment: fixed;
    color: var(--text-main);
    overflow-x: hidden;
    transition: background-color 0.3s ease, color 0.3s ease;
}

header {
    background: transparent;
    padding: 40px 0 20px;
    text-align: center;
}

header h1 {
    margin: 0;
    font-size: 3.5rem;
    font-weight: 700;
    letter-spacing: -0.025em;
    background: linear-gradient(to right, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 10px rgba(56, 189, 248, 0.3));
}

nav {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 15px 20px;
    background: var(--nav-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid var(--border-color);
}

.nav-links {
    display: flex;
    justify-content: center;
    align-items: center;
}

nav a {
    color: var(--text-muted);
    text-decoration: none;
    margin: 0 20px; /* Increased from 15px */
    font-weight: 600; /* Increased weight */
    font-size: 1.1rem; /* Increased from 1rem */
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

nav a.nav-active {
    color: var(--primary);
}

nav a.nav-active::after {
    width: 100%;
}

.container {
    max-width: 900px;
    margin: 40px auto;
    padding: 40px;
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 24px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow);
}

/* Background Canvas */
#bg-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
    opacity: 0.3;
}

/* UI Elements */
#theme-toggle, .menu-toggle {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-main);
    padding: 12px; /* Increased from 8px */
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.4rem; /* Increased from 1.2rem */
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    margin-left: 20px; /* Increased from 15px */
}

#theme-toggle:hover {
    border-color: var(--primary);
    color: var(--primary);
    transform: rotate(15deg);
}

.menu-toggle {
    display: none;
}

#backToTop {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 45px;
    height: 45px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    transition: all 0.3s ease;
}

#backToTop:hover {
    transform: translateY(-5px);
    background: var(--secondary);
}

/* Scroll Reveal */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

section {
    margin-bottom: 60px;
}

h2 {
    font-size: 1.8rem;
    margin-bottom: 25px;
    color: var(--primary);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 15px;
}

h2::after {
    content: '';
    flex-grow: 1;
    height: 1px;
    background: linear-gradient(to right, rgba(56, 189, 248, 0.5), transparent);
}

h3 {
    color: var(--text-main);
    font-size: 1.4rem;
    margin-top: 30px;
    margin-bottom: 10px;
}

ul {
    list-style: none;
    padding-left: 0;
}

ul li {
    margin-bottom: 18px;
    position: relative;
    padding-left: 25px;
    color: var(--text-muted);
    font-size: 1.1rem;
}

ul li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--primary);
    font-weight: bold;
}

ul li strong {
    color: var(--text-main);
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.2s;
}

a:hover {
    color: var(--accent);
}

#about {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 40px;
    text-align: left;
}

#about img {
    width: 180px;
    height: 180px;
    object-fit: cover;
    border-radius: 50%;
    border: 4px solid var(--primary);
    box-shadow: 0 0 25px rgba(56, 189, 248, 0.3);
    transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

#about img:hover {
    transform: scale(1.05) rotate(3deg);
}

#lab {
    margin-top: 10px;
}

#lab a {
    display: flex;
    justify-content: center;
    gap: 20px;
    text-decoration: none;
}

#lab img {
    width: 45%;
    max-width: 400px;
    display: inline-block; /* Override global block display */
    margin: 0;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: transform 0.3s ease;
}

#lab img:hover {
    transform: scale(1.02);
}

img {
    width: 100%;
    max-width: 500px;
    display: block;
    margin: 20px auto;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

#links {
    margin: 10px 0 25px;
    padding: 8px;
    background: rgba(56, 189, 248, 0.1);
    border-radius: 12px;
    border: 1px dashed var(--primary);
    text-align: center;
    font-size: 0.95rem;
}

#links br {
    display: none;
}

#ana {
    float: right;
    width: 120px;
    margin: 0 0 20px 20px;
}

#ana img {
    width: 100%;
    margin: 0;
    border-radius: 8px;
    box-shadow: none;
}

@keyframes shake {
    0%, 100% { transform: translate(0, 0); }
    10%, 30%, 50%, 70%, 90% { transform: translate(-5px, -5px); }
    20%, 40%, 60%, 80% { transform: translate(5px, 5px); }
}

.shake {
    animation: shake 0.4s ease-in-out;
}

/* Timeline Styling */
.timeline {
    position: relative;
    border-left: 2px solid var(--border-color);
    margin-left: 15px;
    padding-left: 30px;
    margin-top: 20px;
}

.timeline-item {
    position: relative;
    margin-bottom: 40px;
    transition: all 0.3s ease;
}

.timeline-item:last-child {
    margin-bottom: 0;
}

.timeline-dot {
    position: absolute;
    left: -38px; /* Center on the 2px border (-30px padding - 8px half width) */
    top: 6px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--bg-color);
    border: 3px solid var(--primary);
    box-shadow: 0 0 10px rgba(56, 189, 248, 0.5);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.timeline-item:hover .timeline-dot {
    background: var(--primary);
    transform: scale(1.2);
    box-shadow: 0 0 15px var(--primary);
}

.timeline-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 10px;
}

.timeline-header h3 {
    margin: 0;
    font-size: 1.3rem;
    color: var(--text-main);
}

.timeline-date {
    font-size: 0.95rem;
    color: var(--accent);
    font-weight: 600;
    font-family: monospace;
}

.job-title-container {
    display: flex;
    align-items: baseline;
    gap: 10px;
    flex-wrap: wrap;
}

.company {
    font-size: 1.1rem;
    font-weight: 600;
}

.company a {
    color: var(--secondary);
}

.company a:hover {
    color: var(--accent);
}

.timeline-body {
    margin-top: 15px;
    font-size: 1.05rem;
    color: var(--text-muted);
}

.timeline-body ul {
    margin-top: 10px;
}

.timeline-body ul li {
    font-size: 1.05rem;
}

.degree {
    font-size: 1.15rem;
    color: var(--text-main);
    margin-bottom: 10px;
}

.honors {
    font-size: 1.05rem;
    color: var(--accent);
    margin-bottom: 15px;
}

/* Coursework tag styling */
.coursework {
    margin-top: 15px;
}

.course-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.course-tag {
    background: rgba(129, 140, 248, 0.1);
    border: 1px solid rgba(129, 140, 248, 0.2);
    color: var(--secondary);
    padding: 4px 10px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.course-tag:hover {
    background: rgba(129, 140, 248, 0.2);
    border-color: var(--secondary);
    transform: translateY(-2px);
}

/* Skills List and Badge Styling */
.skills-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 25px;
}

.skills-row {
    display: flex;
    align-items: center;
    background: rgba(30, 41, 59, 0.3);
    border: 1px solid var(--border-color);
    padding: 16px 24px;
    border-radius: 16px;
    transition: all 0.3s ease;
}

.light-mode .skills-row {
    background: rgba(255, 255, 255, 0.4);
}

.skills-row:hover {
    border-color: var(--primary);
    transform: translateX(6px);
    box-shadow: 0 4px 20px rgba(56, 189, 248, 0.05);
}

.skills-label {
    width: 220px;
    margin: 0;
    font-size: 1.15rem;
    color: var(--primary);
    font-weight: 600;
    flex-shrink: 0;
}

.skill-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    flex-grow: 1;
}

.skill-badge {
    background: rgba(56, 189, 248, 0.1);
    border: 1px solid rgba(56, 189, 248, 0.2);
    color: var(--primary);
    padding: 6px 12px;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.skill-badge:hover {
    background: var(--primary);
    color: #020617;
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(56, 189, 248, 0.3);
}

.light-mode .skill-badge:hover {
    color: #f1f5f9;
}

@media (max-width: 600px) {
    .timeline {
        padding-left: 20px;
    }
    .timeline-dot {
        left: -28px;
    }
    .timeline-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    .skills-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        padding: 18px 20px;
    }
    .skills-label {
        width: 100%;
        border-bottom: 1px solid var(--border-color);
        padding-bottom: 6px;
        margin-bottom: 4px;
    }
}


/* Responsive adjustments */
@media (max-width: 768px) {
    header {
        padding: 30px 15px 15px;
    }

    header h1 {
        font-size: 2.5rem;
    }

    nav {
        justify-content: space-between;
        padding: 10px 20px;
    }

    .nav-links {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: var(--nav-bg);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        padding: 20px 0;
        border-bottom: 1px solid var(--border-color);
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
    }

    .nav-links.active {
        display: flex;
    }

    nav a {
        margin: 12px 0;
        font-size: 1.1rem;
        width: 100%;
        text-align: center;
    }

    nav a::after {
        display: none; /* Hide hover underline on mobile to simplify */
    }

    .menu-toggle {
        display: flex;
        order: 1;
    }

    #theme-toggle {
        order: 2;
        margin-left: 0;
    }

    .container {
        margin: 20px 15px;
        padding: 25px;
        border-radius: 16px;
    }

    #about {
        flex-direction: column;
        text-align: center;
        gap: 25px;
    }

    #about img {
        width: 150px;
        height: 150px;
    }

    h2 {
        font-size: 1.5rem;
    }

    h3 {
        font-size: 1.2rem;
    }

    ul li {
        font-size: 1rem;
    }

    #ana {
        float: none;
        width: 100px;
        margin: 0 auto 20px;
        display: block;
    }

    #lab a {
        flex-direction: column;
        align-items: center;
    }

    #lab img {
        width: 100%;
        max-width: 100%;
    }
}

@media (max-width: 480px) {
    header h1 {
        font-size: 2rem;
    }

    nav a {
        margin: 5px 8px;
        font-size: 0.85rem;
    }

    .container {
        padding: 20px;
    }

    h2 {
        font-size: 1.3rem;
    }

    #about img {
        width: 120px;
        height: 120px;
    }
}


/* ==========================================================================
   Projects Page — Card Layout & Modal
   ========================================================================== */

/* Projects List Layout */
.projects-list {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

/* Horizontal Row Card Design */
.project-row-card {
    display: flex;
    background: var(--card-bg);
    border-radius: 20px;
    border: 1px solid var(--border-color);
    overflow: hidden;
    cursor: pointer;
    transition: border-color 0.3s ease, box-shadow 0.3s ease, transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: var(--shadow);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

/* Left Visual Column */
.project-visual {
    width: 260px;
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.4), rgba(15, 23, 42, 0.6));
    display: flex;
    align-items: center;
    justify-content: center;
    border-right: 1px solid var(--border-color);
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
}

.light-mode .project-visual {
    background: linear-gradient(135deg, rgba(241, 245, 249, 0.8), rgba(226, 232, 240, 0.9));
}

.project-visual::after {
    content: '';
    position: absolute;
    width: 140px;
    height: 140px;
    background: radial-gradient(circle, rgba(56, 189, 248, 0.08) 0%, transparent 70%);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
}

.project-visual img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 0;
    margin: 0;
    box-shadow: none;
    max-width: none;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.project-row-card:hover .project-visual img {
    transform: scale(1.04);
}

.project-icon {
    font-size: 3.2rem;
    color: var(--primary);
    filter: drop-shadow(0 0 12px rgba(56, 189, 248, 0.2));
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 2;
}

.project-row-card:hover .project-icon {
    transform: scale(1.08);
}

/* Right Content Area */
.project-content {
    padding: 26px 30px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.project-row-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 12px;
    gap: 15px;
}

.project-row-header h3 {
    margin: 0;
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-main);
    letter-spacing: -0.015em;
    transition: color 0.3s ease;
}

.project-row-card:hover h3 {
    color: var(--primary);
}

.project-date {
    font-family: monospace;
    color: var(--accent);
    font-weight: 600;
    font-size: 0.95rem;
    flex-shrink: 0;
}

.project-description {
    font-size: 0.98rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin: 0 0 20px;
}

.project-row-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.light-mode .project-row-footer {
    border-top-color: rgba(15, 23, 42, 0.05);
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.project-tag {
    background: rgba(56, 189, 248, 0.08);
    border: 1px solid rgba(56, 189, 248, 0.15);
    color: var(--primary);
    padding: 4px 10px;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 600;
}

.light-mode .project-tag {
    background: rgba(15, 23, 42, 0.04);
    border-color: rgba(15, 23, 42, 0.08);
}

.project-row-card:hover {
    border-color: rgba(56, 189, 248, 0.3);
    box-shadow: 0 12px 25px rgba(56, 189, 248, 0.05);
}

/* ==========================================================================
   Project Detail Modal
   ========================================================================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(2, 6, 23, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
    display: flex;
    opacity: 1;
}

.modal-content {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    width: 100%;
    max-width: 700px;
    max-height: 85vh;
    border-radius: 24px;
    padding: 35px 40px 40px;
    position: relative;
    overflow-y: auto;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.6);
    transform: scale(0.96) translateY(10px);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
}

.modal-overlay.active .modal-content {
    transform: scale(1) translateY(0);
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 25px;
    font-size: 2.2rem;
    color: var(--text-muted);
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s;
    user-select: none;
}

.modal-close:hover {
    color: var(--primary);
}

.modal-header {
    margin-bottom: 20px;
}

.modal-header h2 {
    margin: 0 0 6px;
    font-size: 1.8rem;
    color: var(--text-main);
    border: none;
    padding: 0;
}

.modal-header h2::after {
    display: none;
}

.modal-meta {
    font-family: monospace;
    color: var(--accent);
    font-weight: 600;
    font-size: 0.95rem;
}

.modal-body {
    font-size: 1.02rem;
    line-height: 1.65;
    color: var(--text-muted);
    margin-bottom: 30px;
}

.modal-body p {
    margin-top: 0;
    margin-bottom: 20px;
}

.modal-media-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    margin-top: 20px;
}

.modal-media {
    flex: 1 1 300px;
    max-width: 100%;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    background: rgba(2, 6, 23, 0.2);
}

.light-mode .modal-media {
    background: rgba(15, 23, 42, 0.02);
}

.modal-media img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: contain;
    max-height: 380px;
    margin: 0;
    border-radius: 0;
    box-shadow: none;
    max-width: none;
}

.modal-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 20px;
    flex-wrap: wrap;
    gap: 15px;
}

.light-mode .modal-footer {
    border-top-color: rgba(15, 23, 42, 0.05);
}

.modal-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.modal-link {
    background: var(--primary);
    color: #020617;
    padding: 10px 20px;
    border-radius: 10px;
    font-weight: 700;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(56, 189, 248, 0.2);
}

.modal-link:hover {
    background: var(--accent);
    color: #020617;
    transform: translateY(-2px);
}

.light-mode .modal-link {
    color: #f1f5f9;
}

@media (max-width: 768px) {
    .project-row-card {
        flex-direction: column;
    }

    .project-visual {
        width: 100%;
        height: 180px;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
    }

    .project-content {
        padding: 20px;
    }

    .project-row-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }

    .project-row-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
        width: 100%;
    }

    .modal-content {
        padding: 30px 25px;
    }

    .modal-footer {
        flex-direction: column;
        align-items: flex-start;
        width: 100%;
    }

    .modal-link {
        width: 100%;
        justify-content: center;
    }
}

/* ==========================================================================
   Now Playing Widget (Last.fm / Spotify Integration)
   ========================================================================== */
#now-playing-widget {
    margin-top: 40px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 16px;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.2);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#now-playing-widget:hover {
    border-color: rgba(29, 185, 84, 0.5); /* Glowing Spotify Green on hover */
    box-shadow: 0 10px 40px -10px rgba(29, 185, 84, 0.25);
    transform: translateY(-2px);
}

#now-playing-inner {
    display: flex;
    align-items: center;
    gap: 16px;
}

#now-playing-art-wrap {
    position: relative;
    width: 64px;
    height: 64px;
    flex-shrink: 0;
    border-radius: 8px;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.3);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.now-playing-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    color: #1DB954;
    font-size: 1.4rem;
}

#now-playing-art {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    max-width: none;
    margin: 0;
    border-radius: 0;
    box-shadow: none;
    object-fit: cover;
    display: block;
    transition: opacity 0.3s ease, transform 0.5s ease;
    z-index: 1;
}

#now-playing-widget:hover #now-playing-art {
    transform: scale(1.05);
}


/* Equalizer Bars Overlay */
#now-playing-bars {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    width: 20px;
    height: 20px;
    position: absolute;
    bottom: 6px;
    right: 6px;
    background: rgba(0, 0, 0, 0.65);
    padding: 4px;
    border-radius: 4px;
    backdrop-filter: blur(4px);
    z-index: 2;
}

#now-playing-bars span {
    width: 2.5px;
    height: 100%;
    background-color: #1DB954; /* Spotify green */
    transform-origin: bottom;
    transition: transform 0.3s ease;
}

.bars-active span:nth-child(1) { animation: bounce 1.1s ease-in-out infinite alternate; }
.bars-active span:nth-child(2) { animation: bounce 0.8s ease-in-out infinite alternate 0.2s; }
.bars-active span:nth-child(3) { animation: bounce 1.3s ease-in-out infinite alternate 0.1s; }
.bars-active span:nth-child(4) { animation: bounce 0.9s ease-in-out infinite alternate 0.3s; }

@keyframes bounce {
    0% { transform: scaleY(0.2); }
    100% { transform: scaleY(1.0); }
}

.bars-idle span {
    transform: scaleY(0.2);
}

/* Text and Labels Info */
#now-playing-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0; /* Prevents text overflow */
}

#now-playing-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
}

#now-playing-label i {
    color: #1DB954; /* Spotify green */
    font-size: 0.9rem;
}

#now-playing-status {
    transition: color 0.3s ease;
}

.status-active {
    color: #1DB954;
}

#now-playing-track {
    font-weight: 600;
    font-size: 1rem;
    color: var(--text-main);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#now-playing-artist {
    font-size: 0.85rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

