/* ==========================================================================
   WISSEN.CSS - Genuss-Rezepte.ch Wissens-Matrix (1:1 Coolbaker Parität)
   ========================================================================== */

body,
html {
    scroll-behavior: smooth;
}

.encyclopedia-container {
    width: 100%;
    padding-top: 100px;
}

.encyclopedia-intro {
    padding: 8vh 8% 4vh;
    text-align: center;
    margin-bottom: 2vh;
}

.hero-title {
    font-size: clamp(3rem, 6vw, 5rem);
    margin-bottom: 1.5rem;
    letter-spacing: -0.04em;
    font-weight: 800;
    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: clamp(1.1rem, 2vw, 1.45rem);
    color: var(--text-muted);
    max-width: 820px;
    margin: 0 auto;
    line-height: 1.6;
}

/* --- Phasen & Module --- */
.encyclopedia-phase {
    margin-bottom: 7rem;
    scroll-margin-top: 90px;
    transition: opacity 0.3s ease;
}

.encyclopedia-phase.is-phase-hidden {
    display: none !important;
}

.phase-hero {
    position: relative;
    width: 100%;
    height: 65vh;
    min-height: 420px;
    max-height: 600px;
    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 25%, transparent 75%, 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.65;
    transition: opacity 0.4s ease;
}

[data-theme="light"] .parallax-img {
    opacity: 0.85;
}

.phase-hero-text {
    position: relative;
    z-index: 3;
    text-align: center;
    max-width: 950px;
    padding: 2rem;
}

.phase-hero-text h1,
.phase-hero-text h2 {
    font-size: clamp(2.4rem, 5vw, 4.2rem);
    color: var(--text-color);
    letter-spacing: -0.02em;
    font-weight: 800;
    text-shadow: 0 10px 40px var(--bg-color);
    line-height: 1.15;
}

.phase-badge {
    background: rgba(223, 175, 96, 0.15);
    border: 1px solid rgba(223, 175, 96, 0.5);
    color: var(--accent);
    padding: 0.6rem 2rem;
    border-radius: 50px;
    font-size: 0.95rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    display: inline-block;
    margin-bottom: 1.5rem;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

/* --- Phase Grid: Strikt 2-spaltig auf Desktop (Coolbaker Regel 6) --- */
.phase-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    padding: 3rem 4%;
    max-width: 1480px;
    margin: 0 auto;
}

/* Feature Cards (1:1 Coolbaker Master Edition) */
.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) scale(1.01);
    border-color: rgba(223, 175, 96, 0.55);
    background: rgba(255, 255, 255, 0.06);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35), 0 0 25px rgba(223, 175, 96, 0.18);
}

/* Glowing Micro-Visual Indicator (1:1 Coolbaker) */
.feature-card::before {
    content: '';
    position: absolute;
    top: 2.2rem;
    right: 2.5rem;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 16px 2px var(--accent);
    opacity: 0.35;
    transition: opacity 0.4s ease, transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.feature-card:hover::before {
    opacity: 1;
    transform: scale(2);
}

.feature-card.has-video::before {
    display: none; /* Video badge takes over top right */
}

/* Card Header Flex with Video Badge */
.card-header-flex {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.85rem;
}

.card-module-tag {
    font-size: 0.84rem;
    font-weight: 600;
    color: var(--text-muted, #8e8e93);
    letter-spacing: 0.04em;
    transition: color 0.3s ease;
}

.feature-card:hover .card-module-tag {
    color: var(--accent);
}

.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.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    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;
}

.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(223, 175, 96, 0.14);
    border-color: rgba(223, 175, 96, 0.7);
    color: var(--accent);
    box-shadow: 0 0 18px rgba(223, 175, 96, 0.35);
    transform: translateY(-1px);
}

.feature-card:hover .card-video-badge .badge-play-icon {
    color: var(--accent);
    transform: translateX(2px);
}

[data-theme="light"] .card-module-tag {
    color: #636366;
}

[data-theme="light"] .feature-card:hover .card-module-tag {
    color: var(--accent);
}

[data-theme="light"] .card-video-badge {
    background: rgba(0, 0, 0, 0.03);
    border-color: rgba(0, 0, 0, 0.1);
    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(179, 127, 40, 0.12);
    border-color: rgba(179, 127, 40, 0.6);
    color: var(--accent);
    box-shadow: 0 4px 15px rgba(179, 127, 40, 0.2);
}

[data-theme="light"] .feature-card:hover .card-video-badge .badge-play-icon {
    color: var(--accent);
    transform: translateX(2px);
}

[data-theme="light"] .feature-card {
    background: #ffffff;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.04);
}

[data-theme="light"] .feature-card:hover {
    background: #ffffff;
    border-color: var(--accent);
    box-shadow: 0 15px 40px rgba(179, 127, 40, 0.15);
}

.feature-card h3 {
    font-size: 1.45rem;
    margin-bottom: 0.75rem;
    color: var(--text-color);
    letter-spacing: -0.01em;
    font-weight: 700;
}

.feature-card p {
    font-size: 1.05rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin: 0;
}

.feature-card.is-search-hidden {
    display: none !important;
}

/* ========================================================
   DESKTOP STICKY PHASEN-LEISTE (Rail am rechten Rand - 1:1 Coolbaker)
   ======================================================== */
.phase-nav-rail {
    position: fixed !important;
    right: 24px !important;
    left: auto !important;
    top: 52% !important;
    transform: translateY(-50%) !important;
    z-index: 850 !important;
    display: flex !important;
    flex-direction: column !important;
    pointer-events: auto !important;
}

.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 über gesamte Leiste klappt die Bezeichnungen geschmeidig auf */
.phase-nav-rail:hover .rail-label,
.phase-nav-rail-inner:hover .rail-label,
.phase-nav-rail.is-hovered .rail-label {
    opacity: 1;
    max-width: 200px;
    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(223, 175, 96, 0.2);
    color: var(--accent);
}

[data-theme="light"] .rail-item:hover .rail-num {
    background: rgba(179, 127, 40, 0.15);
    color: var(--accent);
}

/* Active State */
.rail-item.active {
    color: var(--accent);
    background: rgba(223, 175, 96, 0.12);
    border-color: rgba(223, 175, 96, 0.35);
}

[data-theme="light"] .rail-item.active {
    color: var(--accent);
    background: rgba(179, 127, 40, 0.1);
    border-color: rgba(179, 127, 40, 0.3);
}

.rail-item.active .rail-num {
    background: var(--accent);
    color: #111111;
    box-shadow: 0 0 10px rgba(223, 175, 96, 0.5);
}

[data-theme="light"] .rail-item.active .rail-num {
    background: var(--accent);
    color: #ffffff;
    box-shadow: 0 0 10px rgba(179, 127, 40, 0.4);
}

.rail-item.active .rail-dot {
    background: var(--accent);
    box-shadow: 0 0 8px var(--accent);
}

.rail-item.active .rail-label {
    font-weight: 600;
}

/* --- Live Suche & Filter --- */
.wissen-search-section {
    max-width: 800px;
    margin: 0 auto 4rem;
    padding: 0 4%;
}

.wissen-search-wrapper {
    position: relative;
    width: 100%;
}

.search-input-box {
    position: relative;
    display: flex;
    align-items: center;
}

.search-icon {
    position: absolute;
    left: 1.5rem;
    color: var(--accent);
    display: flex;
    align-items: center;
    pointer-events: none;
}

.wissen-search-input {
    width: 100%;
    background: var(--surface);
    border: 1px solid var(--surface-border);
    color: var(--text-color);
    font-family: inherit;
    font-size: 1.2rem;
    padding: 1.1rem 3.5rem 1.1rem 3.8rem;
    border-radius: 50px;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    outline: none;
    transition: all 0.3s ease;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.wissen-search-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 25px rgba(223, 175, 96, 0.25);
}

[data-theme="light"] .wissen-search-input {
    background: #ffffff;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

.search-clear-btn {
    position: absolute;
    right: 1.5rem;
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    padding: 0.4rem;
    border-radius: 50%;
    transition: all 0.2s;
}

.search-clear-btn:hover {
    color: var(--text-color);
    transform: scale(1.1);
}

.search-clear-btn.hidden {
    display: none;
}

.search-no-results {
    text-align: center;
    padding: 4rem 2rem;
    background: var(--surface);
    border: 1px solid var(--surface-border);
    border-radius: 24px;
    margin-top: 2rem;
}

.search-no-results.hidden {
    display: none;
}

.no-results-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.search-no-results h3 {
    font-size: 1.6rem;
    color: var(--text-color);
    margin-bottom: 0.6rem;
}

.search-no-results p {
    color: var(--text-muted);
    font-size: 1.05rem;
    max-width: 500px;
    margin: 0 auto 1.5rem;
}

.reset-filter-btn {
    background: var(--accent);
    color: #000;
    border: none;
    padding: 0.8rem 2rem;
    border-radius: 50px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.reset-filter-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(223, 175, 96, 0.3);
}

/* --- Deep Dive Modal (1:1 Coolbaker Master Split-Screen) --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.88);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    opacity: 1;
    transition: opacity 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-overlay.hidden {
    opacity: 0;
    pointer-events: none;
    visibility: hidden;
}

.modal-box {
    width: 90vw;
    height: 85vh;
    background: #08090c;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 30px;
    display: flex;
    flex-direction: row;
    box-shadow: 0 40px 100px rgba(0, 0, 0, 0.85), 0 0 50px rgba(223, 175, 96, 0.15);
    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.96);
}

[data-theme="light"] .modal-box {
    background: #ffffff;
    border-color: rgba(0, 0, 0, 0.15);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.25);
}

.modal-close-btn {
    position: absolute;
    top: 1.6rem;
    right: 1.6rem;
    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: 60;
    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:hover {
    background: var(--accent);
    color: #060709;
    border-color: rgba(255, 255, 255, 0.45);
    transform: scale(1.1) rotate(90deg);
    box-shadow: 0 8px 25px rgba(223, 175, 96, 0.55);
}

[data-theme="light"] .modal-close-btn {
    background: rgba(0, 0, 0, 0.06);
    border-color: rgba(0, 0, 0, 0.15);
    color: #111111;
}

[data-theme="light"] .modal-close-btn:hover {
    background: var(--accent);
    color: #ffffff;
}

/* Modal Left: Text & Scientific Explanations */
.modal-left {
    width: 45%;
    padding: 3.5rem 3rem;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    overflow-y: auto;
    max-height: 100%;
    scrollbar-width: thin;
    scrollbar-color: var(--accent) transparent;
}

[data-theme="light"] .modal-left {
    border-right-color: rgba(0, 0, 0, 0.1);
}

.modal-badge {
    background: rgba(223, 175, 96, 0.14);
    border: 1px solid rgba(223, 175, 96, 0.4);
    color: var(--accent);
    padding: 0.42rem 1.4rem;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    display: inline-table;
    margin-bottom: 1.2rem;
    align-self: flex-start;
}

.modal-title {
    font-size: clamp(1.8rem, 2.6vw, 2.4rem);
    color: var(--text-color);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1.3rem;
    letter-spacing: -0.02em;
}

.modal-anim-desc {
    background: rgba(223, 175, 96, 0.08);
    border-left: 4px solid var(--accent);
    padding: 1.2rem 1.6rem;
    border-radius: 0 14px 14px 0;
    margin-top: 1.8rem;
    margin-bottom: 1.2rem;
    font-size: 0.98rem;
    line-height: 1.65;
    color: var(--text-color);
    font-weight: 500;
}

[data-theme="light"] .modal-anim-desc {
    background: rgba(179, 127, 40, 0.08);
    border-left-color: var(--accent);
}

.modal-text {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-muted);
}

.modal-text p {
    margin-bottom: 1.2rem;
}

.modal-text strong {
    color: var(--accent);
    font-weight: 700;
}

.modal-text em {
    color: var(--text-color);
    font-style: normal;
    border-bottom: 1px dotted var(--accent);
}

/* Modal Right: High-End Video Player Box */
.modal-right {
    width: 55%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000000;
    overflow: hidden;
    padding: clamp(1.5rem, 3vw, 3.5rem);
}

.modal-visual-wrapper {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-video-card {
    position: relative;
    width: 100%;
    max-height: calc(85vh - clamp(3rem, 6vh, 6rem));
    aspect-ratio: 16 / 9;
    border-radius: 28px;
    overflow: hidden;
    background: #000000;
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 35px 85px rgba(0, 0, 0, 0.85);
    cursor: none !important; /* Mouse vanishes - replaced by follower button */
    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 *,
.modal-video-card video,
.modal-video-card .modal-video-play-btn,
.modal-video-card .modal-follower-pill {
    cursor: none !important;
}

.modal-video-card:hover {
    border-color: rgba(223, 175, 96, 0.55);
    box-shadow: 0 30px 85px rgba(0, 0, 0, 0.9), 0 0 35px rgba(223, 175, 96, 0.22);
}

.modal-video-card video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: inherit;
    display: block;
    pointer-events: none; /* Let clicks pass to container card */
}

/* Modal Center Play Button */
.modal-video-play-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 84px;
    height: 84px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.65);
    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-card.is-playing .modal-video-play-btn {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.6);
    pointer-events: none;
}

.modal-video-card:hover .modal-video-play-btn {
    transform: translate(-50%, -50%) scale(1.1);
    background: rgba(223, 175, 96, 0.85);
    color: #060709;
}

/* Magnetic Follower Cursor Pill (Acts as floating cursor button) */
.modal-follower-pill {
    position: absolute;
    top: 0;
    left: 0;
    pointer-events: none;
    cursor: none !important;
    background: #ffffff;
    color: #08090c;
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-weight: 700;
    font-size: 0.88rem;
    letter-spacing: 0.02em;
    padding: 9px 20px;
    border-radius: 9999px;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.65), 0 0 25px rgba(223, 175, 96, 0.45);
    border: 1px solid rgba(223, 175, 96, 0.5);
    z-index: 20;
    opacity: 0;
    transform: translate(-50%, -50%) scale(0);
    will-change: transform, opacity;
    user-select: none;
    white-space: nowrap;
}

.modal-follower-pill .follower-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #dfaf60;
}

.modal-follower-pill .follower-icon svg {
    display: block;
}

[data-theme="light"] .modal-follower-pill {
    background: #0f1015;
    color: #ffffff;
    border-color: rgba(179, 127, 40, 0.5);
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.35), 0 0 20px rgba(179, 127, 40, 0.35);
}

[data-theme="light"] .modal-follower-pill .follower-icon {
    color: #dfaf60;
}

/* Fallback Card for cards without video yet */
.modal-fallback-card {
    position: relative;
    width: 100%;
    max-height: calc(85vh - clamp(3rem, 6vh, 6rem));
    aspect-ratio: 16 / 9;
    border-radius: 28px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 35px 85px rgba(0, 0, 0, 0.85);
}

.modal-fallback-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.88;
}

/* --- Responsive Media Queries --- */
@media (max-width: 1023px) {
    .phase-nav-rail {
        display: none !important;
    }
}

@media (max-width: 900px) {
    .phase-grid {
        grid-template-columns: 1fr;
        padding: 2rem 5%;
    }

    .feature-card {
        padding: 1.8rem 2rem;
    }

    .hero-title {
        font-size: 2.8rem;
    }

    .modal-box {
        flex-direction: column;
        height: 92vh;
        overflow-y: auto;
        border-radius: 24px;
    }

    .modal-left,
    .modal-right {
        width: 100% !important;
        border-right: none !important;
    }

    .modal-right {
        height: auto;
        min-height: 260px;
        order: -1;
        padding: 1.5rem;
    }

    .modal-left {
        padding: 2rem 1.5rem !important;
    }

    .modal-close-btn {
        top: 1rem;
        right: 1rem;
        width: 42px;
        height: 42px;
    }
}

/* Mobile & Touch Support */
@media (hover: none) and (pointer: coarse), (max-width: 768px) {
    .modal-video-card,
    .modal-video-card * {
        cursor: pointer !important;
    }
    .modal-follower-pill {
        display: none !important;
    }
}
