/* ==========================================================================
   Winds of Valen Theme Engine & Colors (Synced with game-info & equipper)
   ========================================================================== */
:root {
    --accent: #b45309;       /* Warm Amber/Rust */
    --highlight: #fbbf24;    /* Golden Sunlight */
    --bg-dark: #0f172a; 
    --panel-bg: rgba(30, 20, 10, 0.85); /* Dark Sepia Transparent */
    --gold: #f59e0b;
    --border-color: #78350f;
    --text-main: #fef3c7;
    --gem-slot: #1a120b;
    --success: #2ecc71;
}

* {
    box-sizing: border-box;
    scroll-behavior: smooth;
}

body {
    background: url('https://shared.akamai.steamstatic.com/store_item_assets/steam/apps/4135880/0ca73636982b607e66558ac302d9811a6cd862db/ss_0ca73636982b607e66558ac302d9811a6cd862db.1920x1080.jpg?t=1777940920') no-repeat center center fixed;
    background-size: cover;
    font-family: Arial, sans-serif;
    color: var(--text-main);
    margin: 0;
    padding: 0;
    display: flex;
    height: 100vh;
    overflow: hidden;
}

.page-wrapper {
    display: flex;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
}

/* ==========================================================================
   Structural Layout & Panels (Updated to Remove Left Sidebar)
   ========================================================================== */

/* Main Scrollable Area */
.main-content {
    flex: 1;
    overflow-y: auto;
    padding: 30px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    margin-right: 280px;
}

.main-content h1 {
    margin-top: 0;
    color: #fff;
    width: 100%;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.8);
}

/* Right Sidebar */
.sidebar-right {
    position: fixed;
    top: 0;
    right: 0;
    width: 280px;
    height: 100vh;
    background: var(--panel-bg);
    border-left: 2px solid var(--border-color);
    padding: 20px;
    box-sizing: border-box;
    overflow-y: auto;
    box-shadow: -5px 5px 15px rgba(0,0,0,0.5);
    backdrop-filter: blur(5px);
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    z-index: 100;
}

.sidebar-right h3 {
    color: var(--highlight);
    text-transform: uppercase;
    font-size: 18px;
    border-bottom: 2px solid var(--accent);
    padding-bottom: 10px;
    margin-top: 0;
    text-align: center;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.sidebar-nav button {
    width: 100%;
    background: var(--gem-slot);
    border: 1px solid var(--highlight);
    color: var(--highlight);
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    text-transform: uppercase;
    transition: 0.2s;
    text-align: left;
}

.sidebar-nav button:hover {
    background: var(--accent);
    color: white;
}

/* Interface Cards & Boxes */
.guide-section { 
    display: none;
    width: 100%; 
}

.guide-section.active { 
    display: block; 
}

.guide-card {
    border: 2px solid var(--border-color);
    margin: 0 0 24px 0;
    padding: 24px;
    border-radius: 8px;
    background: var(--panel-bg);
    width: 100%;
    box-sizing: border-box;
    position: relative;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.5);
    backdrop-filter: blur(5px);
    font-size: 1rem;
    font-weight: normal;
    line-height: 1.7;
}

.guide-card h2 {
    margin: 0 0 6px 0;
    color: var(--highlight);
    font-size: 1.6em;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 8px;
}

.guide-card h3 {
    color: var(--gold);
    font-size: 1.1em;
    margin: 20px 0 6px 0;
    border-left: 3px solid var(--accent);
    padding-left: 10px;
}

.guide-card p {
    margin: 0 0 10px 0;
    color: var(--text-main);
}

.guide-intro {
    font-style: italic;
    color: #ffd8a8;
    margin-bottom: 14px;
    font-size: 0.95em;
}

.tip-box {
    background: rgba(180, 83, 9, 0.12);
    border-left: 3px solid var(--gold);
    padding: 10px 14px;
    margin: 12px 0;
    border-radius: 0 6px 6px 0;
    font-size: 0.9em;
    color: #ffd8a8;
}

.step-block {
    background: rgba(0,0,0,0.25);
    border: 1px solid rgba(120,53,15,0.4);
    border-radius: 6px;
    padding: 14px 18px;
    margin: 10px 0;
}

.step-block strong {
    color: var(--highlight);
}

/* ==========================================================================
   Combat Evaluation Quiz Elements & PowerPoint Style Transitions
   ========================================================================== */
.text-center {
    text-align: center;
}

/* Slide up entrance for cards */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(25px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Slide in from right for interactive prompts */
@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(40px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.animate-fade-in {
    animation: fadeInUp 0.45s cubic-bezier(0.25, 1, 0.5, 1) both;
}

.animate-slide-in {
    animation: slideInRight 0.4s cubic-bezier(0.25, 1, 0.5, 1) both;
}

.quiz-body-layout {
    display: flex;
    gap: 24px;
    margin-top: 20px;
    align-items: flex-start;
}

.image-frame-box {
    flex: 0 0 320px;
    max-width: 320px;
}

.interactive-panel {
    flex: 1;
}

.image-wrapper-box {
    position: relative;
    border: 2px solid var(--border-color);
    border-radius: 6px;
    overflow: hidden;
    background: #000;
    cursor: pointer;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.image-wrapper-box:hover {
    transform: scale(1.02);
    border-color: var(--highlight);
}

.image-wrapper-box img {
    width: 100%;
    display: block;
    height: auto;
}

.magnify-overlay {
    background: rgba(0, 0, 0, 0.9);
    color: var(--highlight);
    text-align: center;
    font-size: 0.82em;
    padding: 6px 0;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-top: 1px solid var(--border-color);
    width: 100%;
}

.quiz-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 12px;
    margin-bottom: 16px;
}

.progress-indicator {
    font-size: 1.1em;
    font-weight: bold;
    color: var(--highlight);
}

.live-timer-badge {
    font-size: 1em;
    background: rgba(180, 83, 9, 0.25);
    border: 1px solid var(--gold);
    color: #fff;
    padding: 4px 12px;
    font-family: monospace;
    font-weight: bold;
    border-radius: 4px;
    box-shadow: 0 0 8px rgba(245, 158, 11, 0.2);
}

.score-indicator {
    font-size: 0.95em;
    background: rgba(0, 0, 0, 0.4);
    padding: 4px 10px;
    border-radius: 4px;
    border: 1px solid rgba(120, 53, 15, 0.6);
    line-height: 1.4;
}

.options-layout-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 15px;
}

.option-select-btn {
    width: 100%;
    background: var(--gem-slot);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    padding: 12px 18px;
    text-align: left;
    font-size: 0.95em;
    font-weight: bold;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.option-select-btn:hover:not(.disabled) {
    background: var(--border-color);
    color: #fff;
    border-color: var(--highlight);
    padding-left: 24px;
}

.option-select-btn.disabled {
    cursor: not-allowed;
    opacity: 0.6;
}

.option-select-btn.correct-highlight {
    background: rgba(46, 204, 113, 0.25) !important;
    border-color: var(--success) !important;
    color: #fff !important;
    opacity: 1;
}

.option-select-btn.wrong-highlight {
    background: rgba(239, 68, 68, 0.25) !important;
    border-color: #ef4444 !important;
    color: #fff !important;
    opacity: 1;
}

.action-btn {
    background: var(--gem-slot);
    border: 2px solid var(--highlight);
    color: var(--highlight);
    padding: 12px 28px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    text-transform: uppercase;
    transition: 0.2s;
}

.action-btn:hover {
    background: var(--accent);
    color: white;
}

.secondary-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(120, 53, 15, 0.5);
    color: #ccc;
    padding: 8px 14px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.85em;
    transition: 0.2s;
}

.secondary-btn:hover {
    background: rgba(180, 83, 9, 0.2);
    color: #fff;
}

/* Control Panel & Quit Styles */
.quit-action-panel {
    margin-top: 25px;
    padding-top: 15px;
    border-top: 1px dashed rgba(120, 53, 15, 0.4);
    text-align: center;
}

.quit-btn {
    background: rgba(40, 10, 10, 0.6);
    border: 1px dashed #ef4444;
    color: #fca5a5;
    padding: 10px 20px;
    border-radius: 4px;
    font-weight: bold;
    cursor: pointer;
    font-size: 0.9em;
    transition: all 0.2s ease;
}

.quit-btn:hover {
    background: #ef4444;
    color: white;
    border-style: solid;
    box-shadow: 0 0 10px rgba(239, 68, 68, 0.4);
}

.lightbox-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.9);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    cursor: zoom-out;
    padding: 20px;
}

.lightbox-overlay.active {
    display: flex;
}

.lightbox-overlay img {
    max-width: 95vw;
    max-height: 90vh;
    object-fit: contain;
    border: 3px solid var(--border-color);
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.8);
    border-radius: 6px;
}

/* ==========================================================================
   Progress Bar, Badges, Streak Toast & Review List (Alive-Feel Additions)
   ========================================================================== */
.progress-bar-track {
    width: 100%;
    height: 8px;
    background: rgba(0,0,0,0.4);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 18px;
}

.progress-bar-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--accent), var(--highlight));
    box-shadow: 0 0 8px rgba(245, 158, 11, 0.6);
    transition: width 0.5s cubic-bezier(0.25, 1, 0.5, 1);
    border-radius: 6px 0 0 6px;
}

.streak-badge {
    display: inline-block;
    margin-left: 10px;
    font-size: 0.85em;
    font-weight: bold;
    padding: 3px 10px;
    border-radius: 10px;
    background: rgba(245, 158, 11, 0.2);
    border: 1px solid var(--gold);
    color: var(--highlight);
    vertical-align: middle;
    animation: fadeInUp 0.3s ease both;
}

.streak-toast {
    position: fixed;
    top: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(-20px);
    background: var(--panel-bg);
    border: 2px solid var(--highlight);
    color: var(--highlight);
    font-weight: bold;
    padding: 10px 22px;
    border-radius: 8px;
    box-shadow: 0 0 20px rgba(245, 158, 11, 0.5);
    z-index: 10000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s ease, transform 0.35s ease;
    backdrop-filter: blur(5px);
}

.streak-toast.show-toast {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.mute-btn {
    background: var(--gem-slot);
    border: 1px solid var(--border-color);
    color: var(--highlight);
    padding: 3px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    transition: 0.2s;
}

.mute-btn:hover {
    background: var(--accent);
    border-color: var(--highlight);
}

.personal-best-box {
    font-size: 0.85em;
    color: var(--highlight);
    background: rgba(245, 158, 11, 0.1);
    border: 1px dashed var(--gold);
    border-radius: 6px;
    padding: 8px 12px;
    margin: 0 0 10px 0;
    display: inline-block;
}

.new-best-flag {
    margin-top: 8px;
    font-weight: bold;
    color: var(--success);
    animation: fadeInUp 0.4s ease both;
}

.review-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin-top: 12px;
}

.review-item {
    font-size: 0.85em;
    font-weight: bold;
    padding: 6px 10px;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    background: rgba(0,0,0,0.25);
}

.review-item.review-correct {
    border-color: var(--success);
    color: #a7f3d0;
    background: rgba(46, 204, 113, 0.12);
}

.review-item.review-incorrect {
    border-color: #ef4444;
    color: #fca5a5;
    background: rgba(239, 68, 68, 0.12);
}

/* Confetti Rendering Layer */
#confetti-canvas {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 99999;
    display: none;
}

/* Responsive Responsive Menu Triggers */
.hamburger {
    display: none;
    position: fixed;
    top: 12px;
    right: 12px;
    z-index: 200;
    background: var(--gem-slot);
    border: 2px solid var(--highlight);
    color: var(--highlight);
    font-size: 22px;
    width: 44px;
    height: 44px;
    border-radius: 6px;
    cursor: pointer;
    align-items: center;
    justify-content: center;
}

.nav-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 140;
}

.nav-overlay.open { 
    display: block; 
}

/* ==========================================================================
   Themed Custom Scrollbars
   ========================================================================== */
::-webkit-scrollbar { 
    width: 6px;
    height: 6px; 
}
::-webkit-scrollbar-track { 
    background: rgba(0, 0, 0, 0.3);
}
::-webkit-scrollbar-thumb { 
    background-color: var(--border-color); 
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover { 
    background-color: var(--gold);
}

/* ==========================================================================
   Responsive Adaptations (Matching Breakpoint Scales)
   ========================================================================== */
@media (max-width: 1550px) {
    .hamburger { display: flex; }
    .main-content { margin-right: 0; }
    
    .sidebar-right {
        display: none;
        position: fixed;
        top: 0;
        right: 0;
        width: 75vw;
        max-width: 300px;
        height: 100vh;
        z-index: 150;
    }
    .sidebar-right.open { display: flex; }
}

@media (max-width: 900px) {
    body { 
        overflow: auto;
        height: auto; 
    }
    .page-wrapper { 
        flex-direction: column; 
        height: auto;
        overflow: visible; 
    }
    .main-content { 
        height: auto; 
        overflow: visible; 
        padding: 60px 16px 16px;
        margin-right: 0; 
    }
    .quiz-body-layout {
        flex-direction: column;
        align-items: center;
    }
    .image-frame-box {
        width: 100%;
        max-width: 400px;
    }
    .guide-card { 
        padding: 14px; 
        margin-bottom: 14px; 
    }
}

@media (max-width: 600px) {
    .main-content { padding: 64px 6px 10px; }
    .main-content h1 { font-size: 1.3em; }
    .guide-card { padding: 10px; }
}

/* ==========================================================================
   Achievements Window
   ========================================================================== */
.achievements-panel {
    background: var(--panel-bg);
    border: 2px solid var(--gold);
    border-radius: 8px;
    max-width: 620px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    padding: 22px;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    cursor: default;
}

.achievements-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid var(--accent);
    padding-bottom: 12px;
    margin-bottom: 16px;
    flex-wrap: wrap;
    gap: 10px;
}

.achievements-header h2 {
    margin: 0;
    color: var(--highlight);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 1.3em;
}

.achievements-progress {
    font-size: 0.85em;
    font-weight: bold;
    color: var(--highlight);
    background: rgba(245, 158, 11, 0.15);
    border: 1px solid var(--gold);
    padding: 4px 12px;
    border-radius: 10px;
    white-space: nowrap;
}

.achievements-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.achievement-card {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(120, 53, 15, 0.4);
    border-radius: 6px;
    padding: 12px 16px;
    transition: 0.2s;
}

.achievement-card.unlocked {
    border-color: var(--success);
    background: rgba(46, 204, 113, 0.1);
    box-shadow: 0 0 10px rgba(46, 204, 113, 0.15);
}

.achievement-card.locked {
    opacity: 0.55;
    filter: grayscale(0.7);
}

.achievement-icon {
    font-size: 1.8em;
    line-height: 1.2;
    flex: 0 0 auto;
    width: 40px;
    text-align: center;
}

.achievement-info {
    flex: 1;
}

.achievement-info h4 {
    margin: 0 0 4px 0;
    color: var(--highlight);
    font-size: 1em;
    text-transform: none;
    border: none;
    padding: 0;
}

.achievement-card.locked .achievement-info h4 {
    color: #ccc;
}

.achievement-info p {
    margin: 0;
    font-size: 0.85em;
    color: var(--text-main);
    line-height: 1.4;
}

.achievement-date {
    display: block;
    font-size: 0.75em;
    color: #a7f3d0;
    margin-top: 6px;
    font-weight: bold;
}

@media (max-width: 600px) {
    .achievements-panel {
        padding: 16px;
        max-height: 85vh;
    }
    .achievement-card {
        padding: 10px 12px;
        gap: 10px;
    }
    .achievement-icon {
        font-size: 1.5em;
        width: 32px;
    }
}
