/* =========================================================================
   1. GLOBAL PAGE & GRID LAYOUT
   ========================================================================= */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 14px;
}

body {
    background-color: #0a0a0c;
    color: #f3f4f6;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.5;
    padding: 30px 4%; 
    max-width: 100%;   
    width: 100%;
}

/* Header Application Title */

.site-logo {
    max-width: 600px;
    width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
}

/* The Dropdown Menu Box */
select#episodeSelect {
    background-color: #16161a;
    color: #ffffff;
    border: 1px solid #2d2d35;
    padding: 8px 14px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 8px;
    outline: none;
    cursor: pointer;
    width: auto;
    min-width: 200px;
    max-width: 260px;
    display: block;
    margin-bottom: 0px;
    transition: all 0.2s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
}

select#episodeSelect:focus, 
select#episodeSelect:hover {
    border-color: #ffcc00;
    box-shadow: 0 0 0 2px rgba(255, 204, 0, 0.15);
}

.nav-control-wrapper {
    display: flex;
    align-items: center;
    justify-content: flex-start; 
    gap: 12px;

    width: 100%;
    
    position: sticky;
    top: 0;
    z-index: 100; /* Stays above portraits and badges */
    background-color: rgba(10, 10, 12, 0.85); /* Matches body color with transparency */
    backdrop-filter: blur(8px); /* Smooth modern glass effect */
    -webkit-backdrop-filter: blur(8px);
    padding: 15px 0; /* Adds internal padding so it doesn't clip tightly */
}

.nav-btn {
    background-color: #16161a;
    color: #ffcc00;
    border: 1px solid #2d2d35;
    height: 35px; /* Matches standard dropdown height */
    padding: 0 16px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s ease;
}

.nav-btn:hover {
    background-color: #2d2d35;
    border-color: #ffcc00;
}

.nav-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.header-actions {
    position: relative;
    display: inline-block;
    margin-left: auto; /* 🎯 Pushes the button to the far right edge of the flex row */
}

/* Styled minimalist icon buttons to match buttons mockup.jpg */
.action-btn {
    background: transparent;
    border: none;
    color: #f3f4f6;
    cursor: pointer;
    padding: 8px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.action-btn:hover {
    color: #ffcc00; /* Highlights red on hover */
    background: #1e1802;
}
/* =========================================================================
   CHANGELOGS BUTTON
   ========================================================================= */
.changelog-panel {
    display: none; 
    position: absolute;
    top: 45px;      
    right: 0;       /* Locks the drop panel right edge to the button right edge */
    width: 320px;
    max-height: 400px;
    background-color: #121216;
    border: 1px solid #27272a;
    border-radius: 6px;
    padding: 16px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.5);
    z-index: 1000;  
}
/* JavaScript toggles this class to pop it open */
.changelog-panel.show {
    display: block;
}
/* Minor styling for internal log items */
.changelog-panel h3 {
    margin-top: 0;
    font-size: 1rem;
    border-bottom: 1px solid #27272a;
    padding-bottom: 8px;
}
.changelog-list {
    overflow-y: auto;
    max-height: 300px;
}
.log-item {
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px dashed #27272a; /* Creates a subtle separation line between entries */
}
.log-item:last-child {
    border-bottom: none; /* Removes the bottom border for the final item */
}
.log-date {
    color: #ffcc00; /* Keeps your signature crimson highlight */
    font-weight: bold;
    font-size: 0.85rem;
    display: inline-block;
    margin-bottom: 4px; /* Gives spacing before the line break */
}
.log-content {
    font-size: 0.85rem;
    color: #e4e4e7;
    line-height: 1.4;
}
/* =========================================================================
   THE NOTIFICATION BANNER (Spoiler Warnings)
   ========================================================================= */
#companionNotice {
    background-color: #121216;
    border-left: 4px solid #ffcc00;
    padding: 16px 20px;
    border-radius: 0 8px 8px 0;
    margin-bottom: 32px;
    font-size: 1.1rem;
    color: #d1d1d6;
    line-height: 1.6;
    max-width: 2000px; 
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

#companionNotice strong {
    color: #ffffff;
}

#characterGrid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 18px;
    width: 100%;
    align-items: stretch;
}

.character-card {
    background-color: #16161a;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    border: 1px solid #24242b;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: 440px;

    transition: transform 0.25s cubic-bezier(0.25, 1, 0.5, 1), box-shadow 0.25s ease;
    will-change: transform; /* Prepares the browser's graphics card for a smooth lift */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    backface-visibility: hidden;
    transform-style: preserve-3d;
}

.character-card:hover {
    transform: translateY(-6px) scale(1.02); 
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.6);
    border-color: #3a3a45; 
}

/* =========================================================================
   2. PORTRAIT ASSET ENGINE & OVERLAYS
   ========================================================================= */
.portrait-container {
    position: relative;
    width: 100%;
    height: 289px;
    overflow: hidden;
    background-color: #1a1a24;
    background: linear-gradient(135deg, #1e1e2f 0%, #0d0d13 100%);
    transition: filter 0.3s ease;
}

.character-card:has(.info-drawer.expanded) .portrait-container {
    filter: blur(4px);
}

.character-portrait {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    object-position: center 10%;
    filter: drop-shadow(0px 8px 12px rgba(0, 0, 0, 0.5));
}

.badge-stack-left {
    position: absolute;
    top: 12px;
    left: 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    z-index: 5;
    align-items: flex-start;
}

.badge {
    font-size: 0.65rem;
    font-weight: bold;
    text-transform: uppercase;
    padding: 4px 8px;
    border-radius: 4px;
    color: #ffffff;
    background-color: #333338;
    width: max-content;
    white-space: nowrap;
    letter-spacing: 0.5px;
}

/* =========================================================================
   GRADE-SPECIFIC BADGES
   ========================================================================= */
.grade-badge {
    /* 📌 POSITIONING ENGINE: Locks it to the bottom right, clearing the name overlay */
    position: absolute;
    bottom: 44px; /* Sits exactly above the name overlay bar */
    right: 12px;
    z-index: 6; /* One layer higher than the portrait and name backdrop */
    
    /* Styling aesthetics */
    background: rgba(12, 12, 16, 0.65);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}

.grade-badge.grade-4 {
    color: #cf7234; /* Silver/Gray for lower grades */
    border: 1px solid rgba(143, 74, 17, 0.3);
}

.grade-badge.grade-3 {
    color: #c9c9d1; /* Silver/Gray for lower grades */
    border: 1px solid rgba(161, 161, 170, 0.3);
}

.grade-badge.semi-grade-2,
.grade-badge.grade-2 {
    color: #fbbf24; /* Gold/Bronze for higher standard grades */
    border: 1px solid rgba(251, 191, 36, 0.3);
}

.grade-badge.semi-grade-1,
.grade-badge.grade-1 {
    color: #34dee4; /* Gold/Bronze for higher standard grades */
    border: 1px solid rgba(27, 150, 172, 0.3);
}

.grade-badge.special-grade-1,
.grade-badge.special-grade {
    color: #f87171; /* Threatening red for Special Grade */
    border: 1px solid rgba(248, 113, 113, 0.5);
    text-shadow: 0 0 8px rgba(248, 113, 113, 0.6);
    box-shadow: 0 0 8px rgba(248, 113, 113, 0.3);
}

.name-overlay {
    position: absolute;
    top: 250px; 
    left: 0;
    width: 100%;
    background: linear-gradient(to top, rgba(12, 12, 16, 0.95) 0%, rgba(12, 12, 16, 0.75) 100%);
    padding: 8px 16px;
    box-sizing: border-box;
    z-index: 65; 
    transition: top 0.35s cubic-bezier(0.25, 1, 0.5, 1), background-color 0.35s ease, height 0.35s ease;
}

.name-overlay h2 {
    font-size: 1.10rem;
    font-weight: 700;
    color: #ffffff;
    margin: 0;
}

/* =========================================================================
   3. TEXT CONTENT AREA & THE SLIDING REVEAL DRAWER
   ========================================================================= */

.card-details {
    padding: 12px 16px 16px 16px;
    display: flex;
    flex-direction: column;
    background-color: #16161a;
    position: relative;
    width: 100%;
    z-index: 60;
    transition: height 0.35s cubic-bezier(0.25, 1, 0.5, 1), background-color 0.35s ease;
}

.info-drawer {
    background-color: #16161a;
    width: 100%;
    border-left: 1px solid #24242b;
    border-right: 1px solid #24242b;
    position: relative;
    z-index: 50;
    transition: all 0.35s cubic-bezier(0.25, 1, 0.5, 1);
}

.info-drawer.collapsed {
    height: 105px; 
    overflow: hidden;
}

.info-drawer.collapsed .drawer-scroll-content {
    overflow-y: hidden;
    height: 100%;
}

.info-drawer.expanded {
    height: 320px;
    margin-top: -215px;
    background-color: rgba(22, 22, 26, 0.96); 
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-top: 1px solid #ffcc00;
    border-radius: 12px 12px 0 0;
    z-index: 55;
}

.drawer-scroll-content {
    padding: 16px 16px 12px 16px; 
    height: 100%;
}

.info-drawer.expanded .drawer-scroll-content {
    overflow-y: auto;
    padding-top: 60px;
}

.character-card:has(.expand-btn) .info-drawer.collapsed {
    mask-image: linear-gradient(to bottom, black 65%, transparent 100%);
    -webkit-mask-image: linear-gradient(to bottom, black 65%, transparent 100%);
}

/* 🎯 REQ 3: Stick Nameplate securely above everything when expanded */
.character-card:has(.info-drawer.expanded) .name-overlay {
    position: absolute;
    top: 0;
    bottom: auto;
    left: 0;
    width: 100%;
    height: 48px;
    background: linear-gradient(to top, rgba(12, 12, 16, 0.95) 0%, rgba(12, 12, 16, 0.75) 100%);
    backdrop-filter: blur(4px); 
    -webkit-backdrop-filter: blur(4px);
    
    /* Safely out-prioritizes the expanded drawer container height (55) */
    z-index: 85; 
    
    display: flex;
    align-items: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.5);
}

/* Style for when a character has appeared but has no custom logs yet */
/* 🚀 SPECIFICITY UPGRADE: Tells the browser this EXACT element inside the card takes absolute priority */
.character-card .card-details .no-data {
    color: #ffcc00 !important; /* 🌟 Bumps contrast directly to your accent color */
    font-size: 1.0rem !important; /* Bumps up the scale slightly to make it legible */
    font-style: italic;
    opacity: 0.75;
    margin-top: 12px;
    display: block;
}

/* =========================================================================
   4. INTERACTION TOGGLE BUTTONS
   ========================================================================= */
.expand-btn {
    background-color: #222227;
    color: #ffcc00; /* Signature fighting selector color accent */
    border: 1px solid #2d2d35;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.75rem;
    font-weight: bold;
    padding: 8px 12px;
    margin-top: 12px;
    text-transform: uppercase;
    width: 100%;
    display: block;
    transition: all 0.2s ease;
    letter-spacing: 0.5px;
}

.expand-btn:hover {
    background-color: #2d2d35;
    color: #ffffff;
    border-color: #444450;
}

.info-list {
    margin: 0;
    padding-left: 14px;
    color: #d1d1d6;
    font-size: 0.85rem;
    line-height: 1.4;
    list-style-type: square; /* Clean, modern square bullet layout */
}

.info-list li {
    color: #d1d1d6;
    font-size: 0.85rem;
    line-height: 1.5;
    margin-bottom: 8px;
}

/* Typography styles inside your technical data frames */
.info-section {
    margin-bottom: 14px;
}

/* Custom spacing and typography inside your information segments */
.info-section h3 {
    margin: 16px 0 8px 0;
    font-size: 0.75rem;
    color: #ffcc00; /* Uses your header's signature gold accent for section tags */
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-weight: 700;
}

/* Keeps the fallback notification soft and un-intrusive */
.no-data {
    color: #55555c;
    font-style: italic;
    font-size: 0.85rem;
    margin: 12px 0 0 0;
}

/* START OF AFFILIATIONS */
/* AFFILIATION-SPECIFIC BADGES */
.affiliation-badge.tokyo {
    background: rgba(30, 58, 138, 0.4); /* Deep Jujutsu High Navy */
    color: #93c5fd;
    border: 1px solid rgba(147, 197, 253, 0.3);
    text-shadow: 0 0 8px rgba(147, 197, 253, 0.5);
}

.affiliation-badge.kyoto {
    background: rgba(13, 148, 136, 0.4); /* Kyoto Teal */
    color: #99f6e4;
    border: 1px solid rgba(153, 246, 228, 0.3);
    text-shadow: 0 0 8px rgba(153, 246, 228, 0.5);
}

.affiliation-badge.antagonists,
.affiliation-badge.curses {
    background: rgba(153, 27, 27, 0.4); /* Cursed Energy Dark Red */
    color: #fca5a5;
    border: 1px solid rgba(252, 165, 165, 0.3);
    text-shadow: 0 0 8px rgba(252, 165, 165, 0.5);
}

.affiliation-badge.neutral {
    background: #d1e42666;
    color: #ddd018;
    border: 1px solid rgba(238, 255, 0, 0.3);
    text-shadow: 0 0 8px rgba(108, 119, 68, 0.5);
}

.affiliation-badge.cg {
    background: #7b101066;
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.3);
    text-shadow: 0 0 8px rgba(108, 119, 68, 0.5);
}

/* AFFILIATION-SPECIFIC BACKGROUNDS */
/* 🔵 Tokyo Students Background Glow Override */
.character-card:not(.status-dead):has(.tokyo) .portrait-container {
    background: radial-gradient(circle at center, #1e293b 0%, #090d16 100%);
}

/* 🟢 Kyoto Students Background Glow Override */
.character-card:not(.status-dead):has(.kyoto) .portrait-container {
    background: radial-gradient(circle at center, #115e59 0%, #060f0e 100%);
}

/* 🔴 Curses/Antagonists Background Glow Override */
.character-card:not(.status-dead):has(.antagonists) .portrait-container {
    background: radial-gradient(circle at center, #450a0a 0%, #0f0505 100%);
}

/* 🟢 Neutral Background Glow Override */
.character-card:not(.status-dead):has(.neutral) .portrait-container {
    background: radial-gradient(circle at center, #747207 0%, #060f0e 100%);
}

.character-card.status-dead .portrait-container {
    background: radial-gradient(circle at center, #222227 0%, #0c0c0f 100%) !important;
}
/* END OF AFFILIATIONS */

/* 🗺️ DYNAMIC WRAPPER AXIS */
.app-layout {
    display: flex;
    flex-direction: row;       /* Forces strict left-to-right alignment */
    align-items: flex-start;   /* 🟢 CRITICAL: Prevents columns from stretching unevenly or collapsing down */
    gap: 24px;
    width: 100%;
    position: relative; /* anchors nothing directly, but keeps stacking context sane */
}

.app-layout.is-wip .lore-sidebar,
.app-layout.is-wip .main-content {
    filter: blur(3px);
    pointer-events: none;   /* prevents interacting with stale info */
    user-select: none;
    transition: filter 0.3s ease;
}

.wip-overlay {
    display: none;
    position: fixed;        /* stays centered in viewport even if the grid is tall */
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 150;            /* above nav (100), below changelog panel (1000) */
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 40px;
    pointer-events: none;
}

.app-layout.is-wip .wip-overlay {
    display: flex;
}

.wip-overlay-content p {
    font-size: 1.4rem;
    font-weight: 700;
    color: #ffcc00;
    text-shadow: 0 2px 16px rgba(0, 0, 0, 0.85);
    max-width: 480px;
    margin: 0 auto;
    background: rgba(10, 10, 12, 0.55);
    padding: 18px 24px;
    border-radius: 10px;
}

.lore-sidebar {
    width: 210px;
    min-width: 210px; 
    flex-shrink: 0;   
    background: #16161a;
    border: 1px solid rgba(250, 250, 250, 0.15);
    border-radius: 8px;
    padding: 18px;
    margin-top: 0px;
    
    position: sticky;
    top: 24px;
    max-height: calc(100vh - 48px);
    overflow-y: auto;
}

.main-content {
    flex: 1;        /* Main area expands to fill all remaining space */
    min-width: 0;   /* Allows the grid to shrink if needed, preventing overflow */
}

/* Add breathing room below the sidebar title */
.sidebar-title {
    margin-bottom: 25px; /* Increases the gap between GLOSSARY and the first item */
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1); /* Adds a subtle separator line */
}

.glossary-card {
    margin-bottom: 10px;
    background: #222227;
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid #2d2d35;
}

.glossary-header {
    width: 100%;
    background: #222227;
    border: none;
    color: #f3f4f6;
    font-weight: 700;
    font-size: 0.9rem;
    padding: 10px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    cursor: pointer;
    text-align: left;
    transition: background-color 0.2s ease;
}

.glossary-header:hover {
    background: #715e12;
}

.glossary-header .chevron-icon {
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

.glossary-header.expanded .chevron-icon {
    transform: rotate(180deg);
}

.glossary-content {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 0.3s ease;
}

.glossary-content.expanded {
    grid-template-rows: 1fr;
}

.glossary-content-inner {
    overflow: hidden;
    min-height: 0;
    padding: 0 20px;
}

.glossary-content.expanded .glossary-content-inner {
    padding: 8px 14px 14px 25px;
}

/* =========================================================================
   Glow for new/updated info.
   ========================================================================= */
@keyframes glow-pulse-new {
    0%, 100% { box-shadow: 0 0 3px 1px rgba(255, 204, 0, 0.30); }
    50%      { box-shadow: 0 0 3px 3px rgba(255, 204, 0, 0.549); }
}

@keyframes glow-pulse-updated {
    0%, 100% { box-shadow: 0 0 3px 1px rgba(0, 229, 255, 0.30); }
    50%      { box-shadow: 0 0 3px 3px rgba(0, 229, 255, 0.549); }
}

.character-card.has-new-info,
.glossary-card.has-new-info {
    animation: glow-pulse-new 2.6s ease-in-out infinite;
}

.character-card.has-updated-info,
.glossary-card.has-updated-info {
    animation: glow-pulse-updated 2.6s ease-in-out infinite;
}

/* Make bold text slightly brighter white for better contrast */
.info-list strong,
.glossary-list strong {
    color: #ffffff;
    font-weight: 700;
}

.info-list em,
.glossary-list em {
    color: #a1a1aa; /* Slightly muted for italics */
}

.glossary-list li {
    margin-bottom: 12px;
}

.glossary-list li:last-child {
    margin-bottom: 0;
}

.status-indicator {
    font-size: 0.65rem;
    font-weight: 800;
    margin-left: 6px;
    letter-spacing: 0.05em;
    padding: 1px 4px;
    border-radius: 3px;
    vertical-align: super;
}

.new-badge {
    color: #ffffff;
    background-color: rgba(255, 204, 0, 0.1);
}

.update-badge {
    color: #ffffff;
    background-color: rgba(0, 229, 255, 0.1);
}

/* Cleaned Status Classes */
.character-card.status-unknown::before {
    content: "UNKNOWN";
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 0.65rem;
    font-weight: bold;
    color: #b4b4b4;
    letter-spacing: 0.1em;
    background: rgba(0, 0, 0, 0.6);
    padding: 2px 6px;
    border-radius: 3px;
    z-index: 10; /* Ensures it stays above the gradient overlays */
}

.character-card.status-unknown {
    border: 4px solid #4b4b4b;
    position: relative;
}

.character-card.status-unknown .character-portrait {
    filter: grayscale(40%) brightness(0.7);
    transition: filter 0.25s ease;
}

.character-card.status-critical::before {
    content: "CRITICAL";
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 0.65rem;
    font-weight: bold;
    color: #c75e5e;
    letter-spacing: 0.1em;
    background: rgba(0, 0, 0, 0.6);
    padding: 2px 6px;
    border-radius: 3px;
    z-index: 10; /* Ensures it stays above the gradient overlays */
}

.character-card.status-critical {
    border: 4px solid #c65e5e;
    position: relative;
}

.character-card.status-critical .character-portrait {
    filter: invert(0%) sepia(30%) saturate(100%) hue-rotate(320deg) brightness(70%) contrast(120%);
    transition: filter 0.25s ease;
}

.character-card.status-sealed::before {
    content: "SEALED";
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 0.65rem;
    font-weight: bold;
    color: #d76819;
    letter-spacing: 0.1em;
    background: rgba(0, 0, 0, 0.6);
    padding: 2px 6px;
    border-radius: 3px;
    z-index: 10; /* Ensures it stays above the gradient overlays */
}

.character-card.status-sealed {
    border: 4px solid #642a06;
    position: relative;
}

.character-card.status-sealed .character-portrait {
    filter: grayscale(40%) brightness(0.7);
    transition: filter 0.25s ease;
}

.character-card.status-dead::before {
    content: "DECEASED";
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 0.65rem;
    font-weight: bold;
    color: #ff4d4d;
    letter-spacing: 0.1em;
    background: rgba(0, 0, 0, 0.6);
    padding: 2px 6px;
    border-radius: 3px;
    z-index: 10; /* Ensures it stays above the gradient overlays */
}

.character-card.status-dead {
    border: 4px solid #5a1818;
    
    position: relative;
}

.character-card.status-dead .character-portrait {
    filter: grayscale(100%) brightness(0.6);
    transition: filter 0.25s ease;
    
}

/* =========================================================================
   ONBOARDING MODAL
   ========================================================================= */
.onboarding-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(8, 8, 10, 0.82);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.onboarding-overlay.show {
    display: flex;
}

.onboarding-modal {
    position: relative;
    background: #18181b;
    border: 1px solid #2d2d35;
    border-radius: 14px;
    width: 100%;
    max-width: 920px;
    max-height: 85vh;
    display: flex;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.onboarding-close {
    position: absolute;
    top: 14px;
    right: 16px;
    background: none;
    border: none;
    color: #f3f4f6;
    font-size: 1.6rem;
    line-height: 1;
    cursor: pointer;
    z-index: 1;
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

.onboarding-close:hover {
    opacity: 1;
}

.onboarding-panel-left {
    flex: 0 0 280px;
    background: #131316;
    padding: 28px 20px;
    overflow-y: auto;
    border-right: 1px solid #2d2d35;
}

.onboarding-heading {
    font-size: 1.15rem;
    margin: 0 0 8px 0;
    color: #f3f4f6;
}

.onboarding-subheading {
    font-size: 0.85rem;
    color: #a1a1aa;
    margin: 0 0 20px 0;
}

.onboarding-topic-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.onboarding-topic-btn {
    background: #2d2d35;
    border: 1px solid transparent;
    color: #f3f4f6;
    font-weight: 700;
    font-size: 0.9rem;
    padding: 10px 14px;
    border-radius: 6px;
    cursor: pointer;
    text-align: left;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

.onboarding-topic-btn:hover {
    background: #383842;
}

.onboarding-topic-btn.active {
    background: #383842;
    border-color: #ffcc00;
    color: #ffcc00;
}

.onboarding-panel-right {
    flex: 1;
    padding: 28px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.onboarding-media {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover; /* or 'contain' if you don't want any cropping */
    border-radius: 8px;
    border: 1px solid #2d2d35;
    margin-bottom: 18px;
    background: #0a0a0c;
}

.onboarding-media-title {
    margin: 0 0 8px 0;
    color: #ffcc00;
    font-size: 1.05rem;
}

.onboarding-media-description {
    margin: 0;
    color: #d4d4d8;
    font-size: 0.92rem;
    line-height: 1.6;
}

@media (max-width: 720px) {
    .onboarding-modal {
        flex-direction: column;
        max-height: 90vh;
    }
    .onboarding-panel-left {
        flex: none;
        border-right: none;
        border-bottom: 1px solid #2d2d35;
    }
}