@import url('https://fonts.googleapis.com/css2?family=Lora:wght@400;600&family=Tiro+Bangla&display=swap');

:root {
    --national-green: #006a4e;
    --sovereign-gold: #D4AF37;
    --royal-blue: #4169E1;
    --glow-blue: rgba(65, 105, 225, 0.9);
}

body, html {
    margin: 0;
    padding: 0;
    height: 100svh;
    width: 100vw;
    background-color: #1a1a1a;
    font-family: 'Inter', 'Hind Siliguri', sans-serif;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
}

.hud-container {
    width: 99%;
    height: 99svh;
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.frame-header {
    height: 10svh;
    background-color: var(--national-green);
    display: flex;
    justify-content: center;
    align-items: center;
}

.map-circle {
    width: 10svh;
    height: 10svh;
    background-color: #E11837;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 0 15px rgba(225, 24, 55, 0.6);
}

.frame-ribbon {
    height: 10svh;
    background-color: rgba(0,0,0,0.6);
    display: flex;
    align-items: center;
    padding: 0 1%;
}

.pills-wrapper {
    display: flex;
    overflow-x: auto;
    width: 100%;
    gap: 10px;
}

.pill {
    flex: 0 0 calc(100% / 7 - 10px);
    min-width: 90px;
    height: 6svh;
    background: rgba(255,255,255,0.2);
    backdrop-filter: blur(10px);
    border-radius: 30px;
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    font-size: 0.75rem;
    cursor: pointer;
    text-align: center;
}

    .pill.active {
        background: var(--sovereign-gold);
        color: black;
        font-weight: bold;
    }

/* Base Canvas (Landing Page State) */
.frame-canvas {
    height: 75svh;
    background-color: #121212;
    position: relative;
    padding: 2%;
    overflow-y: auto;
    transition: background-color 0.3s ease, filter 0.3s ease;
}

/* Dynamic State 1: Reading Mode (Muted Parchment) */
body.reading-mode .frame-canvas {
    background-color: #E6E2D3 !important;
}

    body.reading-mode .frame-canvas h1,
    body.reading-mode .frame-canvas h2,
    body.reading-mode .frame-canvas h3 {
        font-family: 'Lora', 'Georgia', 'Tiro Bangla', serif;
        color: #222222 !important;
        text-align: center;
        margin-bottom: 20px;
    }

    body.reading-mode .frame-canvas p,
    body.reading-mode .frame-canvas li {
        font-family: 'Georgia', 'Kalpurush', serif;
        color: #222222 !important;
        font-size: 1.2rem;
        line-height: 2;
        text-align: center;
        text-wrap: balance;
    }

/* Dynamic State 2: Ominous Theme (Overrides Parchment for Pill 1) */
body.theme-ominous .frame-canvas {
    background-color: #1a1a1a !important;
    filter: grayscale(100%) !important;
}

    body.theme-ominous .frame-canvas h1,
    body.theme-ominous .frame-canvas h2,
    body.theme-ominous .frame-canvas h3,
    body.theme-ominous .frame-canvas p,
    body.theme-ominous .frame-canvas li {
        color: #ffffff !important;
    }

#default-message {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    height: 100%;
    width: 100%;
}

    #default-message h3 {
        font-size: 2rem;
        margin-bottom: 20px;
        color: var(--sovereign-gold);
        text-wrap: balance;
    }

    #default-message p {
        font-size: 1.2rem;
        line-height: 1.6;
        width: 85%;
        max-width: 900px;
        margin: 0 auto 15px auto;
        color: #00E5FF;
        text-wrap: balance;
    }

/* Unified Nav Buttons */
.canvas-nav-btn {
    position: absolute;
    background: var(--sovereign-gold);
    color: black;
    border: none;
    border-radius: 15px;
    padding: 6px 14px;
    font-size: 0.8rem;
    font-weight: bold;
    z-index: 50;
    cursor: pointer;
}

#btn-close {
    top: 12px;
    right: 12px;
}

#btn-next {
    bottom: 12px;
    right: 12px;
    position: sticky;
    margin: 30px auto 10px auto;
    display: block;
}

/* --- NEW: Independent Map Modal Styling --- */
#map-modal {
    display: none;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(18, 18, 18, 0.95);
    backdrop-filter: blur(8px);
    z-index: 1000;
    padding: 2%;
}

#map-modal-content {
    width: 100%;
    height: 100%;
    position: relative;
    border: 2px solid var(--sovereign-gold);
    border-radius: 8px;
    box-shadow: 0 4px 25px rgba(0,0,0,0.8);
}

#map-modal-close {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #E11837;
    color: white;
    border: 2px solid var(--sovereign-gold);
    border-radius: 50%;
    width: 35px;
    height: 35px;
    font-weight: bold;
    cursor: pointer;
    z-index: 1010;
    display: flex;
    justify-content: center;
    align-items: center;
}

.frame-footer {
    height: 5svh;
    background-color: #050505;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.footer-pub {
    color: #20b2aa;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.75rem;
    letter-spacing: 1px;
    font-weight: bold;
}

#btn-lang-toggle {
    position: absolute;
    top: 12px;
    left: 12px;
    background: var(--sovereign-gold);
    color: black;
    border: none;
    border-radius: 12px;
    padding: 6px 12px;
    font-size: 0.8rem;
    font-weight: bold;
    cursor: pointer;
    z-index: 60;
}
