:root {
    --bg-color: #1a2741;
    --accent-cyan: #1E73B9;
    /* Analysis Blue */
    --accent-magenta: #B10A4A;
    /* Emotion Burgundy */
    --accent-blue: #0E2A47;
    /* Structure Navy */
    --glass-bg: rgba(14, 42, 71, 0.4);
    /* Navy Glass */
    --glass-border: rgba(30, 115, 185, 0.2);
    /* Blue border */
    --text-main: #c7c7c7;
    --text-dim: #dedede;
    --font-heading: 'Montserrat', sans-serif;
    --font-main: 'Inter', sans-serif;
    --card-glow: rgba(30, 115, 185, 0.15);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    font-family: var(--font-main);
    line-height: 1.6;
}

#hero-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
    opacity: 0.75;
}

#hero-video-overlay {
    position: absolute;
    inset: 0;
    background: rgba(14, 22, 40, 0.55);
    z-index: 1;
}

canvas#neural-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    opacity: 0.85; /* Subtle neural activity effect */
    filter: blur(0.3px);
}

/* --- Hero --- */

.ambient-glow {
    position: fixed;
    width: 800px;
    height: 800px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(0, 102, 255, 0.1) 0%, transparent 70%);
    z-index: -1;
    filter: blur(100px);
    pointer-events: none;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 16px 30px;
    position: relative;
}

/* --- Navigation --- */
nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    margin-bottom: 16px;
}

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    transition: 0.3s;
}

.logo img {
    height: 48px;
    width: auto;
    display: block;
}

.logo:hover {
    filter: brightness(1.2);
}

.nav-links {
    display: flex;
    gap: 30px;
    background: rgba(255, 255, 255, 0.03);
    padding: 10px 30px;
    border-radius: 40px;
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(10px);
}

.nav-links a {
    color: var(--text-dim);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    transition: 0.3s;
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

.nav-music-btn {
    display: none;
}

.nav-links a i {
    display: none;
}

.nav-links a:hover {
    color: var(--accent-cyan);
    text-shadow: 0 0 10px var(--accent-cyan);
}

.mobile-cta {
    display: none;
}

header.hero-section {
    text-align: center;
    margin-bottom: 60px;
    padding-top: 10px;
}

#hero-top {
    position: relative;
    overflow: hidden;
    border-radius: 32px;
    padding: 20px 20px 15px;
    margin-bottom: 40px;
    background: linear-gradient(135deg, rgba(14,22,40,0.95) 0%, rgba(14,42,71,0.9) 100%);
}

#hero-top > *:not(#hero-video):not(#hero-video-overlay) {
    position: relative;
    z-index: 2;
}

#hero-top .hero-desc {
    max-width: 1100px;
}

header.hero-section > .hero-desc {
    max-width: 1100px;
}

.neuro-label {
    display: inline-block;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 4px;
    color: var(--accent-magenta);
    margin-bottom: 25px;
}

h1 {
    font-family: var(--font-heading);
    font-size: clamp(3rem, 7vw, 6rem);
    font-weight: 700;
    margin-bottom: 30px;
    line-height: 1.15;
    letter-spacing: -4px;
    padding-bottom: 0.1em;
}

h1 span {
    background: linear-gradient(135deg, var(--accent-cyan), var(--accent-magenta));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: inline-block;
}

.hero-desc {
    font-size: 1.5rem;
    color: var(--text-dim);
    max-width: 850px;
    margin: 0 auto 30px;
    font-weight: 300;
    line-height: 1.6;
}

.hero-intro {
    max-width: 780px;
}

.hero-summary {
    max-width: 920px;
}

.hero-primary-cta {
    background: linear-gradient(135deg, var(--accent-magenta), var(--accent-blue));
    color: #fff;
    padding: 22px 60px;
    border-radius: 100px;
    font-weight: 900;
    text-decoration: none;
    font-size: 1.1rem;
    box-shadow: 0 15px 40px rgba(177,10,74,0.4);
    display: inline-block;
    letter-spacing: 0.5px;
}

.audience-section {
    border-radius: 40px;
    border: 1px solid var(--glass-border);
    position: relative;
    min-height: 550px;
    background: url('../Images/AdobeStock_440516409%20kopia.png') no-repeat -150px center / contain;
    background-color: rgba(10,20,40,1);
    margin: 0 auto 80px;
    max-width: 1400px;
    overflow: hidden;
}

.audience-shell {
    display: flex;
    justify-content: flex-end;
    min-height: 550px;
}

.audience-content {
    width: 63%;
    padding: 50px 50px 50px 30px;
    display: flex;
    flex-direction: column;
    gap: 28px;
    justify-content: center;
    background: linear-gradient(to left, rgba(10,20,40,0.95) 55%, rgba(10,20,40,0.7) 80%, transparent 100%);
}

.audience-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ecosystem-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    align-items: start;
}

.ecosystem-card {
    gap: 18px;
}

.brain-lab-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.contact-panel {
    padding: 80px 60px;
    background: linear-gradient(to right, rgba(10,20,40,0.95) 50%, rgba(10,20,40,0.6) 70%, transparent 100%);
    border-radius: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 600px;
}

.contact-form-grid {
    display: grid;
    gap: 16px;
    text-align: left;
    max-width: 560px;
}

.contact-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.contact-meta {
    display:flex;
    gap:40px;
    flex-wrap:wrap;
    padding-top: 30px;
    margin-top: 30px;
    border-top: 1px solid var(--glass-border);
}

.modules-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.module-card {
    min-height: 320px;
    padding-bottom: 76px;
}

.module-card .card-text {
    font-size: 0.98rem;
}

.module-card .card-details {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid rgba(255,255,255,0.08);
}

.difficulty-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    width: 100%;
    align-items: end;
}

.difficulty-copy {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.difficulty-points {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.difficulty-point {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    font-size: 0.88rem;
    color: var(--text-dim);
}

.difficulty-point-mark {
    color: var(--accent-cyan);
    flex-shrink: 0;
    margin-top: 2px;
}

.difficulty-actions {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.scenario-progress {
    display: flex;
    gap: 20px;
    margin-bottom: 25px;
}

.mobile-simulator-header {
    display: none;
}

.mobile-step-back {
    display: none;
}

/* --- UI Elements --- */
.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-header h2 {
    font-family: var(--font-heading);
    font-size: 3rem;
    font-weight: 900;
    margin-top: 10px;
}

.section-header span {
    color: var(--accent-cyan);
    text-transform: uppercase;
    letter-spacing: 4px;
    font-size: 0.95rem;
    font-weight: 700;
}

/* --- Stats Row --- */
.stats-row {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-bottom: 60px;
    flex-wrap: wrap;
}

.stat-box {
    background: var(--glass-bg);
    padding: 20px 40px;
    border-radius: 25px;
    border: 1px solid var(--glass-border);
    text-align: center;
    width: 270px;
    flex-shrink: 0;
}

.stat-num {
    font-family: var(--font-heading);
    font-size: 2.8rem;
    font-weight: 900;
    color: #fff;
    line-height: 1;
}

.stat-lab {
    font-size: 0.75rem;
    color: var(--accent-cyan);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-top: 5px;
}

/* --- Bento Grid --- */
.bento-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: minmax(180px, auto);
    gap: 30px;
}

.card {
    background: var(--glass-bg);
    backdrop-filter: blur(25px) saturate(180%);
    border: 1px solid var(--glass-border);
    border-radius: 40px;
    padding: 45px;
    position: relative;
    overflow: hidden;
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
    cursor: pointer;
}

.card.expanded {
    border-color: var(--accent-cyan) !important;
}

/* --- Module Modal --- */
#module-modal {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(10, 15, 30, 0.75);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 9999;
    display: none;
    justify-content: center;
    align-items: center;
    padding: 24px;
    opacity: 0;
    transition: opacity 0.3s ease;
}
#module-modal.active { opacity: 1; }

.module-modal-panel {
    background: rgba(14, 42, 71, 0.97);
    border: 1px solid var(--accent-cyan);
    border-radius: 40px;
    padding: 50px 56px;
    max-width: 1060px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    width: 100%;
    max-height: 96vh;
    overflow-y: auto;
    position: relative;
    transform: translateY(28px) scale(0.98);
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    scrollbar-width: thin;
    scrollbar-color: rgba(30,115,185,0.3) transparent;
}
#module-modal.active .module-modal-panel {
    transform: translateY(0) scale(1);
}
.modal-close-btn {
    position: absolute;
    top: 22px; right: 26px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 50%;
    width: 38px; height: 38px;
    color: var(--text-dim);
    font-size: 1rem;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: 0.2s;
}
.modal-close-btn:hover {
    background: rgba(177,10,74,0.2);
    border-color: var(--accent-magenta);
    color: #fff;
}

.card-details {
    display: none;
}

.expand-hint {
    position: absolute;
    bottom: 25px;
    right: 45px;
    font-size: 0.75rem;
    color: var(--accent-cyan);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.6;
    transition: 0.3s;
}

.card:hover .expand-hint {
    opacity: 1;
    transform: translateX(5px);
}

.card.expanded .expand-hint {
    opacity: 0.6;
}

.detail-section {
    margin-bottom: 25px;
}

.detail-title {
    color: #fff;
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.detail-title i {
    color: var(--accent-cyan);
    font-size: 0.9rem;
}

.reflection-list {
    list-style: none;
    padding-left: 0;
}

.reflection-list li {
    font-size: 0.9rem;
    color: var(--text-dim);
    margin-bottom: 10px;
    padding-left: 20px;
    position: relative;
}

.reflection-list li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--accent-cyan);
}

.business-case {
    background: rgba(30, 115, 185, 0.1);
    padding: 20px;
    border-radius: 20px;
    font-size: 0.9rem;
    border-left: 4px solid var(--accent-cyan);
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(800px circle at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(30, 115, 185, 0.08), transparent 40%);
    opacity: 0;
    transition: 0.5s;
    pointer-events: none;
}

.card:hover::before {
    opacity: 1;
}

.card-icon {
    font-size: 2.5rem;
    margin-bottom: 25px;
    color: var(--accent-cyan);
    line-height: 1;
    display: flex;
    align-items: center;
}

.card-title {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 20px;
}

/* Tytuł w flex row — zerujemy margin żeby ikona i tekst były wycentrowane */
.module-card .card-title {
    margin: 0 !important;
}

.card-text {
    color: var(--text-dim);
    font-size: 1.05rem;
    line-height: 1.7;
}

/* Grid Spans */
.col-2 {
    grid-column: span 2;
}

.col-3 {
    grid-column: span 3;
}

.col-4 {
    grid-column: span 4;
}

.row-2 {
    grid-row: span 2;
}

/* --- Detailed Modules List --- */
.module-list {
    display: grid;
    gap: 20px;
    margin-top: 20px;
}

.module-item {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    padding: 20px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 20px;
    border: 1px solid var(--glass-border);
}

.module-item i {
    color: var(--accent-cyan);
    margin-top: 5px;
}

/* --- Footer --- */
footer {
    margin-top: 60px;
    padding: 50px 0 40px;
    border-top: 1px solid var(--glass-border);
    text-align: center;
}

@media (max-width: 1200px) {
    h1 {
        font-size: 4rem;
    }

    .bento-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .col-2,
    .col-3,
    .col-4 {
        grid-column: span 1;
    }
}

/* ===== TABLET ===== */
@media (max-width: 900px) {
    .container { padding: 24px 20px; }

    nav { flex-wrap: wrap; gap: 16px; margin-bottom: 24px; }
    .nav-links { gap: 14px; padding: 8px 18px; flex-wrap: wrap; justify-content: center; }
    .nav-links a { font-size: 0.78rem; letter-spacing: 1px; }

    .logo img { height: 80px; }

    h1 { font-size: clamp(2.2rem, 6vw, 3.5rem); letter-spacing: -2px; }
    .hero-desc { font-size: 1.1rem; }
    header.hero-section { margin-bottom: 60px; padding-top: 20px; }

    .stats-row { gap: 16px; }
    .stat-box { width: 200px; padding: 16px 24px; }

    .bento-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
    .col-2, .col-3, .col-4 { grid-column: span 2; }

    .simulator-grid { grid-template-columns: 1fr; gap: 24px; }

    /* Ekosystem 3 kolumny → 1 */
    div[style*="grid-template-columns: repeat(3, 1fr)"] { grid-template-columns: 1fr !important; }
    /* Dla kogo 2 kolumny → 1 */
    div[style*="grid-template-columns: 1fr 1fr"] { grid-template-columns: 1fr !important; }

    /* Brain demo cards */
    div[style*="grid-template-columns: repeat(3, 1fr)"] { grid-template-columns: 1fr !important; }

    /* Bridge block po symulatorze */
    div[style*="display: flex; align-items: stretch"] { flex-direction: column !important; }

    .module-modal-panel { padding: 32px 24px; }

    .hero-summary {
        font-size: 1rem;
        max-width: 760px;
    }

    .hero-primary-cta {
        padding: 18px 40px;
        font-size: 1rem;
    }

    .audience-section {
        background-position: -300px center;
    }

    .audience-content {
        width: 70%;
        padding: 42px 36px 42px 24px;
        gap: 20px;
    }

    .modules-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .difficulty-layout {
        grid-template-columns: 1fr;
        gap: 24px;
        align-items: stretch;
    }
}

/* ===== MOBILE ===== */
@media (max-width: 600px) {
    .container { padding: 16px 14px; }

    /* Nav – logo małe, linki pod spodem */
    nav { flex-direction: column; align-items: flex-start; gap: 0; margin-bottom: 12px; }
    .logo { display: none !important; }
    .mobile-cta {
        display: none;
    }
    .nav-links {
        width: 100%;
        justify-content: space-around;
        gap: 0;
        padding: 6px 4px;
        flex-wrap: nowrap;
        border-radius: 16px;
        overflow: hidden;
    }
    .nav-links a {
        font-size: 0.58rem;
        white-space: nowrap;
        padding: 8px 4px;
        border-radius: 12px;
        background: none;
        border: none;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 3px;
        letter-spacing: 0.5px;
        flex: 1;
        min-width: 0;
    }
    .nav-links a i {
        font-size: 1rem;
        color: var(--accent-cyan);
        display: block;
    }
    .nav-music-btn {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 3px;
        padding: 8px 4px;
        border-radius: 12px;
        background: none;
        border: none;
        border-left: 1px solid rgba(255,255,255,0.12);
        color: rgba(255,255,255,0.5);
        font-size: 0.58rem;
        font-weight: 600;
        letter-spacing: 0.5px;
        text-transform: uppercase;
        cursor: pointer;
        flex: 1;
        min-width: 0;
        margin-left: 2px;
        padding-left: 8px;
    }
    .nav-music-btn i {
        font-size: 1rem;
        display: block;
    }
    .nav-music-btn.playing {
        color: var(--accent-cyan);
    }
    .nav-music-btn.playing i {
        color: var(--accent-cyan);
    }

    /* Hero */
    header.hero-section { margin-bottom: 32px; padding-top: 8px; }
    #hero-top {
        padding: 18px 16px 16px;
        border-radius: 24px;
        margin-bottom: 24px;
    }
    #hero-video {
        opacity: 0.42;
    }
    #hero-video-overlay {
        background: rgba(14, 22, 40, 0.72);
    }
    h1 { font-size: clamp(1.9rem, 8vw, 2.8rem); letter-spacing: -1px; line-height: 1.2; }
    .hero-desc { font-size: 0.95rem; line-height: 1.6; }
    .hero-intro {
        max-width: none;
        margin-bottom: 20px;
    }
    .hero-summary {
        font-size: 0.92rem;
        line-height: 1.7;
        max-width: none;
        margin-bottom: 22px;
    }
    .neuro-label { font-size: 0.7rem; letter-spacing: 2px; }
    #hero-top > p[style*="letter-spacing: 3px"] {
        font-size: 0.72rem !important;
        letter-spacing: 1.6px !important;
        margin-bottom: 18px !important;
    }
    .hero-primary-cta {
        width: 100%;
        padding: 16px 22px;
        font-size: 0.95rem;
        text-align: center;
    }

    /* Stat boxes w rzędzie */
    .stats-row { gap: 10px; margin-bottom: 0; }
    .stat-box { width: calc(50% - 5px); padding: 12px 10px; border-radius: 18px; }
    .stat-num { font-size: 2rem; }
    .stat-lab { font-size: 0.74rem; }

    /* Bento → 1 kolumna */
    .bento-grid { grid-template-columns: 1fr; gap: 12px; }
    .col-2, .col-3, .col-4 { grid-column: span 1; }

    /* Cards padding */
    .card { padding: 26px 22px; border-radius: 24px; }
    .card-title { font-size: 1.4rem; }
    .card-text { font-size: 0.95rem; }
    .modules-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }
    .module-card {
        min-height: auto;
        padding: 22px 18px 58px;
        border-radius: 22px;
    }
    .module-card [style*="grid-template-columns: 1fr 1fr"],
    .module-card [style*="grid-template-columns: 3fr 2fr"],
    .module-modal-panel [style*="grid-template-columns: 1fr 1fr"],
    .module-modal-panel [style*="grid-template-columns: 3fr 2fr"] {
        grid-template-columns: 1fr !important;
    }
    .module-card .card-icon {
        font-size: 1.9rem !important;
    }
    .module-card .card-title {
        font-size: 1.2rem;
    }
    .module-card .card-text {
        font-size: 0.92rem;
        line-height: 1.65;
    }
    .module-card .card-details {
        margin-top: 18px;
        padding-top: 18px;
    }
    .module-card .detail-section {
        margin-bottom: 18px;
    }
    .module-card .detail-title {
        font-size: 0.92rem;
        gap: 8px;
        margin-bottom: 10px;
    }
    .module-card .reflection-list li,
    .module-card .business-case,
    .module-card .card-details .card-text {
        font-size: 0.88rem !important;
        line-height: 1.65;
    }
    .module-card .business-case {
        padding: 16px;
        border-radius: 16px;
    }
    .module-card .expand-hint {
        right: 18px;
        bottom: 18px;
        font-size: 0.68rem;
        letter-spacing: 0.8px;
    }
    .ecosystem-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }
    .ecosystem-card {
        gap: 14px;
    }
    .audience-item p:first-child,
    .ecosystem-card p[style*="text-transform: uppercase"],
    #contact p[style*="text-transform: uppercase"] {
        letter-spacing: 1.4px !important;
        font-size: 0.74rem !important;
    }
    .ecosystem-card .card-text {
        font-size: 0.92rem !important;
        line-height: 1.65;
    }
    .ecosystem-card ul {
        gap: 8px !important;
    }
    .ecosystem-card > div[style*="padding: 16px 18px"] {
        padding: 14px 14px !important;
    }

    /* Section headers */
    .section-header h2 { font-size: 1.5rem; }
    .section-header span { font-size: 0.76rem; letter-spacing: 1.6px; }

    /* SCARF Simulator */
    .simulator-grid { grid-template-columns: 1fr !important; gap: 16px !important; }
    .scenario-box { height: auto !important; overflow: visible !important; padding-right: 0 !important; }
    #next-situation-btn {
        display: none !important;
        height: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
        border: none !important;
        visibility: hidden !important;
    }
    #next-situation-btn-mobile {
        display: flex !important;
        opacity: 0.55;
    }
    #next-situation-btn-mobile:active { opacity: 0.9 !important; }
    #scarf-simulator.mobile-simulator-active #difficulty-overlay {
        display: none !important;
    }
    #scarf-simulator.mobile-simulator-active #simulator-main {
        display: block !important;
    }
    #scarf-simulator.mobile-results-active #simulator-main {
        display: none !important;
    }
    #scarf-simulator.mobile-simulator-active #results-overlay {
        display: flex;
    }
    #results-overlay {
        position: static !important;
        min-height: auto !important;
        height: auto !important;
        padding: 24px 16px !important;
        border-radius: 24px !important;
        width: 100% !important;
    }
    #results-overlay > div {
        width: 100%;
    }
    #results-overlay h2 {
        font-size: 1.4rem !important;
        margin-bottom: 8px !important;
    }
    #results-overlay .archetype-label {
        font-size: 0.7rem !important;
    }
    #results-overlay strong {
        font-size: 1.1rem !important;
        margin: 6px 0 !important;
    }
    #results-overlay div[style*="display: flex; gap: 20px"] {
        gap: 10px !important;
        margin: 10px 0 !important;
    }
    #results-overlay div[style*="padding: 10px 20px"] {
        padding: 6px 12px !important;
    }
    #results-overlay p[style*="margin-top:15px"] {
        font-size: 0.85rem !important;
        margin-top: 8px !important;
    }
    #results-overlay button {
        padding: 10px 28px !important;
        font-size: 0.85rem !important;
        margin-top: 6px !important;
    }
    #results-chart-wrapper {
        max-width: 100% !important;
        margin: 8px auto 10px !important;
        padding: 0 10px;
    }
    #results-overlay #results-chart-wrapper {
        max-width: 320px !important;
    }
    #difficulty-overlay {
        padding: 24px 20px;
    }
    .mobile-simulator-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        margin-bottom: 20px;
        padding-bottom: 14px;
        border-bottom: 1px solid rgba(255,255,255,0.08);
    }
    .mobile-simulator-header p {
        margin: 0;
        color: var(--text-dim);
        font-size: 0.8rem;
        text-transform: uppercase;
        letter-spacing: 1.4px;
        line-height: 1.4;
        flex: 1;
        text-align: right;
    }
    .mobile-step-back {
        display: inline-flex;
        align-items: center;
        gap: 8px;
        padding: 10px 14px;
        border-radius: 14px;
        border: 1px solid rgba(255,255,255,0.08);
        background: rgba(255,255,255,0.04);
        color: #fff;
        font-size: 0.78rem;
        font-weight: 700;
        letter-spacing: 0.04em;
        text-transform: uppercase;
        cursor: pointer;
    }
    .difficulty-layout {
        gap: 16px;
    }
    .difficulty-copy {
        gap: 10px;
    }
    .difficulty-copy .section-header {
        margin-bottom: 8px !important;
    }
    .difficulty-copy .section-header h2 {
        font-size: 1.5rem !important;
    }
    .difficulty-copy > p {
        font-size: 0.88rem !important;
        margin-bottom: 0 !important;
        line-height: 1.6 !important;
    }
    .difficulty-points {
        display: none;
    }
    .difficulty-actions {
        gap: 8px;
    }
    .diff-btn {
        padding: 12px 14px 12px 16px !important;
        border-radius: 16px !important;
        gap: 12px !important;
    }
    .diff-icon {
        width: 38px !important;
        height: 38px !important;
        border-radius: 10px !important;
        font-size: 1.1rem !important;
    }
    .diff-btn strong {
        font-size: 0.9rem !important;
    }
    .diff-btn small {
        display: none;
    }
    #viz-container {
        padding: 16px 12px !important;
        border-radius: 20px !important;
    }
    #viz-container > div:first-child {
        max-width: 220px !important;
    }
    #viz-container > div:last-child {
        margin-top: 12px !important;
    }
    #viz-container #feedback-text {
        font-size: 0.78rem !important;
        min-height: 2em !important;
    }

    /* Brain demo cards – już 1 kolumna przez tablet query */
    .brain-demo-card { padding: 24px 20px !important; }
    .demo-trigger-btn { font-size: 0.85rem; padding: 12px 20px; }
    .brain-lab-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    #difficulty-overlay h2,
    #simulator-main h2 {
        font-size: 1.5rem !important;
        line-height: 1.2;
    }
    #difficulty-overlay small,
    #difficulty-overlay div[style*="font-size: 0.88rem"],
    #difficulty-overlay p,
    #simulator-main p,
    #simulator-main #feedback-text {
        font-size: 0.92rem !important;
        line-height: 1.65 !important;
    }
    #phase-label,
    #simulator-main div[style*="font-size: 0.6rem"] {
        font-size: 0.68rem !important;
        letter-spacing: 1.2px !important;
    }
    .scenario-progress {
        flex-direction: column;
        gap: 12px;
        margin-bottom: 20px;
    }
    #simulator-main {
        padding-top: 4px;
    }
    #simulator-main > .section-header {
        margin-bottom: 24px !important;
    }
    #simulator-main > .section-header span {
        display: none;
    }
    #simulator-main > .section-header p {
        margin-top: 10px !important;
    }
    .choice-btn {
        padding: 12px 14px;
        gap: 0;
        font-size: 0.88rem;
        border-radius: 14px;
    }
    .choice-btn span.letter {
        display: none !important;
    }
    .brain-demo-card p {
        font-size: 0.92rem;
        line-height: 1.65;
    }
    .brain-demo-card .demo-tag,
    #brain-lab p[style*="font-size: 0.7rem"],
    #brain-lab p[style*="font-size: 0.8rem"] {
        letter-spacing: 1.2px !important;
    }
    .brain-demo-card > div[style*="margin-top: 20px"] {
        margin-top: 16px !important;
        padding: 12px 14px !important;
    }

    /* Moduły → 1 kolumna */
    div[style*="grid-template-columns: repeat(3, 1fr)"] { grid-template-columns: 1fr !important; }

    /* Ekosystem karty */
    div[style*="grid-template-columns: repeat(3, 1fr)"] { grid-template-columns: 1fr !important; }

    /* Bridge + CTA block */
    div[style*="display: flex; align-items: stretch"] { flex-direction: column !important; gap: 16px !important; }
    div[style*="padding: 40px 50px"] { padding: 24px 20px !important; }

    .contact-panel {
        min-height: auto;
        padding: 28px 20px;
        border-radius: 28px;
        background: linear-gradient(to bottom, rgba(10,20,40,0.97), rgba(10,20,40,0.88));
    }
    .contact-form-grid {
        max-width: none;
    }
    .contact-form-row {
        grid-template-columns: 1fr;
    }
    .contact-meta {
        gap: 18px;
        padding-top: 22px;
        margin-top: 22px;
    }
    .contact-meta p:last-child {
        font-size: 0.94rem !important;
    }
    #contact {
        min-height: auto !important;
        background: rgba(10,20,40,0.98) !important;
        border-radius: 28px !important;
    }
    #ekosystem h2 { font-size: 1.5rem !important; }
    #contact h2 {
        max-width: none !important;
        font-size: 1.5rem !important;
        line-height: 1.15;
    }
    #contact .card-text {
        max-width: none !important;
        margin-bottom: 28px !important;
    }

    /* Footer */
    footer { margin-top: 60px; padding: 50px 0 30px; }
    footer img { height: 120px !important; }

    .audience-section {
        min-height: auto;
        background: rgba(10,20,40,0.96);
        border-radius: 28px;
        margin-bottom: 56px;
    }

    .audience-shell {
        min-height: auto;
    }

    .audience-content {
        width: 100%;
        padding: 24px 20px;
        gap: 18px;
        background: none;
    }

    .audience-item {
        padding: 14px 14px 14px 16px;
        border-radius: 16px;
        background: rgba(255,255,255,0.03);
        border-left: 3px solid var(--accent-cyan);
    }

    /* Modal */
    .module-modal-panel { padding: 24px 16px; border-radius: 24px; max-height: 92vh; }

    /* Scroll to top */
    #scroll-to-top { bottom: 16px; right: 16px; width: 40px; height: 40px; font-size: 1rem; }

    /* Dopamine canvas – nie blokuje dotyku */
    #dopamine-canvas { pointer-events: none; }

    /* Music widget – kółko w prawym górnym rogu, pojawia się jak scroll-to-top */
    #music-widget {
        top: 16px !important;
        bottom: auto !important;
        right: 16px !important;
        left: auto !important;
        flex-direction: column !important;
        gap: 0 !important;
        opacity: 0;
        pointer-events: none;
        transform: translateY(-20px) scale(0.85);
        transition: opacity 0.4s cubic-bezier(0.34, 1.56, 0.64, 1),
                    transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    }
    #music-widget.visible {
        opacity: 0.35;
        pointer-events: auto;
        transform: translateY(0) scale(1);
    }
    /* Ukryj volume popup na mobile */
    #volume-popup {
        display: none !important;
    }
}

/* ===== WIDE DESKTOP (1440px+) ===== */
@media (min-width: 1440px) {
    .container { max-width: 1400px; margin-left: auto; margin-right: auto; }
    h1 { font-size: 6.5rem; }
    .section-header h2 { font-size: 3.2rem; }
}

/* ===== MID TABLET (900–1100px): siatki 3→2 kolumny ===== */
@media (max-width: 1100px) {
    div[style*="grid-template-columns: repeat(3, 1fr)"] {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    /* contact section padding */
    #contact > div:first-child { padding: 60px 44px !important; }
}

/* ===== SMALL PHONE (≤480px) ===== */
@media (max-width: 480px) {
    /* Formularz: imię + firma → 1 kolumna */
    div[style*="grid-template-columns: 1fr 1fr; gap: 16px"] {
        grid-template-columns: 1fr !important;
    }
    /* Stat boxes → pełna szerokość */
    .stat-box { width: 100% !important; }
    /* Contact padding */
    #contact > div:first-child { padding: 36px 20px !important; }
    /* Nagłówki z inline font-size */
    #contact h2 { font-size: 1.5rem !important; }
    #ekosystem h2 { font-size: 1.5rem !important; }
}

.card-exercise-badge {
    position: absolute;
    top: 16px;
    left: 16px;
    width: 58px;
    height: 58px;
    border-radius: 50%;
    background: rgba(30, 115, 185, 0.15);
    border: 1px solid rgba(30, 211, 255, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
}
.card-exercise-badge svg {
    width: 28px;
    height: 28px;
    stroke: var(--accent-cyan);
}
.card-exercise-badge .badge-num {
    position: absolute;
    bottom: -4px;
    right: -4px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-cyan), var(--accent-blue));
    color: #fff;
    font-family: var(--font-heading);
    font-size: 0.72rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 8px rgba(30, 211, 255, 0.4);
}

/* --- SCARF Simulator Specific Styles --- */
.simulator-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 40px;
    width: 100%;
    align-items: center;
}

.choice-btn {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    padding: 16px;
    border-radius: 15px;
    text-align: left;
    color: var(--text-main);
    font-size: 0.95rem;
    cursor: pointer;
    transition: 0.3s;
    display: flex;
    align-items: center;
    gap: 15px;
    width: 100%;
    margin-bottom: 12px;
}

.choice-btn:hover {
    background: rgba(30, 115, 185, 0.05);
    border-color: var(--accent-cyan);
    transform: translateX(8px);
}

.choice-btn span.letter {
    width: 28px;
    height: 28px;
    background: var(--accent-blue);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    flex-shrink: 0;
    font-size: 0.8rem;
}

#results-overlay {
    position: relative;
    width: 100%;
    max-width: 560px;
    margin: 0 auto;
    min-height: 400px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--glass-border);
    display: none;
    z-index: 100;
    justify-content: center;
    align-items: center;
    border-radius: 40px;
    padding: 30px 40px;
    text-align: center;
}
#results-overlay > div {
    max-width: 520px;
    width: 100%;
}

#results-chart-wrapper {
    margin: 0 auto 20px;
    display: flex;
    justify-content: center;
}

#results-chart-wrapper canvas {
    max-width: 100% !important;
    height: auto !important;
}

/* --- Enhancement Styles --- */
.progress-container {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.05);
    margin-bottom: 25px;
    border-radius: 2px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-cyan), var(--accent-blue));
    width: 0%;
    transition: 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 0 10px var(--accent-cyan);
}

.floating-impact {
    position: absolute;
    pointer-events: none;
    font-weight: 900;
    font-size: 1.2rem;
    animation: floatUp 1s ease-out forwards;
    z-index: 1000;
    text-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
}

@keyframes floatUp {
    0% {
        transform: translateY(0);
        opacity: 0;
    }
    30% {
        opacity: 1;
    }
    100% {
        transform: translateY(-40px);
        opacity: 1;
    }
}

.archetype-label {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--accent-magenta);
    font-weight: 700;
    margin-bottom: 5px;
    display: block;
}

/* --- Difficulty Overlay Styles --- */
#difficulty-overlay {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: stretch;
    padding: 40px 50px;
    width: 100%;
}

.diff-btn {
    width: 100%;
    padding: 18px 20px 18px 24px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
    cursor: pointer;
    transition: 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    text-align: left;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 18px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0,0,0,0.25), inset 0 1px 0 rgba(255,255,255,0.07);
}
.diff-btn::before {
    content: '';
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 4px;
    border-radius: 20px 0 0 20px;
    background: rgba(255,255,255,0.15);
    transition: 0.25s;
}
.diff-btn:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255,255,255,0.32);
    box-shadow: 0 8px 24px rgba(0,0,0,0.35), inset 0 1px 0 rgba(255,255,255,0.1);
}
.diff-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}
.diff-btn.junior::before  { background: #4ade80; }
.diff-btn.manager::before { background: #fbbf24; }
.diff-btn.director::before { background: #f87171; }
.diff-btn.junior  { border-color: rgba(74, 222, 128, 0.25); }
.diff-btn.manager { border-color: rgba(251, 191, 36, 0.25); }
.diff-btn.director { border-color: rgba(248, 113, 113, 0.25); }
.diff-btn.junior:hover  { border-color: rgba(74, 222, 128, 0.55);  box-shadow: 0 8px 28px rgba(74, 222, 128, 0.18), inset 0 1px 0 rgba(255,255,255,0.08); }
.diff-btn.manager:hover { border-color: rgba(251, 191, 36, 0.55);  box-shadow: 0 8px 28px rgba(251, 191, 36, 0.18), inset 0 1px 0 rgba(255,255,255,0.08); }
.diff-btn.director:hover { border-color: rgba(248, 113, 113, 0.55); box-shadow: 0 8px 28px rgba(248, 113, 113, 0.18), inset 0 1px 0 rgba(255,255,255,0.08); }

.diff-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
}
.diff-cta {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.2);
    background: rgba(255,255,255,0.06);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    color: rgba(255,255,255,0.5);
    transition: 0.25s;
}
.diff-btn:hover .diff-cta {
    background: rgba(255,255,255,0.14);
    border-color: rgba(255,255,255,0.4);
    color: #fff;
    transform: translateX(3px);
}
.diff-btn.junior:hover .diff-cta  { border-color: rgba(74, 222, 128, 0.6); color: #4ade80; }
.diff-btn.manager:hover .diff-cta { border-color: rgba(251, 191, 36, 0.6); color: #fbbf24; }
.diff-btn.director:hover .diff-cta { border-color: rgba(248, 113, 113, 0.6); color: #f87171; }

/* --- Brain Effects Section --- */
.brain-demo-card {
    cursor: pointer;
    user-select: none;
}
.brain-demo-card .demo-icon {
    width: 72px;
    height: 72px;
    border-radius: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin-bottom: 24px;
    flex-shrink: 0;
    transition: 0.4s;
}
.brain-demo-card .demo-tag {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 3px;
    font-weight: 700;
    margin-bottom: 10px;
    display: block;
}
.brain-demo-card h3 {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 800;
    color: #fff;
    margin-bottom: 14px;
}
.brain-demo-card p {
    color: var(--text-dim);
    font-size: 0.88rem;
    line-height: 1.7;
    flex: 1;
}
.demo-trigger-btn {
    margin-top: 28px;
    width: 100%;
    padding: 14px 20px;
    border-radius: 16px;
    border: 1px solid rgba(255,255,255,0.1);
    background: rgba(255,255,255,0.04);
    color: #fff;
    font-family: var(--font-heading);
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    transition: 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    letter-spacing: 0.3px;
}
.demo-trigger-btn:hover {
    background: rgba(255,255,255,0.08);
}
.demo-trigger-btn.active {
    background: rgba(30,115,185,0.15);
    border-color: var(--accent-cyan);
    color: var(--accent-cyan);
}
/* Stress Mode Effect */
@keyframes stress-vignette-pulse {
    0%   { opacity: 0.55; }
    50%  { opacity: 1; }
    100% { opacity: 0.55; }
}
html.brain-stress-mode body {
    filter: saturate(0.08) contrast(1.2) brightness(0.9);
    transition: filter 1s ease;
}
html.brain-stress-mode::after {
    content: '';
    position: fixed;
    inset: 0;
    background: radial-gradient(ellipse 100% 100% at 50% 50%,
        transparent 25%,
        rgba(200,0,0,0.35) 52%,
        rgba(230,0,0,0.75) 74%,
        rgba(220,0,0,1) 100%);
    animation: stress-vignette-pulse 2s ease-in-out infinite;
    pointer-events: none;
    z-index: 99999;
}
/* Peripheral blur — attentional narrowing */
html.brain-stress-mode::before {
    content: '';
    position: fixed;
    inset: 0;
    backdrop-filter: blur(7px);
    -webkit-mask-image: radial-gradient(circle 200px at var(--stress-x, 50%) var(--stress-y, 50%), transparent 20%, black 70%);
    mask-image: radial-gradient(circle 200px at var(--stress-x, 50%) var(--stress-y, 50%), transparent 20%, black 70%);
    pointer-events: none;
    z-index: 99997;
}
/* Dopamine Glow Effect (applied to the card itself) */
.brain-demo-card.dopamine-active {
    border-color: #B10A4A !important;
    box-shadow: 0 0 0 1px #B10A4A, 0 0 60px rgba(177,10,74,0.35) !important;
    transform: translateY(-10px) scale(1.02) !important;
}
.brain-demo-card.dopamine-active .demo-icon {
    box-shadow: 0 0 30px rgba(177,10,74,0.5);
}
/* Dopamine card hover warm glow */
.dopamine-card-hover {
    box-shadow: 0 0 0 1px rgba(255,190,60,0.6), 0 0 35px rgba(255,155,30,0.45), 0 0 80px rgba(255,100,0,0.2) !important;
    border-color: rgba(255,190,60,0.55) !important;
    transform: translateY(-5px) scale(1.01) !important;
    transition: box-shadow 0.25s ease, border-color 0.25s ease, transform 0.25s ease !important;
}
/* Gold coins */
.dopamine-coin {
    position: fixed;
    pointer-events: none;
    z-index: 9000;
    font-size: 1.4rem;
    user-select: none;
    animation: coin-fly var(--coin-dur, 1s) ease-out forwards;
    transform-origin: center;
}
@keyframes coin-fly {
    0%   { transform: translate(0,0) rotate(0deg) scale(1);   opacity: 1; }
    60%  { opacity: 1; }
    100% { transform: translate(var(--coin-dx,0px), var(--coin-dy,-120px)) rotate(var(--coin-rot,360deg)) scale(0.5); opacity: 0; }
}
/* Dollar counter przy kursorze */
#dopamine-counter {
    position: fixed;
    pointer-events: none;
    z-index: 9100;
    display: none;
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 900;
    color: #fbbf24;
    text-shadow: 0 0 12px rgba(251,191,36,0.8), 0 0 30px rgba(255,150,0,0.5);
    letter-spacing: 1px;
    transform: translate(18px, -10px);
    transition: none;
}
.dopamine-counter-pop {
    animation: counter-pop 0.25s ease-out;
}
@keyframes counter-pop {
    0%   { transform: translate(18px, -10px) scale(1.5); }
    100% { transform: translate(18px, -10px) scale(1); }
}
/* Drżenie amygdali — narastające */
@keyframes amygdala-shake-1 {
    0%,100% { transform: translate(0,0) rotate(0deg); }
    15% { transform: translate(-3px,-2px) rotate(-0.3deg); }
    35% { transform: translate(3px,2px) rotate(0.3deg); }
    55% { transform: translate(-2px,1px) rotate(-0.2deg); }
    75% { transform: translate(2px,-1px) rotate(0.2deg); }
}
@keyframes amygdala-shake-2 {
    0%,100% { transform: translate(0,0) rotate(0deg); }
    10% { transform: translate(-5px,-3px) rotate(-0.6deg); }
    25% { transform: translate(6px,4px) rotate(0.7deg); }
    40% { transform: translate(-7px,2px) rotate(-1deg); }
    55% { transform: translate(7px,-3px) rotate(1deg); }
    70% { transform: translate(-4px,5px) rotate(-0.6deg); }
    85% { transform: translate(4px,-4px) rotate(0.5deg); }
}
@keyframes amygdala-shake-3 {
    0%,100% { transform: translate(0,0) rotate(0deg); }
    8%  { transform: translate(-9px,-5px) rotate(-1.2deg); }
    20% { transform: translate(10px,6px) rotate(1.4deg); }
    33% { transform: translate(-11px,3px) rotate(-1.8deg); }
    46% { transform: translate(12px,-5px) rotate(2deg); }
    60% { transform: translate(-8px,7px) rotate(-1.4deg); }
    73% { transform: translate(8px,-6px) rotate(1.2deg); }
    86% { transform: translate(-5px,3px) rotate(-0.8deg); }
}
.amygdala-phase-1 { animation: amygdala-shake-1 0.18s infinite; }
.amygdala-phase-2 { animation: amygdala-shake-2 0.13s infinite; }
.amygdala-phase-3 { animation: amygdala-shake-3 0.09s infinite; }
/* Żółty błysk alarmu */
@keyframes amygdala-flash {
    0%,100% { opacity: 0; }
    50% { opacity: 1; }
}
#amygdala-overlay {
    display: none;
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 99998;
}
#amygdala-overlay.active { display: block; }
#amygdala-overlay .flash-layer {
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 80% 80% at 50% 50%, transparent 50%, rgba(251,191,36,0.25) 100%);
    animation: amygdala-flash 0.35s ease-in-out infinite;
}
/* Pulsujące bicie serca */
@keyframes amygdala-heartbeat {
    0%   { transform: scale(1); }
    14%  { transform: scale(1.004); }
    28%  { transform: scale(1); }
    42%  { transform: scale(1.007); }
    56%  { transform: scale(1); }
    100% { transform: scale(1); }
}
.amygdala-heartbeat { animation: amygdala-heartbeat 0.6s ease-in-out infinite; }

/* --- Dopamine Full-Page Effect --- */
body.dopamine-full-active::before {
    content: '';
    position: fixed;
    inset: 0;
    background: radial-gradient(ellipse 90% 70% at 50% 50%,
        rgba(177,10,74,0.12) 0%,
        rgba(251,191,36,0.07) 50%,
        transparent 75%);
    pointer-events: none;
    z-index: 7999;
    animation: dopamine-pulse-bg 1.6s ease-in-out infinite alternate;
}
@keyframes dopamine-pulse-bg {
    from { opacity: 0.4; }
    to   { opacity: 1; }
}
.neuro-floater {
    position: fixed;
    pointer-events: none;
    z-index: 8002;
    animation: neuro-float 2.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    user-select: none;
}
@keyframes neuro-float {
    0%   { transform: translateY(0)     scale(0.5) rotate(0deg);   opacity: 1; }
    60%  { opacity: 0.9; }
    100% { transform: translateY(-220px) scale(1.4) rotate(20deg); opacity: 0; }
}

/* Knowledge Pill Carousel */
.pill-carousel-section {
    background: none !important;
    border: none !important;
    padding: 0 !important;
    overflow: visible !important;
    cursor: default !important;
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.pill-carousel-section:hover::before { opacity: 0 !important; }
.pill-carousel-header { text-align: center; padding-top: 40px; }
.pill-section-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: var(--accent-magenta);
    font-weight: 700;
    display: block;
    margin-bottom: 8px;
}
.pill-section-title {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    color: #fff;
    font-weight: 700;
    margin: 0;
}
.pill-carousel-wrapper {
    overflow: hidden;
    position: relative;
    padding: 16px 0;
    -webkit-mask-image: linear-gradient(to right, transparent 0%, black 22%, black 78%, transparent 100%);
    mask-image: linear-gradient(to right, transparent 0%, black 22%, black 78%, transparent 100%);
}
.pill-carousel-track {
    display: flex;
    gap: 20px;
    will-change: transform;
}
.pill-card-item {
    flex: 0 0 400px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 30px;
    padding: 30px 35px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    opacity: 0.12;
    transform: scale(0.93);
    filter: blur(0.5px);
    transition: opacity 0.6s ease, transform 0.6s ease, border-color 0.6s ease, box-shadow 0.6s ease, filter 0.6s ease;
    min-height: 160px;
    justify-content: center;
    pointer-events: auto;
    cursor: pointer;
}
.pill-card-item.pill-active {
    opacity: 1;
    transform: scale(1);
    filter: none;
    border-color: var(--accent-magenta);
    box-shadow: 0 8px 40px rgba(177, 10, 74, 0.25);
    background: linear-gradient(135deg, rgba(177, 10, 74, 0.12), rgba(30, 115, 185, 0.06));
    cursor: default;
}
.pill-card-type {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: var(--accent-magenta);
    font-weight: 700;
}
.pill-card-text {
    color: var(--text-dim);
    font-size: 0.97rem;
    line-height: 1.65;
    font-style: italic;
    margin: 0;
}
.pill-card-item.pill-active .pill-card-text { color: var(--text-main); }
.pill-card-item { position: relative; }
.pill-progress-strip {
    position: absolute;
    bottom: 0;
    left: 30px;
    right: 30px;
    height: 3px;
    background: rgba(255,255,255,0.05);
    border-radius: 0;
    overflow: hidden;
    opacity: 0;
    transition: opacity 0.6s ease;
}
.pill-card-item.pill-active .pill-progress-strip {
    opacity: 1;
}
.pill-progress-fill {
    height: 100%;
    background: var(--accent-magenta);
    box-shadow: 0 0 8px var(--accent-magenta);
    width: 0%;
}

#music-widget {
    position: fixed;
    top: 41px;
    right: 12px;
    z-index: 999999;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}
#volume-popup {
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(10, 15, 30, 0.88);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 20px;
    padding: 10px 8px;
    backdrop-filter: blur(12px);
    opacity: 0;
    pointer-events: none;
    transform: translateY(-6px);
    transition: opacity 0.2s, transform 0.2s;
}
#music-widget:hover #volume-popup {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}
#volume-slider {
    -webkit-appearance: slider-vertical;
    appearance: slider-vertical;
    writing-mode: vertical-lr;
    direction: rtl;
    width: 6px;
    height: 70px;
    cursor: pointer;
    accent-color: var(--accent-cyan);
}
#music-toggle {
    background: rgba(255,255,255,0.07);
    border: 1px solid rgba(255,255,255,0.18);
    color: rgba(255,255,255,0.6);
    width: 43px;
    height: 43px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    cursor: pointer;
    backdrop-filter: blur(10px);
    transition: color 0.3s, border-color 0.3s, background 0.3s;
}
#music-toggle.playing {
    color: var(--accent-cyan);
    border-color: var(--accent-cyan);
    background: rgba(30, 211, 255, 0.08);
}

#scroll-to-top {
    position: fixed;
    bottom: 36px;
    right: 16px;
    background: linear-gradient(135deg, var(--accent-magenta), var(--accent-blue));
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    cursor: pointer;
    box-shadow: 0 8px 32px rgba(177, 10, 74, 0.5);
    z-index: 999999;
    border: 2px solid rgba(177, 10, 74, 0.6);
    opacity: 0;
    pointer-events: none;
    transform: translateY(20px) scale(0.85);
    transition: opacity 0.4s cubic-bezier(0.34, 1.56, 0.64, 1),
        transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1),
        box-shadow 0.3s ease;
}

#scroll-to-top.visible {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0) scale(1);
}

#scroll-to-top:hover {
    transform: translateY(-8px) scale(1.05);
    box-shadow: 0 8px 30px rgba(177, 10, 74, 0.8);
}
