:root {
    --gold: #FFD700;
    --liquid-gold: linear-gradient(135deg, #BF953F, #FCF6BA, #B38728, #FBF5B7, #AA771C);
    --deep-blue: #020C1B;
    --card-bg: rgba(2, 12, 27, 0.7);
    --glass-bg: rgba(255, 255, 255, 0.02);
    --glass-border: rgba(197, 160, 89, 0.15);
    --glass-border-hover: rgba(197, 160, 89, 0.4);
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Background canvas particles */
#particle-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -2;
    background: radial-gradient(circle at center, #0a192f 0%, #020c1b 100%);
    pointer-events: none;
}

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

/* Glowing Border elements */
.glow-input:focus {
    border-color: var(--gold);
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.15);
}

/* Lang Switcher active style */
.active-lang {
    background: var(--gold) !important;
    color: #020C1B !important;
}

/* Highlight mark style */
mark {
    background-color: rgba(255, 215, 0, 0.25);
    color: #fff;
    font-weight: 700;
    padding: 0 2px;
    border-radius: 2px;
}

/* [4단계: CSS 프린트 미디어 공법] */
@media print {
    body {
        background: #ffffff !important;
        color: #000000 !important;
        height: auto !important;
        overflow: visible !important;
    }
    
    /* Hide all non-printable components */
    header, aside, button, select, input, #particle-canvas, .print-hidden, .print-hidden-on-print {
        display: none !important;
    }
    
    /* Default: Hide results panel (center) and show print-section (right) */
    #results-section {
        display: none !important;
    }
    
    .print-section {
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
        background: #ffffff !important;
        color: #000000 !important;
        position: static !important;
        overflow: visible !important;
        height: auto !important;
        padding: 0 !important;
    }

    /* When large detail is active: Show center results panel and hide right print-section */
    body.large-detail-active #results-section {
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
        background: #ffffff !important;
        color: #000000 !important;
        position: static !important;
        overflow: visible !important;
        height: auto !important;
        padding: 0 !important;
    }
    
    body.large-detail-active .print-section {
        display: none !important;
    }
    
    /* Reset layout wrapper displays for natural page flow, but exclude hidden ones */
    div:not(.hidden), main:not(.hidden) {
        background: transparent !important;
        border: none !important;
        box-shadow: none !important;
        display: block !important;
        position: static !important;
        width: auto !important;
        height: auto !important;
        overflow: visible !important;
        padding: 0 !important;
        margin: 0 !important;
    }

    /* Ensure modal overlays and hidden blocks are completely removed from printing */
    [id$="-modal"], .hidden, [style*="display: none"] {
        display: none !important;
    }

    body.large-detail-active #results-list,
    body.large-detail-active #results-list * {
        background: transparent !important;
        color: #000000 !important;
    }

    body.large-detail-active #results-list button,
    body.large-detail-active #results-list [onclick] {
        display: none !important;
    }

    .print-section * {
        background: transparent !important;
        color: #000000 !important;
    }

    mark {
        background: #ffff00 !important;
        color: #000000 !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .report-section {
        border: 1px solid #cccccc !important;
        page-break-inside: avoid;
        margin-bottom: 20px !important;
        padding: 15px !important;
    }

    .report-title {
        font-size: 1.5rem !important;
        font-weight: 800 !important;
        border-bottom: 2px solid #000000 !important;
        padding-bottom: 10px !important;
    }
}

/* Active select states for payment modules */
.active-pack {
    border-color: var(--gold) !important;
    background: rgba(197, 160, 89, 0.1) !important;
}

.active-pay-method {
    border-color: var(--gold) !important;
    background: rgba(197, 160, 89, 0.15) !important;
    color: var(--gold) !important;
}

/* --- Theme Selection Styles --- */

/* 1. Sovereign Light Theme */
body.theme-light {
    --deep-blue: #f8fafc;
    --card-bg: rgba(255, 255, 255, 0.95);
    --glass-bg: rgba(0, 0, 0, 0.02);
    --glass-border: rgba(197, 160, 89, 0.3);
    --glass-border-hover: rgba(197, 160, 89, 0.6);
    --text-primary: #0f172a;
    --text-secondary: #475569;
}
body.theme-light #particle-canvas {
    background: radial-gradient(circle at center, #f1f5f9 0%, #cbd5e1 100%);
}
body.theme-light .sidebar {
    background: rgba(241, 245, 249, 0.95);
}
body.theme-light select, body.theme-light input {
    background: rgba(255, 255, 255, 0.9) !important;
    color: #0f172a !important;
}
body.theme-light .paper-card {
    color: #0f172a !important;
}
body.theme-light .paper-title {
    color: #0f172a !important;
}

/* 2. Zirogos Cyberpunk Theme */
body.theme-cyber {
    --deep-blue: #0f051d;
    --card-bg: rgba(20, 5, 40, 0.85);
    --glass-bg: rgba(255, 0, 128, 0.05);
    --glass-border: rgba(0, 240, 255, 0.3);
    --glass-border-hover: rgba(255, 0, 128, 0.6);
    --text-primary: #00f0ff;
    --text-secondary: #d946ef;
}
body.theme-cyber #particle-canvas {
    background: radial-gradient(circle at center, #1b0a3a 0%, #07020d 100%);
}
body.theme-cyber .sidebar {
    background: rgba(15, 5, 29, 0.95);
}
body.theme-cyber select, body.theme-cyber input {
    background: rgba(20, 5, 40, 0.9) !important;
    color: #00f0ff !important;
}
body.theme-cyber .paper-card {
    color: #00f0ff !important;
}
body.theme-cyber .paper-title {
    color: #00f0ff !important;
}

