/* Styling for Apple-Edition Encyclopedia */

body,
html {
    scroll-behavior: smooth;
}

.encyclopedia-container {
    width: 100%;
    padding-top: 100px;
}

.encyclopedia-intro {
    padding: 10vh 10%;
    text-align: center;
    margin-bottom: 5vh;
}

.hero-title {
    font-size: 5rem;
    margin-bottom: 1.5rem;
    letter-spacing: -0.04em;
    background: linear-gradient(135deg, #ffffff, #888888);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

[data-theme="light"] .hero-title {
    background: linear-gradient(135deg, #111111, #666666);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-size: 1.5rem;
    color: var(--text-muted);
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.6;
}

.encyclopedia-phase {
    margin-bottom: 8rem;
    scroll-margin-top: 80px;
}

.phase-hero {
    position: relative;
    width: 100%;
    height: 70vh;
    /* Immersive AI Render Shot */
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.phase-hero picture {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
    overflow: hidden;
    display: block;
}

.phase-hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, var(--bg-color) 0%, transparent 20%, transparent 80%, var(--bg-color) 100%);
    z-index: 2;
    pointer-events: none;
}

.parallax-img {
    position: absolute;
    top: -20%;
    left: 0;
    right: 0;
    width: 100%;
    height: 140%;
    object-fit: cover;
    object-position: center center;
    z-index: 1;
    opacity: 0.6;
    /* Ensure text readability over 3D image */
}

.phase-hero-text {
    position: relative;
    z-index: 3;
    text-align: center;
    max-width: 900px;
    padding: 2rem;
}

.phase-hero-text h1,
.phase-hero-text h2 {
    font-size: 4.5rem;
    color: var(--text-color);
    letter-spacing: -0.02em;
    text-shadow: 0 10px 40px var(--bg-color);
}

.phase-badge {
    background: rgba(255, 149, 0, 0.15);
    /* Subtler Orange */
    border: 1px solid rgba(255, 149, 0, 0.5);
    color: var(--accent);
    padding: 0.6rem 2rem;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    display: inline-block;
    margin-bottom: 2rem;
    backdrop-filter: blur(10px);
}

.phase-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    padding: 3rem 4%;
    max-width: 1480px;
    margin: 0 auto;
}

/* Feature Cards representing User's entries */
.feature-card {
    background: var(--surface);
    border: 1px solid var(--surface-border);
    border-radius: 24px;
    padding: 2.2rem 2.8rem;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), background 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    position: relative;
    cursor: pointer;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08), 0 2px 10px rgba(0, 0, 0, 0.03);
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    scroll-margin-top: 120px;
}

.feature-card:hover {
    transform: translateY(-8px);
    background: var(--surface-border);
    border-color: rgba(255, 149, 0, 0.55);
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.4), 0 0 25px rgba(255, 149, 0, 0.2);
}

/* Green dot replaced by Video Badge */
.feature-card::before {
    display: none !important;
}

/* Card Header Flex with Video Badge (1:1 with Genuss-Rezepte) */
.card-header-flex {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.15rem;
    width: 100%;
}

.card-module-tag {
    font-size: 0.84rem;
    font-weight: 600;
    color: var(--text-muted, #8e8e93) !important;
    letter-spacing: 0.04em;
    transition: color 0.35s cubic-bezier(0.16, 1, 0.3, 1), text-shadow 0.35s ease;
}

.feature-card:hover .card-module-tag {
    color: #ff9500 !important;
    text-shadow: 0 0 14px rgba(255, 149, 0, 0.45);
}

/* Ghost-to-Glow Video Badge (1:1 with Genuss-Rezepte) */
.card-video-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.28rem 0.8rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: var(--text-muted, #a1a1a6);
    font-size: 0.74rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: none;
    margin-left: auto;
    opacity: 0.75;
    pointer-events: none;
    z-index: 2;
}

.card-video-badge .badge-play-icon {
    font-size: 0.65rem;
    line-height: 1;
    color: var(--text-muted, #a1a1a6);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), color 0.3s ease;
}

.feature-card:hover .card-video-badge {
    opacity: 1;
    background: rgba(255, 149, 0, 0.15);
    border-color: rgba(255, 149, 0, 0.7);
    color: #ff9500;
    box-shadow: 0 0 18px rgba(255, 149, 0, 0.4);
    transform: translateY(-1px);
}

.feature-card:hover .card-video-badge .badge-play-icon {
    color: #ff9500;
    transform: translateX(2px);
}

[data-theme="light"] .card-module-tag {
    color: #636366 !important;
}

[data-theme="light"] .feature-card:hover .card-module-tag {
    color: #b81d2a !important;
    text-shadow: none;
}

[data-theme="light"] .card-video-badge {
    background: rgba(0, 0, 0, 0.04);
    border-color: rgba(0, 0, 0, 0.12);
    color: #636366;
    opacity: 0.8;
}

[data-theme="light"] .card-video-badge .badge-play-icon {
    color: #636366;
}

[data-theme="light"] .feature-card:hover .card-video-badge {
    background: rgba(255, 149, 0, 0.15);
    border-color: rgba(255, 149, 0, 0.7);
    color: var(--accent, #ff9500);
    box-shadow: 0 4px 15px rgba(255, 149, 0, 0.25);
}

[data-theme="light"] .feature-card:hover .card-video-badge .badge-play-icon {
    color: var(--accent, #ff9500);
    transform: translateX(2px);
}

.feature-card h3 {
    font-size: 1.45rem;
    margin-bottom: 0.75rem;
    color: var(--text-color);
    font-weight: 600;
    padding-right: 0;
    letter-spacing: -0.01em;
    transition: color 0.3s ease;
}

.feature-card p {
    font-size: 1.1rem;
    color: var(--text-muted);
    line-height: 1.55;
    font-weight: 300;
}

@media (max-width: 900px) {
    .phase-grid {
        grid-template-columns: 1fr;
        padding: 3rem 6%;
    }
}

@media (max-width: 768px) {
    .phase-hero {
        height: 50vh;
    }

    .hero-title {
        font-size: 3rem;
    }

    .phase-hero-text h1,
    .phase-hero-text h2 {
        font-size: 2.5rem;
    }

    .phase-grid {
        padding: 2rem 5%;
    }
}


/* Deep Dive Modal Styling */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
    transition: opacity 0.4s ease;
}

.modal-overlay.hidden {
    opacity: 0;
    pointer-events: none;
    visibility: hidden;
}

.modal-box {
    width: 90vw;
    height: 85vh;
    background: var(--bg-color);
    border: 1px solid var(--surface-border);
    border-radius: 30px;
    display: flex;
    box-shadow: 0 40px 100px rgba(0, 0, 0, 0.8);
    position: relative;
    overflow: hidden;
    transform: scale(1);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-overlay.hidden .modal-box {
    transform: scale(0.95);
}

.modal-close-btn {
    position: absolute;
    top: 1.8rem;
    right: 1.8rem;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1.5px solid rgba(255, 255, 255, 0.22);
    color: #ffffff;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.45);
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-close-btn svg {
    pointer-events: none;
    transition: transform 0.25s ease;
}

.modal-close-btn:hover {
    background: var(--accent);
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.45);
    transform: scale(1.1);
    box-shadow: 0 8px 25px rgba(230, 57, 70, 0.55);
}

.modal-close-btn:hover svg {
    transform: rotate(90deg);
}

.modal-close-btn:active {
    transform: scale(0.92);
}

[data-theme="light"] .modal-close-btn {
    background: rgba(0, 0, 0, 0.06);
    border-color: rgba(0, 0, 0, 0.15);
    color: #111111;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .modal-close-btn:hover {
    background: var(--accent);
    color: #ffffff;
    border-color: transparent;
}

@media (max-width: 900px) {
    .modal-box {
        flex-direction: column;
        overflow-y: auto;
        height: 90vh;
    }

    .modal-left,
    .modal-right {
        width: 100% !important;
        border-right: none !important;
    }

    .modal-right {
        height: auto;
        min-height: 280px;
        flex: none;
        order: -1;
        /* Image/Video on top */
    }

    .modal-visual-wrapper {
        padding: 3.6rem 1.2rem 1rem 1.2rem !important;
    }

    .modal-left {
        padding: 2rem 1.5rem !important;
        flex: none;
    }

    .modal-close-btn {
        top: 1rem;
        right: 1rem;
        width: 48px;
        height: 48px;
        background: rgba(15, 17, 23, 0.88);
        backdrop-filter: blur(16px);
        -webkit-backdrop-filter: blur(16px);
        border: 1.5px solid rgba(255, 255, 255, 0.35);
        color: #ffffff;
        box-shadow: 0 6px 24px rgba(0, 0, 0, 0.7);
        z-index: 60;
    }
}

.modal-left {
    width: 45%;
    padding: 3rem 2.8rem;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    border-right: 1px solid var(--surface-border);
    overflow-y: auto;
    max-height: 100%;
    scrollbar-width: thin;
    scrollbar-color: var(--surface-border) transparent;
}

.modal-left::-webkit-scrollbar {
    width: 6px;
}

.modal-left::-webkit-scrollbar-thumb {
    background: var(--surface-border);
    border-radius: 4px;
}

.modal-left::-webkit-scrollbar-thumb:hover {
    background: var(--accent);
}

.modal-badge {
    color: var(--accent);
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 0.8rem;
    font-size: 0.95rem;
}

.modal-left h2 {
    font-size: 2.5rem;
    margin-bottom: 1.3rem;
    line-height: 1.15;
    color: var(--text-color);
}

.modal-text {
    color: var(--text-muted);
    font-size: 1.15rem;
    line-height: 1.65;
    font-weight: 300;
}

.modal-anim-desc {
    margin-top: 1.3rem;
    padding: 1.1rem 0 1.1rem 1.2rem;
    border-left: 4px solid var(--accent);
    background: transparent;
    font-size: 1.05rem;
    color: var(--text-color);
    line-height: 1.6;
    font-weight: 500;
}

/* =========================================================
   BI-DIREKTIONALE VERNETZUNG: REZEPT-LINKS IM MODAL
   ========================================================= */
.modal-recipe-section {
    margin-top: 1.4rem;
    padding-top: 1.1rem;
    border-top: 1px solid var(--surface-border);
}

.modal-recipe-box {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--surface-border);
    border-radius: 18px;
    padding: 1.3rem 1.4rem;
    backdrop-filter: blur(12px);
    transition: all 0.3s ease;
}

[data-theme="light"] .modal-recipe-box {
    background: rgba(0, 0, 0, 0.025);
    border-color: rgba(0, 0, 0, 0.08);
}

.modal-recipe-header {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 0.85rem;
}

.modal-recipe-header-icon {
    font-size: 1.25rem;
}

.modal-recipe-header-title {
    font-size: 0.95rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--accent);
}

.modal-recipe-list {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    margin-bottom: 0.95rem;
}

.modal-recipe-link {
    display: flex !important;
    align-items: center !important;
    gap: 0.7rem !important;
    padding: 0.75rem 1.1rem !important;
    background: rgba(255, 255, 255, 0.04) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-radius: 12px !important;
    color: var(--text-color, #ffffff) !important;
    text-decoration: none !important;
    font-size: 1.02rem !important;
    font-weight: 500 !important;
    line-height: 1.35 !important;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

[data-theme="light"] .modal-recipe-link {
    background: #ffffff !important;
    border-color: rgba(0, 0, 0, 0.07) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04) !important;
    color: #111111 !important;
}

.modal-recipe-link:hover {
    background: rgba(230, 57, 70, 0.12) !important;
    border-color: var(--accent) !important;
    color: var(--text-color, #ffffff) !important;
    transform: translateX(6px) !important;
}

[data-theme="light"] .modal-recipe-link:hover {
    color: var(--accent) !important;
}

.modal-recipe-link .recipe-arrow {
    color: var(--accent) !important;
    font-size: 1.15rem !important;
    flex-shrink: 0 !important;
    transition: transform 0.2s ease !important;
}

.modal-recipe-link:hover .recipe-arrow {
    transform: translateX(3px) !important;
}

.modal-recipe-link .recipe-name {
    flex: 1 !important;
}

.modal-recipe-footer {
    display: flex;
    align-items: center;
    margin-top: 0.6rem;
}

.modal-recipe-cta-btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0.5rem !important;
    width: 100% !important;
    padding: 0.85rem 1.4rem !important;
    background: linear-gradient(135deg, var(--accent) 0%, #ff8235 100%) !important;
    color: #ffffff !important;
    text-decoration: none !important;
    border-radius: 50px !important;
    font-size: 0.98rem !important;
    font-weight: 600 !important;
    letter-spacing: -0.01em !important;
    box-shadow: 0 4px 18px rgba(230, 57, 70, 0.35) !important;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important;
    box-sizing: border-box !important;
}

.modal-recipe-cta-btn:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 25px rgba(230, 57, 70, 0.5) !important;
    filter: brightness(1.05) !important;
    color: #ffffff !important;
}

/* Synthesizer Live Status Bar on aroma.html */
.synth-live-bar {
    flex-basis: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    margin-top: 1.5rem;
    padding: 0.85rem 1.6rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--surface-border);
    border-radius: 50px;
    font-size: 0.95rem;
    color: var(--text-color);
    backdrop-filter: blur(12px);
    transition: all 0.3s ease;
}

.synth-live-badge {
    background: var(--accent);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 0.25rem 0.7rem;
    border-radius: 20px;
}

.modal-right {
    width: 55%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-color);
}

.modal-visual-svg {
    width: 80%;
    height: 80%;
}

/* Aroma Synthesizer Settings Panel */
.aroma-synthesizer {
    background: var(--surface);
    border: 1px solid var(--surface-border);
    border-radius: 24px;
    padding: 3rem;
    margin: 0 auto 4rem auto;
    max-width: 1200px;
    display: flex;
    flex-wrap: wrap;
    gap: 3rem;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.synth-slider-group {
    flex: 1;
    min-width: 220px;
    /* Allows 4 sliders to fit nicely in 1200px */
    display: flex;
    flex-direction: column;
}

/* Toggles Layer */
.synth-toggles-layer {
    flex-basis: 100%;
    display: flex;
    justify-content: center;
    gap: 4rem;
    margin-top: 2rem;
    padding-top: 3rem;
    border-top: 1px solid var(--surface-border);
}

.synth-toggle-group {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.toggle-text {
    display: flex;
    flex-direction: column;
}

.toggle-text strong {
    font-size: 1.1rem;
    margin-bottom: 0.2rem;
}

.toggle-sub {
    font-size: 0.8rem;
    color: #888;
}

/* Apple iOS Switch CSS */
.apple-switch-wrapper {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 34px;
}

.apple-switch-wrapper input {
    opacity: 0;
    width: 0;
    height: 0;
}

.apple-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--surface-border);
    transition: .4s;
    border-radius: 34px;
    border: 1px solid var(--surface-border);
}

.apple-slider:before {
    position: absolute;
    content: "";
    height: 26px;
    width: 26px;
    left: 4px;
    bottom: 3px;
    background-color: white;
    transition: .4s cubic-bezier(0.18, 0.89, 0.32, 1.28);
    border-radius: 50%;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
}

input:checked+.apple-slider {
    background-color: #34c759;
    /* Green active by default, though we might want colors per switch? */
    border-color: #34c759;
}

#toggle-trouble:checked+.apple-slider {
    background-color: #ff3b30;
    border-color: #ff3b30;
}

#toggle-seeds:checked+.apple-slider {
    background-color: #8a5c32;
    border-color: #8a5c32;
}

input:checked+.apple-slider:before {
    transform: translateX(26px);
}

.synth-slider-group label {
    font-size: 1.1rem;
    color: #a1a1a6;
    margin-bottom: 1.5rem;
    font-weight: 300;
}

.synth-slider-group label strong {
    color: var(--text-color);
    font-weight: 600;
    margin-left: 0.5rem;
}

/* Apple-Style Range Input */
input[type=range] {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 40px;
    /* Big interaction area vertically */
    background: transparent;
    cursor: pointer;
    margin: 10px 0;
    /* Add some space above/below to push elements away from the thumb */
    position: relative;
    z-index: 10;
    /* Ensures the slider thumb is always clickable and not blocked by overflowing labels */
}

input[type=range]:focus {
    outline: none;
}

input[type=range]::-webkit-slider-runnable-track {
    width: 100%;
    height: 8px;
    background: var(--surface-border);
    border-radius: 4px;
    border: 1px solid var(--surface-border);
}

input[type=range]::-webkit-slider-thumb {
    -webkit-appearance: none;
    height: 24px;
    width: 24px;
    border-radius: 50%;
    background: #ffffff;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.6), inset 0 1px 3px rgba(255, 255, 255, 0.8);
    margin-top: -8px;
    /* (8px track height - 24px thumb height) / 2 = -8px */
    transition: transform 0.2s cubic-bezier(0.18, 0.89, 0.32, 1.28), box-shadow 0.2s ease;
    cursor: grab;
}

input[type=range]:active::-webkit-slider-thumb {
    transform: scale(1.15);
    cursor: grabbing;
}

.synth-ticks {
    display: flex;
    justify-content: space-between;
    margin-top: 2rem;
    font-size: 0.8rem;
    color: #888;
    font-weight: 600;
    text-transform: uppercase;
    padding-bottom: 4rem;
    /* more space for rotated text */
}

.synth-ticks span {
    width: 200px;
    margin: 0 -100px;
    /* Places center exactly at the flex space node */
    box-sizing: border-box;
    text-align: right;
    padding-right: 105px;
    /* Leaves 5px margin left of the pivot */
    padding-top: 5px;
    /* Pushes text down 5px from the pivot */
    position: relative;
    transform: rotate(-45deg);
    /* Text climbs an uphill slope */
    transform-origin: top center;
    /* Pivots around X=100px, Y=0px */
    white-space: nowrap;
}

.synth-ticks span::before {
    content: '';
    position: absolute;
    top: -15px;
    /* Extends upwards from pivot */
    left: 50%;
    /* Center at X=100px */
    margin-left: -1px;
    width: 2px;
    height: 15px;
    /* Meets the pivot exactly at Y=0px */
    background: rgba(255, 255, 255, 0.4);
    transform: rotate(45deg);
    /* Counters parent rotation */
    transform-origin: bottom center;
    /* Pivots around X=100px, Y=0px */
}

/* Interactive Card States */
.aroma-card {
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.aroma-card.dimmed-aroma {
    display: none !important;
}

.aroma-card.active-aroma {
    opacity: 1;
    filter: none;
    transform: scale(1.02);
    box-shadow: 0 0 30px rgba(255, 255, 255, 0.02);
}

.modal-visual-svg text {
    text-shadow: 0px 0px 8px #000, 0px 0px 12px #000;
    pointer-events: none;
    z-index: 999;
    /* Note: SVG elements don't inherently respect z-index against their siblings, so we also rely on DOM order in JS */
}

/* Aroma Card Image Styles */
.aroma-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.aroma-card .card-text-content {
    flex: 1;
    min-width: 0;
}

.aroma-card .card-img-wrapper {
    flex-shrink: 0;
    margin-left: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.aroma-card .card-img-wrapper picture {
    display: contents;
}

.aroma-card-img {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--surface-border);
    transition: all 0.4s ease;
    filter: brightness(0.8) grayscale(0.2);
}

.feature-card.aroma-card:hover .aroma-card-img {
    filter: brightness(1.1) grayscale(0);
    border-color: var(--accent);
    transform: scale(1.15);
    box-shadow: 0 0 20px rgba(255, 149, 0, 0.4);
}

/* =========================================================================
   PWA (PROGRESSIVE WEB APP) STYLING & MODALS
   ========================================================================= */

.header-actions {
    position: absolute;
    right: 40px;
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 1000;
}

.header-actions .theme-btn,
.header-actions .pwa-install-btn {
    position: static !important;
    right: auto !important;
    top: auto !important;
    margin: 0 !important;
}

@media all and (display-mode: standalone) {
    .pwa-install-btn,
    #pwa-install-btn,
    .pwa-floating-banner {
        display: none !important;
    }
}

.pwa-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.78);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.pwa-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.pwa-modal-box {
    background: rgba(18, 18, 22, 0.96);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 24px;
    max-width: 450px;
    width: 100%;
    padding: 28px 24px 22px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.8), 0 0 40px rgba(230, 57, 70, 0.12);
    position: relative;
    transform: translateY(20px) scale(0.96);
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    color: #f0f0f0;
    font-family: 'Outfit', sans-serif;
    box-sizing: border-box;
}

[data-theme="light"] .pwa-modal-box {
    background: rgba(255, 255, 255, 0.98);
    border-color: rgba(0, 0, 0, 0.12);
    color: #1a1a1a;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.18);
}

.pwa-modal-overlay.active .pwa-modal-box {
    transform: translateY(0) scale(1);
}

.pwa-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: transparent;
    border: none;
    font-size: 1.3rem;
    color: inherit;
    opacity: 0.6;
    cursor: pointer;
    padding: 6px;
    line-height: 1;
    transition: opacity 0.2s, transform 0.2s;
}

.pwa-modal-close:hover {
    opacity: 1;
    transform: scale(1.1);
}

.pwa-modal-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
}

.pwa-modal-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
    object-fit: cover;
    flex-shrink: 0;
}

.pwa-modal-title {
    font-size: 1.35rem;
    font-weight: 600;
    margin: 0;
    letter-spacing: -0.3px;
    color: inherit;
}

.pwa-modal-sub {
    font-size: 0.88rem;
    color: var(--text-muted, #a1a1a6);
    margin: 3px 0 0 0;
    line-height: 1.3;
}

.pwa-modal-steps {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin: 18px 0 22px;
}

.pwa-step {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 12px 14px;
    border-radius: 14px;
}

[data-theme="light"] .pwa-step {
    background: rgba(0, 0, 0, 0.03);
    border-color: rgba(0, 0, 0, 0.08);
}

.pwa-step-num {
    background: var(--accent);
    color: #fff;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 700;
    flex-shrink: 0;
    margin-top: 2px;
}

.pwa-step-content {
    flex: 1;
    font-size: 0.95rem;
    line-height: 1.45;
}

.pwa-step-content p {
    margin: 0 0 6px 0;
}

.pwa-step-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    padding: 4px 10px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    color: inherit;
}

[data-theme="light"] .pwa-step-badge {
    background: rgba(0, 0, 0, 0.06);
    border-color: rgba(0, 0, 0, 0.12);
}

.pwa-badge-highlight {
    border-color: var(--accent);
    color: var(--accent);
}

.pwa-modal-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding-top: 16px;
    text-align: center;
}

[data-theme="light"] .pwa-modal-footer {
    border-top-color: rgba(0, 0, 0, 0.08);
}

.pwa-footer-note {
    font-size: 0.8rem;
    color: var(--text-muted, #8e8e93);
    margin: 0 0 14px 0;
    line-height: 1.35;
}

.pwa-modal-confirm-btn {
    width: 100%;
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: 50px;
    padding: 12px 20px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: transform 0.2s, box-shadow 0.2s;
}

.pwa-modal-confirm-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(230, 57, 70, 0.35);
}

/* PWA Mobile Floating Banner */
.pwa-floating-banner {
    position: fixed;
    bottom: 18px;
    left: 14px;
    right: 14px;
    max-width: 440px;
    margin: 0 auto;
    background: rgba(18, 18, 22, 0.95);
    border: 1px solid rgba(230, 57, 70, 0.35);
    border-radius: 18px;
    padding: 10px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    z-index: 9999;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6), 0 0 20px rgba(230, 57, 70, 0.15);
    animation: pwaSlideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    font-family: 'Outfit', sans-serif;
    box-sizing: border-box;
}

[data-theme="light"] .pwa-floating-banner {
    background: rgba(255, 255, 255, 0.96);
    border-color: rgba(184, 29, 42, 0.4);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

@keyframes pwaSlideUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

.pwa-banner-content {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.pwa-banner-icon {
    width: 36px;
    height: 36px;
    border-radius: 9px;
    flex-shrink: 0;
}

.pwa-banner-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.pwa-banner-text strong {
    font-size: 0.92rem;
    color: var(--text-color, #fff);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pwa-banner-text span {
    font-size: 0.76rem;
    color: var(--text-muted, #a1a1a6);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pwa-banner-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.pwa-banner-install-btn {
    background: var(--accent);
    color: #fff;
    border: none;
    padding: 7px 14px;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: transform 0.2s, box-shadow 0.2s;
}

.pwa-banner-install-btn:hover {
    transform: scale(1.03);
}

.pwa-banner-close-btn {
    background: transparent;
    border: none;
    color: var(--text-muted, #8e8e93);
    font-size: 1.1rem;
    cursor: pointer;
    padding: 4px 6px;
    line-height: 1;
}

/* =========================================================================
   DEEP DIVE MODAL VIDEO PLAYERS & MEDIA TABS (ROUNDED CORNERS + CURSOR FOLLOWER)
   ========================================================================= */

/* Deep Dive Modal Video */
.modal-visual-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    padding: clamp(6.6rem, calc(4.2rem + 3.8vh), 9.2rem) 3rem 2rem 3rem;
    box-sizing: border-box;
}

.modal-media-tabs {
    display: none !important;
}

.modal-video-card {
    position: relative;
    width: 100%;
    max-width: 960px;
    max-height: calc(85vh - clamp(8.5rem, calc(6rem + 4vh), 11rem));
    aspect-ratio: 16 / 9;
    border-radius: 28px;
    overflow: hidden;
    background: #0a0b0e;
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 35px 85px rgba(0, 0, 0, 0.75);
    cursor: none; /* Mouse becomes follower pill */
    user-select: none;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.modal-video-card:hover {
    border-color: rgba(255, 149, 0, 0.5);
    box-shadow: 0 40px 95px rgba(0, 0, 0, 0.85), 0 0 40px rgba(255, 149, 0, 0.18);
}

.modal-video-card video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: inherit;
    display: block;
}

/* Modal Center Play Button */
.modal-video-play-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 88px;
    height: 88px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1.5px solid rgba(255, 255, 255, 0.3);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), background 0.3s ease, opacity 0.3s ease;
    box-shadow: 0 15px 35px rgba(0,0,0,0.6);
    z-index: 4;
}

.modal-video-play-btn svg {
    margin-left: 4px;
}

.modal-video-card:hover .modal-video-play-btn {
    transform: translate(-50%, -50%) scale(1.08);
    background: rgba(255, 149, 0, 0.85);
    border-color: rgba(255, 255, 255, 0.7);
}

.modal-video-card.is-playing .modal-video-play-btn {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.7);
}

/* Modal Follower Pill */
.modal-follower-pill {
    position: absolute;
    top: 0;
    left: 0;
    transform: translate(-50%, -50%) scale(0);
    opacity: 0;
    pointer-events: none;
    background: #ffffff;
    color: #0f1015;
    padding: 10px 20px;
    border-radius: 9999px;
    font-family: 'Outfit', sans-serif;
    font-size: 0.92rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.4);
    z-index: 10;
    white-space: nowrap;
    will-change: transform, opacity;
}

/* Graphic Container in Modal */
.modal-graphic-view {
    width: 100%;
    flex: 1;
    min-height: 260px;
    max-height: 480px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Mobile & Touch Support */
@media (hover: none) and (pointer: coarse), (max-width: 768px) {
    .modal-video-card {
        cursor: pointer;
        border-radius: 20px;
    }
    .modal-follower-pill {
        display: none !important;
    }
    .modal-video-play-btn {
        width: 60px;
        height: 60px;
    }
    .modal-visual-wrapper {
        padding: 3.8rem 1rem 1rem 1rem;
    }
}

/* Aroma Science & Perception Overview */
.aroma-science-wrapper {
    max-width: 1200px;
    margin: 0 auto 3.5rem auto;
    padding: 0 1.5rem;
}

.aroma-science-header {
    text-align: center;
    max-width: 980px;
    margin: 0 auto 2.5rem auto;
}

.aroma-science-badge {
    background: rgba(255, 149, 0, 0.12);
    border: 1px solid rgba(255, 149, 0, 0.4);
    color: var(--accent);
    padding: 0.45rem 1.6rem;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    display: inline-block;
    margin-bottom: 1.2rem;
    backdrop-filter: blur(10px);
}

.aroma-science-title {
    font-size: 2.8rem;
    color: var(--text-color);
    letter-spacing: -0.02em;
    line-height: 1.25;
    margin-bottom: 1.5rem;
}

.aroma-science-lead {
    font-size: 1.5rem;
    color: var(--text-muted);
    line-height: 1.6;
    max-width: 900px;
    margin: 0 auto;
}

.aroma-science-lead strong {
    color: var(--text-color);
}

/* Aroma Accordions Container */
.aroma-accordions-container {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    max-width: 980px;
    margin: 2.5rem auto 0 auto;
}

.aroma-accordion {
    background: var(--surface);
    border: 1px solid var(--surface-border);
    border-radius: 20px;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.04);
    transition: border-color 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
    overflow: hidden;
}

.aroma-accordion:hover {
    border-color: rgba(255, 149, 0, 0.3);
}

.aroma-accordion[open] {
    border-color: rgba(255, 149, 0, 0.45);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.08);
}

.aroma-accordion-header {
    cursor: pointer;
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.6rem 2.2rem;
    user-select: none;
    transition: background 0.2s ease;
}

.aroma-accordion-header::-webkit-details-marker {
    display: none;
}

.aroma-accordion-header:hover {
    background: rgba(255, 255, 255, 0.02);
}

[data-theme="light"] .aroma-accordion-header:hover {
    background: rgba(0, 0, 0, 0.02);
}

.accordion-header-left {
    display: flex;
    align-items: center;
    gap: 1.4rem;
}

.accordion-icon {
    font-size: 2rem;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    background: rgba(255, 149, 0, 0.08);
    border-radius: 14px;
    border: 1px solid rgba(255, 149, 0, 0.2);
    flex-shrink: 0;
}

.accordion-title-wrap {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.accordion-title {
    font-size: 1.45rem;
    font-weight: 600;
    color: var(--text-color);
    letter-spacing: -0.01em;
}

.accordion-sub {
    font-size: 0.95rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--accent);
}

.accordion-chevron {
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    flex-shrink: 0;
}

.aroma-accordion[open] .accordion-chevron {
    transform: rotate(180deg);
}

.aroma-accordion-body {
    padding: 1.4rem 2.2rem 2.2rem 2.2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

[data-theme="light"] .aroma-accordion-body {
    border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.aroma-accordion-body p {
    font-size: 1.25rem;
    line-height: 1.7;
    color: var(--text-muted);
    margin-bottom: 1.2rem;
}

.aroma-accordion-body p strong {
    color: var(--text-color);
}

.aroma-accordion-body p em {
    color: var(--text-color);
    font-style: italic;
}

.aroma-science-list {
    list-style: none;
    padding: 0;
    margin: 0.6rem 0 1.4rem 0;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.aroma-science-list li {
    font-size: 1.2rem;
    line-height: 1.65;
    color: var(--text-muted);
    position: relative;
    padding-left: 1.6rem;
}

.aroma-science-list li::before {
    content: "•";
    position: absolute;
    left: 0;
    top: 0;
    color: var(--accent);
    font-weight: bold;
    font-size: 1.3rem;
    line-height: 1.2;
}

.aroma-science-list li strong {
    color: var(--text-color);
}

.aroma-memory-note {
    background: rgba(255, 255, 255, 0.03);
    border-left: 3px solid var(--accent);
    padding: 1.2rem 1.4rem;
    border-radius: 0 14px 14px 0;
    font-size: 1.18rem !important;
    color: var(--text-muted);
    line-height: 1.65;
}

.aroma-memory-note strong {
    color: var(--text-color);
}

.aroma-memory-note em {
    color: var(--text-color);
    font-style: italic;
}

[data-theme="light"] .aroma-memory-note {
    background: rgba(0, 0, 0, 0.03);
}

/* Responsive adjustment for Mobile */
@media (max-width: 900px) {
    .aroma-accordion-header {
        padding: 1.3rem 1.3rem;
    }
    .accordion-header-left {
        gap: 0.9rem;
    }
    .accordion-icon {
        width: 44px;
        height: 44px;
        font-size: 1.6rem;
    }
    .accordion-title {
        font-size: 1.2rem;
        line-height: 1.35;
    }
    .accordion-sub {
        font-size: 0.82rem;
    }
    .aroma-accordion-body {
        padding: 1rem 1.3rem 1.8rem 1.3rem;
    }
    .aroma-accordion-body p {
        font-size: 1.15rem;
        line-height: 1.6;
    }
    .aroma-science-list li {
        font-size: 1.1rem;
        line-height: 1.6;
    }
    .aroma-memory-note {
        font-size: 1.05rem !important;
    }
    .aroma-science-title {
        font-size: 2rem;
    }
    .aroma-science-lead {
        font-size: 1.25rem;
        line-height: 1.55;
    }
}

/* ========================================================
   WISSEN SEARCH & LIVE-FILTER BAR
   ======================================================== */
.wissen-search-section {
    max-width: 820px;
    margin: -1.5rem auto 4.5rem auto;
    padding: 0 1.5rem;
    position: relative;
    z-index: 50;
}

.wissen-search-wrapper {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.search-input-box {
    position: relative;
    display: flex;
    align-items: center;
    background: rgba(22, 22, 24, 0.75);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1.5px solid rgba(255, 255, 255, 0.12);
    border-radius: 50px;
    padding: 0.75rem 1.6rem;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.35);
}

.search-input-box:focus-within {
    border-color: #f4d03f;
    box-shadow: 0 0 30px rgba(244, 208, 63, 0.25), 0 12px 35px rgba(0, 0, 0, 0.45);
    background: rgba(28, 28, 30, 0.92);
}

[data-theme="light"] .search-input-box {
    background: rgba(255, 255, 255, 0.9);
    border: 1.5px solid rgba(0, 0, 0, 0.12);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .search-input-box:focus-within {
    border-color: var(--accent);
    box-shadow: 0 0 25px rgba(184, 29, 42, 0.2), 0 10px 30px rgba(0, 0, 0, 0.1);
    background: #ffffff;
}

.search-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    margin-right: 0.6rem;
    transition: color 0.3s ease;
}

.search-input-box:focus-within .search-icon {
    color: #f4d03f;
}

[data-theme="light"] .search-input-box:focus-within .search-icon {
    color: var(--accent);
}

.wissen-search-input {
    flex: 1;
    border: none;
    outline: none;
    background: transparent;
    font-size: 1.15rem;
    font-family: 'Outfit', sans-serif;
    color: var(--text-color);
    padding: 0.5rem 0.2rem;
}

.wissen-search-input::placeholder {
    color: var(--text-muted);
    opacity: 0.7;
}

.search-clear-btn {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: var(--text-muted);
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    margin-right: 0.6rem;
    transition: all 0.2s ease;
}

.search-clear-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    color: var(--text-color);
    transform: scale(1.1);
}

[data-theme="light"] .search-clear-btn {
    background: rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .search-clear-btn:hover {
    background: rgba(0, 0, 0, 0.12);
}

.search-clear-btn.hidden {
    display: none !important;
}

/* Empty State */
.search-no-results {
    text-align: center;
    padding: 3.5rem 2rem;
    background: rgba(25, 25, 25, 0.5);
    border: 1px dashed rgba(255, 255, 255, 0.15);
    border-radius: 20px;
    margin-top: 1.5rem;
    backdrop-filter: blur(10px);
}

[data-theme="light"] .search-no-results {
    background: rgba(255, 255, 255, 0.7);
    border: 1px dashed rgba(0, 0, 0, 0.15);
}

.search-no-results.hidden {
    display: none !important;
}

.no-results-icon {
    font-size: 2.8rem;
    margin-bottom: 0.8rem;
    opacity: 0.85;
}

.search-no-results h3 {
    font-size: 1.4rem;
    margin-bottom: 0.6rem;
    color: var(--text-color);
}

.search-no-results p {
    font-size: 1.05rem;
    color: var(--text-muted);
    max-width: 520px;
    margin: 0 auto 1.4rem auto;
    line-height: 1.6;
}

.reset-filter-btn {
    background: var(--accent);
    color: #fff;
    border: none;
    padding: 10px 24px;
    border-radius: 25px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    font-family: 'Outfit', sans-serif;
    transition: transform 0.2s, box-shadow 0.2s;
}

.reset-filter-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(230, 57, 70, 0.4);
}

/* Filter Visibility Classes */
.feature-card.is-search-hidden {
    display: none !important;
}

.encyclopedia-phase.is-phase-hidden {
    display: none !important;
}


/* ========================================================
   DESKTOP STICKY PHASEN-LEISTE (Rail am Rand)
   ======================================================== */
.phase-nav-rail {
    position: fixed;
    right: 24px;
    top: 52%;
    transform: translateY(-50%);
    z-index: 850;
    display: flex;
    flex-direction: column;
    pointer-events: auto;
}

.phase-nav-rail-inner {
    background: rgba(18, 18, 20, 0.78);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 36px;
    padding: 10px 8px;
    box-shadow: 0 16px 45px rgba(0, 0, 0, 0.55);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-theme="light"] .phase-nav-rail-inner {
    background: rgba(255, 255, 255, 0.88);
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.1);
}

.rail-header {
    padding: 4px 6px 6px 6px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    width: 100%;
    text-align: center;
    margin-bottom: 2px;
}

[data-theme="light"] .rail-header {
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.rail-title {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    opacity: 0.8;
}

.rail-items {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.rail-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 7px 9px;
    border-radius: 30px;
    text-decoration: none;
    color: var(--text-muted);
    font-size: 0.88rem;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    border: 1px solid transparent;
}

.rail-num {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.06);
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-muted);
    transition: all 0.25s ease;
    flex-shrink: 0;
}

[data-theme="light"] .rail-num {
    background: rgba(0, 0, 0, 0.05);
}

.rail-label {
    white-space: nowrap;
    font-weight: 500;
    opacity: 0;
    max-width: 0;
    overflow: hidden;
    transition: max-width 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s ease;
}

.rail-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transition: all 0.25s ease;
    flex-shrink: 0;
}

[data-theme="light"] .rail-dot {
    background: rgba(0, 0, 0, 0.15);
}

/* Hover over entire rail expands the labels smoothly */
.phase-nav-rail-inner:hover .rail-label {
    opacity: 1;
    max-width: 170px;
    margin-right: 6px;
}

.rail-item:hover {
    color: var(--text-color);
    background: rgba(255, 255, 255, 0.08);
}

[data-theme="light"] .rail-item:hover {
    background: rgba(0, 0, 0, 0.04);
}

.rail-item:hover .rail-num {
    background: rgba(244, 208, 63, 0.2);
    color: #f4d03f;
}

[data-theme="light"] .rail-item:hover .rail-num {
    background: rgba(184, 29, 42, 0.15);
    color: var(--accent);
}

/* Active State */
.rail-item.active {
    color: #f4d03f;
    background: rgba(244, 208, 63, 0.12);
    border-color: rgba(244, 208, 63, 0.35);
}

[data-theme="light"] .rail-item.active {
    color: var(--accent);
    background: rgba(184, 29, 42, 0.1);
    border-color: rgba(184, 29, 42, 0.3);
}

.rail-item.active .rail-num {
    background: #f4d03f;
    color: #111111;
    box-shadow: 0 0 10px rgba(244, 208, 63, 0.5);
}

[data-theme="light"] .rail-item.active .rail-num {
    background: var(--accent);
    color: #ffffff;
    box-shadow: 0 0 10px rgba(184, 29, 42, 0.4);
}

.rail-item.active .rail-dot {
    background: #f4d03f;
    box-shadow: 0 0 8px #f4d03f;
}

[data-theme="light"] .rail-item.active .rail-dot {
    background: var(--accent);
    box-shadow: 0 0 8px var(--accent);
}

.rail-item.active .rail-label {
    font-weight: 600;
}

/* Hide side rail on mobile / tablet (< 1024px) */
@media (max-width: 1023px) {
    .phase-nav-rail {
        display: none !important;
    }
    .wissen-search-section {
        margin: 0 auto 3rem auto;
        padding: 0 1rem;
    }
    .search-input-box {
        padding: 0.5rem 1rem;
    }
    .wissen-search-input {
        font-size: 1rem;
    }
}


