:root {
    --bg: #0a0a0c;
    --card-bg: #16161a;
    --text-main: #ffffff;
    --text-dim: #94a3b8;
    --accent: #3b82f6;
    --accent-glow: rgba(59, 130, 246, 0.5);
    --font-sans: 'Inter', sans-serif;
    --font-display: 'Space Grotesk', sans-serif;

    /* Background blob colors - Consistent Neural Theme */
    --blob-1: #1e40af;
    /* Deep Blue */
    --blob-2: #7c3aed;
    /* Deep Purple/Violet */
}

body.is-playing {
    --blob-1: #3b82f6;
    /* Brighter Blue */
    --blob-2: #06b6d4;
    /* Vibrant Cyan */
    --accent: #06b6d4;
    --accent-glow: rgba(6, 182, 212, 0.5);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

html {
    background-color: var(--bg);
    margin: 0;
    padding: 0;
}

body {
    background-color: transparent;
    color: var(--text-main);
    font-family: var(--font-sans);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
    min-height: 100vh;
}

.bg-main-image {
    position: fixed;
    top: -25vh;
    left: -10vw;
    right: -10vw;
    bottom: -25vh;
    z-index: -10;
    background-color: var(--bg);
    background-image:
        linear-gradient(to bottom, rgba(10, 10, 12, 0.6), rgba(10, 10, 12, 0.8)),
        url('../images/background.png');
    background-size: cover;
    background-position: center;
    pointer-events: none;
}

/* Neural Background */
.bg-mesh {
    position: fixed;
    top: -25vh;
    left: -10vw;
    right: -10vw;
    bottom: -25vh;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
    background-size: 50px 50px;
    z-index: -8;
    pointer-events: none;
}

.bg-glow {
    position: fixed;
    top: -10vh;
    left: -10vw;
    right: -10vw;
    bottom: -10vh;
    z-index: -9;
    overflow: hidden;
    filter: blur(100px);
    pointer-events: none;
    opacity: 0.3;
}

.blob {
    position: absolute;
    width: 600px;
    height: 600px;
    background: var(--blob-1);
    border-radius: 50%;
    opacity: 0.25;
    transition: background 2s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform;
}

.blob:nth-child(1) {
    top: -10%;
    left: -10%;
    animation: moveBlob1 25s infinite alternate ease-in-out;
}

.blob:nth-child(2) {
    bottom: -10%;
    right: -10%;
    background: var(--blob-2);
    animation: moveBlob2 30s infinite alternate-reverse ease-in-out;
}

@keyframes moveBlob1 {
    0% {
        transform: translate(0, 0);
    }

    100% {
        transform: translate(40vw, 30vh) scale(1.2);
    }
}

@keyframes moveBlob2 {
    0% {
        transform: translate(0, 0) scale(1.1);
    }

    100% {
        transform: translate(-30vw, -40vh) scale(0.9);
    }
}

.container {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Header */
.main-header {
    padding: clamp(1.5rem, 5vh, 3rem) 0;
    text-align: center;
}

.main-header h1 {
    font-family: var(--font-display);
    font-size: clamp(2.2rem, 10vw, 3.8rem);
    letter-spacing: -0.02em;
    background: linear-gradient(to right, #fff, var(--accent));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    transition: background 1s ease;
}

/* Release Countdown */
.release-countdown {
    background: rgba(255, 68, 68, 0.05);
    border: 2px solid rgba(255, 68, 68, 0.2);
    border-radius: 24px;
    padding: 1.5rem;
    margin: 0 auto 3rem auto;
    width: 50%;
    min-width: 280px;
    text-align: center;
    backdrop-filter: blur(12px);
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    position: relative;
    overflow: hidden;
    box-shadow: 0 0 30px rgba(255, 68, 68, 0.1);
}

.release-countdown::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, #ff4444, transparent);
    animation: scanline 3s linear infinite;
}

@keyframes scanline {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.countdown-label {
    font-size: 0.8rem;
    color: #ff4444;
    letter-spacing: 0.2em;
    font-weight: 700;
    opacity: 0.9;
}

.countdown-timer {
    font-family: var(--font-display);
    font-size: clamp(2rem, 8vw, 3.5rem);
    color: #ff4444;
    text-shadow: 0 0 15px rgba(255, 68, 68, 0.4);
    font-variant-numeric: tabular-nums;
    animation: pulse-red 2s infinite ease-in-out;
}

@keyframes pulse-red {
    0%, 100% { 
        opacity: 1; 
        transform: scale(1);
        text-shadow: 0 0 15px rgba(255, 68, 68, 0.4);
    }
    50% { 
        opacity: 0.8; 
        transform: scale(1.02);
        text-shadow: 0 0 25px rgba(255, 68, 68, 0.7);
    }
}

/* Grid Layout */
.protocol-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    padding-bottom: 5rem;
}

/* Card Design */
.protocol-card {
    background: var(--card-bg);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    padding: 2rem;
    transition: transform 0.3s cubic-bezier(0.23, 1, 0.32, 1), border-color 0.3s ease;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    position: relative;
}

.card-content {
    display: flex;
    flex-direction: column;
    height: 100%;
}

@media (hover: hover) {
    .protocol-card:hover {
        transform: translateY(-8px);
        border-color: var(--accent-glow);
    }
}

.protocol-card h2 {
    font-family: var(--font-display);
    font-size: 1.3rem;
    margin-bottom: 1rem;
    line-height: 1.3;
}

.card-meta {
    font-size: 0.75rem;
    color: #ff4444 !important;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 700;
    margin-bottom: 0.5rem;
    display: block;
}

.protocol-card p {
    color: var(--text-dim);
    font-size: 0.95rem;
    margin-bottom: 2rem;
    flex-grow: 1;
}

.play-btn {
    background: var(--accent);
    border: none;
    color: #fff;
    padding: 0.9rem 1.5rem;
    border-radius: 12px;
    font-weight: 700;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.2);
}

@media (hover: hover) {
    .protocol-card:hover .play-btn {
        transform: translateY(-2px);
        box-shadow: 0 8px 20px var(--accent-glow);
        animation: pulse-subtle 2s infinite;
    }
}

@keyframes pulse-subtle {
    0% {
        transform: translateY(-2px) scale(1);
    }

    50% {
        transform: translateY(-2px) scale(1.03);
    }

    100% {
        transform: translateY(-2px) scale(1);
    }
}

.protocol-card:active .play-btn {
    transform: scale(0.95);
}

/* Modal Styles */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(40px);
    z-index: 1000;
    display: none;
    align-items: flex-start;
    /* Better for mobile overflow */
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    padding: 2rem 1rem;
    overflow-y: auto;
}

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

.modal-content {
    background: var(--card-bg);
    width: 100%;
    max-width: 450px;
    padding: 2.5rem 1.5rem;
    border-radius: 28px;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transform: translateY(30px);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    margin: auto;
    /* Center when content is small */
}

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

.close-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: none;
    color: var(--text-dim);
    width: 44px;
    /* Optimized tap target */
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    cursor: pointer;
    z-index: 10;
}


/* Audio UI */
.progress-container {
    margin-bottom: 1.5rem;
}

.progress-bar {
    width: 100%;
    height: 10px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.progress-fill {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 0%;
    background: var(--accent);
    transition: background 0.3s ease;
}

.time-info {
    display: flex;
    justify-content: space-between;
    margin-top: 0.6rem;
    font-size: 0.85rem;
    color: var(--text-dim);
    font-weight: 500;
}

.main-play-btn {
    background: var(--accent);
    color: #fff;
    border: none;
    width: 100%;
    padding: 1.2rem;
    border-radius: 16px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.player-header {
    text-align: center;
    margin-bottom: 2rem;
    padding: 0 1rem;
}

.now-playing {
    display: block;
    font-size: 0.75rem;
    color: #ff4444;
    /* Vibrant Red */
    letter-spacing: 0.25em;
    text-transform: uppercase;
    font-weight: 700;
    margin-bottom: 0.5rem;
    text-align: center;
}

.player-header h2 {
    font-family: var(--font-display);
    margin-top: 0.5rem;
    font-size: 1.25rem;
}

/* Mobile specific fixes */
@media (max-width: 480px) {
    .protocol-grid {
        gap: 1rem;
        padding-bottom: 3rem;
    }

    .protocol-card {
        padding: 1.5rem;
    }

    .modal {
        padding: 1rem 0.5rem;
    }

    .modal-content {
        padding: 2.5rem 1.2rem 1.5rem;
        border-radius: 24px;
    }
}

/* Footer */
.main-footer {
    padding: 3rem 0;
    text-align: center;
    margin-top: 2rem;
}

.contact-email {
    color: #ff4444 !important;
    text-decoration: none;
    font-family: var(--font-display);
    font-weight: 700;
    letter-spacing: 0.1em;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    opacity: 0.8;
}

.contact-email:hover {
    opacity: 1;
    text-shadow: 0 0 15px rgba(255, 68, 68, 0.5);
}

/* Visitor Counter Styles */
.visitor-counter {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: rgba(22, 22, 26, 0.6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 8px 16px;
    border-radius: 100px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: var(--text-dim);
    z-index: 100;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    pointer-events: none;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.visitor-label {
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 0.7rem;
    opacity: 0.8;
}

.visitor-count {
    color: var(--accent);
    font-weight: 700;
    font-family: var(--font-display);
}

.visitor-count.updated {
    animation: count-pulse 0.5s ease-out;
}

@keyframes count-pulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.3);
        opacity: 0.7;
        color: #fff;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

@media (max-width: 480px) {
    .visitor-counter {
        bottom: 15px;
        right: 15px;
        padding: 6px 12px;
        font-size: 0.75rem;
    }
}