/* =========================================================================
   1. GLOBAL SYSTEM SETTINGS
   ========================================================================= */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

body {
    background-color: #0c0c0c;
    color: #E5E5E5;
    font-family: 'Courier New', 'Noto Sans Bengali', Courier, monospace;
    height: 100vh;
    height: 100dvh;
    width: 100vw;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    touch-action: manipulation;
    position: fixed;
}

/* BENGALI TYPOGRAPHY OVERRIDES */
:lang(bn), .bangla-font-active {
    font-family: 'Noto Sans Bengali', sans-serif !important;
}

:lang(bn) .brand-main, .bangla-font-active .brand-main,
:lang(bn) .boot-logo,  .bangla-font-active .boot-logo {
    letter-spacing: normal !important;
    font-weight: 700;
}

.bangla-font-active .text-button,
.bangla-font-active .choice-btn,
.bangla-font-active .toggle-btn,
.bangla-font-active .warning-btn,
.bangla-font-active p,
.bangla-font-active span,
.bangla-font-active div:not(.screen):not(.menu-container):not(.settings-box),
.bangla-font-active .highlight-text,
.bangla-font-active .card-label {
    letter-spacing: normal !important;
    word-spacing:   normal !important;
    line-height:    1.5 !important;
}

/* =========================================================================
   2. SCREEN STATE CONTROLLER
   ========================================================================= */
.screen {
    width: 100%;
    max-width: 600px;
    height: 100%;
    padding: clamp(15px, 5vw, 30px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    animation: screen-fade 0.4s ease-out forwards;
}

@keyframes screen-fade {
    from { opacity: 0; transform: scale(0.99); }
    to   { opacity: 1; transform: scale(1);    }
}

.hidden { display: none !important; }

/* =========================================================================
   3. BOOT SCREEN
   ========================================================================= */
.boot-container {
    width: 100%;
    text-align: center;
    padding: 20px;
}

.boot-logo {
    font-size: clamp(32px, 7vw, 56px);
    letter-spacing: 12px;
    margin-bottom: 5px;
    color: #E5E5E5;
    text-shadow: 0 0 15px rgba(212,175,55,0.2);
}

.boot-version {
    font-family: 'Courier New', monospace;
    font-size: 11px;
    letter-spacing: 4px;
    color: #555;
    margin-bottom: 40px;
}

.progress-wrapper {
    width: 100%;
    height: 2px;
    background-color: #1a1a1a;
    margin-bottom: 20px;
    position: relative;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background-color: #D4AF37;
    width: 0%;
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 0 8px #D4AF37;
}

.boot-status-box {
    font-family: 'Courier New', monospace;
    font-size: 10px;
    letter-spacing: 2px;
    color: #666;
    height: 20px;
}

/* =========================================================================
   4. MAIN MENU
   ========================================================================= */
.menu-container {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: stretch;
}

.game-branding {
    text-align: center;
    margin-bottom: clamp(40px, 10vw, 80px);
}

.brand-main {
    font-size: clamp(40px, 9vw, 68px);
    font-weight: bold;
    letter-spacing: 14px;
    color: #E5E5E5;
    margin: 0 0 15px 0;
    text-shadow: 0 0 18px rgba(212,175,55,0.35);
}

.brand-divider {
    height: 1px;
    background: linear-gradient(90deg, rgba(212,175,55,0) 0%, rgba(212,175,55,0.6) 50%, rgba(212,175,55,0) 100%);
    width: 80%;
    margin: 0 auto 15px auto;
}

.brand-sub-container {
    font-family: 'Courier New', monospace;
    font-size: clamp(12px, 3.5vw, 14px);
    letter-spacing: 3px;
    color: #888888;
    min-height: 24px;
}

.highlight-text { color: #E5E5E5; }

.menu-buttons {
    display: flex;
    flex-direction: column;
    gap: clamp(14px, 3.5vw, 22px);
    align-items: center;
}

.text-button {
    background: none;
    border: none;
    color: #888888;
    font-family: 'Courier New', monospace;
    font-size: clamp(14px, 4vw, 17px);
    letter-spacing: 5px;
    cursor: pointer;
    padding: 5px 10px;
    text-transform: uppercase;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    position: relative;
}

.text-button::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 1px;
    background-color: #D4AF37;
    transition: all 0.3s ease;
}

.text-button:hover {
    color: #D4AF37;
    transform: translateY(-1px);
    text-shadow: 0 0 8px rgba(212,175,55,0.4);
}

.text-button:hover::after { width: 100%; left: 0; }

/* =========================================================================
   5. SETTINGS / CHANGELOG / TUTORIAL
   ========================================================================= */
.top-navigation-bar {
    width: 100%;
    display: flex;
    justify-content: flex-start;
    margin-bottom: 30px;
}

.back-button {
    background: none;
    border: 1px solid #222;
    color: #666;
    font-family: 'Courier New', monospace;
    font-size: 11px;
    letter-spacing: 2px;
    padding: 8px 16px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.back-button:hover { border-color: #D4AF37; color: #D4AF37; }

h2 {
    font-size: 24px;
    letter-spacing: 6px;
    color: #E5E5E5;
    margin-bottom: 40px;
    text-align: center;
    width: 100%;
}

.settings-box {
    width: 100%;
    background-color: #111111;
    border: 1px solid #1a1a1a;
    padding: 30px;
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.setting-group {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.setting-label {
    font-family: 'Courier New', monospace;
    font-size: 13px;
    letter-spacing: 3px;
    color: #888;
}

.brutalist-toggle {
    display: flex;
    border: 1px solid #333;
    background-color: #0c0c0c;
    padding: 2px;
}

.toggle-btn {
    background: none;
    border: none;
    color: #555;
    font-family: 'Courier New', monospace;
    font-size: 11px;
    letter-spacing: 2px;
    padding: 6px 14px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.toggle-btn.active {
    background-color: #D4AF37;
    color: #0c0c0c;
    font-weight: bold;
}

.changelog-container {
    max-height: 60vh;
    overflow-y: auto;
    padding-right: 12px;
    margin-top: 20px;
    scrollbar-width: thin;
    scrollbar-color: #D4AF37 #121212;
    -webkit-overflow-scrolling: touch;
}

.changelog-container::-webkit-scrollbar       { width: 6px; }
.changelog-container::-webkit-scrollbar-track { background: #121212; border-radius: 2px; }
.changelog-container::-webkit-scrollbar-thumb { background-color: #D4AF37; border-radius: 2px; }

.changelog-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.changelog-list li {
    font-family: 'Courier New', Courier, monospace;
    font-size: 13px;
    line-height: 1.6;
    color: #A5A5A5;
    border-left: 2px solid #222;
    padding-left: 15px;
    transition: border-color 0.3s ease;
}

.changelog-list li:hover { border-left-color: #D4AF37; }

.version-tag {
    color: #D4AF37;
    font-weight: bold;
    display: inline-block;
    width: 55px;
}

.changelog-list li.latest-version {
    border-left-color: #D4AF37 !important;
    background: linear-gradient(90deg, rgba(212,175,55,0.04) 0%, rgba(0,0,0,0) 100%);
}

.tutorial-container {
    width: 100%;
    max-height: 60vh;
    overflow-y: auto;
    padding-right: 10px;
    display: flex;
    flex-direction: column;
    gap: 25px;
    scrollbar-width: thin;
    scrollbar-color: #444 #111;
}

.tutorial-container::-webkit-scrollbar       { width: 4px; }
.tutorial-container::-webkit-scrollbar-track { background: #111; }
.tutorial-container::-webkit-scrollbar-thumb { background: #444; }

.tutorial-section { border-left: 1px solid #222; padding-left: 20px; }

.tutorial-tag {
    font-family: 'Courier New', monospace;
    font-size: 11px;
    letter-spacing: 3px;
    color: #D4AF37;
    display: block;
    margin-bottom: 8px;
}

.tutorial-container p {
    font-family: 'Courier New', monospace;
    font-size: 13px;
    line-height: 1.6;
    color: #999;
}

/* =========================================================================
   6. PRE-BIRTH CHARACTER / FAMILY SELECTION
   ========================================================================= */
.intro-narrative-box {
    text-align: center;
    color: #E5E5E5;
    font-size: clamp(13px, 4.2vw, 15px);
    line-height: 1.8;
    max-width: 480px;
    margin: 0 auto;
    white-space: pre-line;
}

.choice-buttons-wrapper {
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 100%;
    max-width: 340px;
    margin: 30px auto 0 auto;
}

.choice-btn {
    background-color: #0c0c0c;
    border: 1px solid #252525;
    padding: 18px 20px;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.25, 0.8, 0.25, 1);
    display: flex;
    justify-content: center;
    align-items: center;
}

.choice-btn:not(.active):hover {
    border-color: #D4AF37;
    background-color: #121212;
    transform: translateY(-1px);
    box-shadow: 0 0 10px rgba(212,175,55,0.15);
}

.choice-btn.active {
    border-color: #D4AF37 !important;
    background-color: #1c180e !important;
    box-shadow: 0 0 15px rgba(212,175,55,0.3) !important;
    transform: none !important;
    cursor: default;
}

.card-label {
    font-family: 'Courier New', monospace;
    font-size: 12px;
    letter-spacing: 3px;
    color: #A5A5A5;
    font-weight: bold;
    transition: color 0.2s ease;
}

.choice-btn:hover .card-label,
.choice-btn.active .card-label { color: #D4AF37; }

.action-confirmation-container {
    width: 100%;
    display: flex;
    justify-content: center;
    margin-top: 35px;
}

.confirm-action-btn {
    background-color: #D4AF37;
    border: 1px solid #D4AF37;
    color: #0c0c0c;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    font-weight: bold;
    letter-spacing: 4px;
    padding: 16px 48px;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(212,175,55,0.15);
    transition: all 0.3s ease;
}

.confirm-action-btn:hover {
    background-color: #e5be43;
    transform: translateY(-1px);
    box-shadow: 0 6px 24px rgba(212,175,55,0.25);
}

/* =========================================================================
   7. GAMEPLAY SCREEN — FIXED SPACING & NO DOUBLE HOVER
   ========================================================================= */
.gameplay-screen {
    justify-content: flex-start !important;
    align-items: stretch !important;
    padding: clamp(10px, 3vw, 18px) clamp(12px, 4vw, 24px) !important;
    max-width: 640px !important;
    overflow-y: auto;
    scrollbar-width: none;
    gap: 0;
}

.gameplay-screen::-webkit-scrollbar { display: none; }

.gp-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: clamp(10px, 2.5vw, 16px);
    padding-bottom: 10px;
    border-bottom: 1px solid #161616;
}

.gp-brand {
    font-family: 'Courier New', monospace;
    font-size: clamp(13px, 3.5vw, 16px);
    font-weight: bold;
    letter-spacing: 6px;
    color: #E5E5E5;
    text-shadow: 0 0 12px rgba(212,175,55,0.2);
}

.gp-separator {
    font-size: 11px;
    letter-spacing: 2px;
    color: #333;
}

.gp-status {
    font-family: 'Courier New', monospace;
    font-size: 9px;
    letter-spacing: 2px;
    color: #555;
    text-transform: uppercase;
}

.gp-age-display {
    font-family: 'Courier New', monospace;
    font-size: clamp(14px, 4vw, 18px);
    font-weight: bold;
    color: #888;
    margin-left: 2px;
}

.gp-stats-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: clamp(5px, 1.5vw, 8px);
    width: 100%;
    margin-bottom: clamp(10px, 2.5vw, 14px);
}

.gp-stat-card {
    background-color: #090909;
    border: 1px solid #1c1c1c;
    padding: clamp(6px, 1.5vw, 10px) clamp(8px, 2vw, 12px);
    display: flex;
    flex-direction: column;
    gap: 4px;
    position: relative;
    overflow: visible;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.gp-stat-card.stat-flash {
    animation: stat-flash-pulse 0.4s ease-out forwards;
}

@keyframes stat-flash-pulse {
    0%   { border-color: #D4AF37; box-shadow: 0 0 8px rgba(212,175,55,0.25); }
    100% { border-color: #1c1c1c; box-shadow: none; }
}

.gp-stat-name {
    font-family: 'Courier New', monospace;
    font-size: clamp(7px, 1.6vw, 9px);
    letter-spacing: 1.5px;
    color: #555;
    text-transform: uppercase;
    white-space: nowrap;
}

.gp-stat-val {
    font-family: 'Courier New', monospace;
    font-size: clamp(14px, 3.5vw, 20px);
    font-weight: bold;
    color: #D0D0D0;
    line-height: 1;
}

/* Colour coding for stats */
.stat-health .gp-stat-name,
.stat-health .gp-stat-val   { color: #e05050 !important; }
.stat-money  .gp-stat-name,
.stat-money  .gp-stat-val   { color: #D4AF37 !important; }
.stat-respect .gp-stat-val  { color: #7eb8d4 !important; }
.stat-iq      .gp-stat-val  { color: #9b88d4 !important; }
.stat-strength .gp-stat-val { color: #d48888 !important; }

.gp-divider {
    height: 1px;
    background: linear-gradient(90deg, rgba(212,175,55,0) 0%, rgba(212,175,55,0.35) 50%, rgba(212,175,55,0) 100%);
    width: 100%;
    margin: 12px 0 20px 0;
    flex-shrink: 0;
}

/* STORY CANVAS – fixed bottom margin */
.gp-story-canvas {
    margin-bottom: 28px;
    width: 100%;
}

.gp-story-text {
    font-family: 'Courier New', monospace;
    font-size: clamp(12px, 3.2vw, 14px);
    line-height: 1.75;
    color: #C8C8C8;
    white-space: pre-line;
}

/* CHOICE VIEWPORT – proper top margin, no auto centering tricks */
.gp-choice-viewport {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 16px;
    margin-bottom: 20px;
}

/* =========================================================================
   8. GAMEPLAY CHOICE CARDS – single stat indicator, no hover overlay
   ========================================================================= */
.gameplay-choice-card {
    background-color: #0a0a0a;
    border: 1px solid #1e1e1e;
    padding: 0;
    cursor: pointer;
    width: 100%;
    text-align: left;
    transition: border-color 0.2s ease, background-color 0.2s ease, transform 0.15s ease;
}

.gameplay-choice-card:hover:not(:disabled) {
    border-color: #D4AF37;
    background-color: #0f0d08;
    transform: translateY(-1px);
}

.choice-card-inner {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    padding: clamp(12px, 2.5vw, 16px) clamp(14px, 3vw, 18px);
    gap: 12px;
}

.gameplay-choice-card .card-label {
    font-family: 'Courier New', monospace;
    font-size: clamp(11px, 2.8vw, 13px);
    letter-spacing: 2px;
    color: #A5A5A5;
    font-weight: bold;
    flex-shrink: 0;
}

.gameplay-choice-card:hover:not(:disabled) .card-label {
    color: #D4AF37;
}

/* Single stat indicator – always visible */
.choice-effect-subtitle {
    font-family: 'Courier New', monospace;
    font-size: clamp(8px, 1.8vw, 9px);
    letter-spacing: 1px;
    color: #888;
    text-align: right;
    line-height: 1.4;
    flex-shrink: 0;
}

/* No hover overlay – removed completely */
.choice-hover-fx {
    display: none !important;
}

/* Selected card */
.gameplay-choice-card.choice-selected {
    border-color: #D4AF37 !important;
    background-color: #0f0d08 !important;
    cursor: default;
    transform: none !important;
}

.gameplay-choice-card.choice-selected .card-label {
    color: #D4AF37 !important;
}

/* RESULT BOX – directly under chosen card with proper gap */
.choice-result-box {
    font-family: 'Courier New', monospace;
    font-size: clamp(11px, 2.5vw, 12px);
    letter-spacing: 0.5px;
    color: #aaa;
    line-height: 1.65;
    padding: 12px 16px;
    border-left: 2px solid #D4AF37;
    margin-top: 20px;
    margin-bottom: 8px;
    background-color: #0a0a0a;
    animation: result-fade-in 0.3s ease-out;
}

@keyframes result-fade-in {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Floating delta indicator for stat changes */
.stat-delta-indicator {
    position: absolute;
    top: 0;
    right: 6px;
    font-family: 'Courier New', monospace;
    font-size: 10px;
    font-weight: bold;
    background: #0c0c0c;
    padding: 2px 4px;
    border-radius: 2px;
    animation: delta-fade 0.8s ease-out forwards;
    pointer-events: none;
    z-index: 5;
}

.stat-delta-indicator.delta-positive {
    color: #5fa85f;
    text-shadow: 0 0 2px #2a5a2a;
}

.stat-delta-indicator.delta-negative {
    color: #e05050;
    text-shadow: 0 0 2px #5a2a2a;
}

@keyframes delta-fade {
    0%   { opacity: 1; transform: translateY(0); }
    70%  { opacity: 0.8; transform: translateY(-12px); }
    100% { opacity: 0; transform: translateY(-18px); display: none; }
}

/* =========================================================================
   9. BENGALI FONT COMPLIANCE FOR GAMEPLAY
   ========================================================================= */
.bangla-font-active .gp-brand,
.bangla-font-active .gp-stat-name,
.bangla-font-active .gp-stat-val,
.bangla-font-active .gp-story-text,
.bangla-font-active .gp-age-display {
    letter-spacing: normal !important;
}

.bangla-font-active .gp-stat-name { font-size: 8px !important; }
.bangla-font-active .gp-stat-val  { font-size: clamp(13px, 3.2vw, 18px) !important; }

/* =========================================================================
   10. CINEMATIC TRANSITION LAYER
   ========================================================================= */
.transition-viewport-layer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: #0c0c0c;
    z-index: 99999;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    pointer-events: none;
    transition: opacity 0.6s cubic-bezier(0.25, 1, 0.3, 1);
}

.birth-card-scroller {
    position: absolute;
    font-family: 'Courier New', monospace;
    font-size: clamp(48px, 12vw, 96px);
    font-weight: bold;
    letter-spacing: 16px;
    color: #161616;
    text-transform: uppercase;
    opacity: 0;
    width: 100%;
    text-align: center;
}

.animate-born-exit {
    animation: born-exit-trigger 2.6s cubic-bezier(0.76, 0, 0.24, 1) forwards;
}

.animate-age-enter {
    animation: age-enter-trigger 2.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes born-exit-trigger {
    0%   { transform: scale(0.7) translateY(60px);   color: #161616; opacity: 0; }
    15%  { transform: scale(1.0) translateY(0px);    color: #E5E5E5; opacity: 1; }
    80%  { transform: scale(1.0) translateY(0px);    color: #E5E5E5; opacity: 1; filter: blur(0px); }
    100% { transform: scale(1.3) translateY(-120px); color: #D4AF37; opacity: 0; filter: blur(8px); }
}

@keyframes age-enter-trigger {
    0%   { transform: scale(0.8) translateY(80px);  color: #161616; opacity: 0; filter: blur(4px); }
    25%  { transform: scale(1.0) translateY(0px);   color: #D4AF37; opacity: 1; filter: blur(0px); text-shadow: 0 0 25px rgba(212,175,55,0.4); }
    80%  { transform: scale(1.0) translateY(0px);   color: #D4AF37; opacity: 1; filter: blur(0px); }
    100% { transform: scale(1.05);                  color: #E5E5E5; opacity: 0; }
}

/* =========================================================================
   11. WARNING MODAL
   ========================================================================= */
.warning-modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(6, 6, 6, 0.85);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 999999;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.warning-modal-box {
    background-color: #0f0f0f;
    border: 1px solid #ea4335;
    width: 100%;
    max-width: 460px;
    padding: clamp(20px, 6vw, 35px);
    box-shadow: 0 10px 40px rgba(234,67,53,0.12);
    animation: modal-slide-up 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes modal-slide-up {
    from { opacity: 0; transform: translateY(15px) scale(0.98); }
    to   { opacity: 1; transform: translateY(0)    scale(1);    }
}

.warning-title {
    font-family: 'Courier New', monospace;
    font-size: 15px;
    letter-spacing: 4px;
    color: #ea4335;
    margin-bottom: 20px;
    font-weight: bold;
}

.warning-text {
    font-family: 'Courier New', monospace;
    font-size: 13px;
    line-height: 1.7;
    color: #999999;
    margin-bottom: 30px;
}

.warning-actions {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
}

.warning-btn {
    font-family: 'Courier New', monospace;
    font-size: 11px;
    font-weight: bold;
    letter-spacing: 2px;
    padding: 12px 24px;
    cursor: pointer;
    background: none;
    text-transform: uppercase;
    transition: all 0.2s ease;
}

.warning-btn-cancel           { border: 1px solid #333; color: #666; }
.warning-btn-cancel:hover     { border-color: #555; color: #a5a5a5; }
.warning-btn-confirm          { border: 1px solid #ea4335; color: #ea4335; background-color: rgba(234,67,53,0.03); }
.warning-btn-confirm:hover    { background-color: #ea4335; color: #0c0c0c; box-shadow: 0 0 15px rgba(234,67,53,0.3); }

/* =========================================================================
   12. END CREDITS SCREEN
   ========================================================================= */
.credits-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(145deg, #0a0a0a 0%, #000000 100%);
    z-index: 1000000;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Courier New', monospace;
    overflow-y: auto;
    padding: 20px;
    animation: credits-fade-in 0.6s ease-out;
}

@keyframes credits-fade-in {
    from { opacity: 0; backdrop-filter: blur(0px); }
    to   { opacity: 1; backdrop-filter: blur(2px); }
}

.credits-container {
    max-width: 550px;
    width: 100%;
    background: #111111;
    border: 1px solid #D4AF37;
    padding: 28px 22px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.5), 0 0 0 2px rgba(212,175,55,0.2);
    animation: credits-slide-up 0.5s cubic-bezier(0.2, 0.9, 0.4, 1.1);
}

@keyframes credits-slide-up {
    from { transform: translateY(40px); opacity: 0; }
    to   { transform: translateY(0); opacity: 1; }
}

.credits-title {
    text-align: center;
    font-size: 32px;
    letter-spacing: 6px;
    font-weight: bold;
    color: #D4AF37;
    margin-bottom: 20px;
    border-bottom: 1px solid #2a2a2a;
    display: inline-block;
    width: 100%;
    padding-bottom: 8px;
}

.credits-sub {
    text-align: center;
    font-size: 12px;
    color: #888;
    margin-bottom: 30px;
    letter-spacing: 2px;
}

.credits-story {
    background: #0c0c0c;
    padding: 18px;
    margin: 20px 0;
    border-left: 3px solid #D4AF37;
    font-size: 13px;
    line-height: 1.65;
    color: #bbb;
}

.credits-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px 20px;
    margin: 20px 0;
    background: #0a0a0a;
    padding: 16px;
    border: 1px solid #222;
}

.stat-line {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    letter-spacing: 1px;
}
.stat-label {
    color: #888;
}
.stat-value {
    color: #D4AF37;
    font-weight: bold;
}

.credits-title-tag {
    text-align: center;
    margin: 20px 0 30px;
    font-size: 20px;
    font-weight: bold;
    color: #e0e0e0;
    background: #1a1a1a;
    padding: 12px;
    letter-spacing: 3px;
    border: 1px solid #D4AF37;
}

.credits-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-top: 20px;
}

.credits-btn {
    background: none;
    border: 1px solid #D4AF37;
    color: #D4AF37;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    font-weight: bold;
    letter-spacing: 3px;
    padding: 12px 24px;
    cursor: pointer;
    transition: 0.2s;
    text-transform: uppercase;
}
.credits-btn:hover {
    background: #D4AF37;
    color: #0c0c0c;
    box-shadow: 0 0 12px rgba(212,175,55,0.4);
}

/* Bangla support for credits screen */
.bangla-font-active .credits-container,
.bangla-font-active .credits-story,
.bangla-font-active .stat-line,
.bangla-font-active .credits-title-tag {
    font-family: 'Noto Sans Bengali', sans-serif !important;
    letter-spacing: normal;
}

.bangla-font-active .credits-title {
    letter-spacing: normal;
}

/* GAME OVER ANIMATION */
.gameover-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: black;
    z-index: 1000001;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Courier New', monospace;
    font-size: clamp(32px, 12vw, 80px);
    font-weight: bold;
    color: #D4AF37;
    text-shadow: 0 0 20px rgba(212,175,55,0.8);
    letter-spacing: 8px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.8s ease;
}
.gameover-overlay.visible {
    opacity: 1;
}

/* SHARING MODAL */
.share-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.85);
    backdrop-filter: blur(8px);
    z-index: 1000002;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Courier New', monospace;
}
.share-card {
    background: #111;
    border: 1px solid #D4AF37;
    max-width: 400px;
    width: 90%;
    padding: 24px 20px;
    text-align: center;
    animation: modal-slide-up 0.3s ease;
}
.share-card h3 {
    color: #D4AF37;
    margin-bottom: 20px;
    letter-spacing: 3px;
}
.share-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    margin: 20px 0;
}
.share-option {
    background: #1a1a1a;
    border: 1px solid #333;
    color: #ddd;
    padding: 10px 16px;
    font-family: monospace;
    font-size: 14px;
    cursor: pointer;
    transition: 0.2s;
}
.share-option:hover {
    border-color: #D4AF37;
    color: #D4AF37;
}
.close-share {
    margin-top: 20px;
    background: none;
    border: none;
    color: #888;
    text-decoration: underline;
    cursor: pointer;
}

/* Ensure credits card has proper Bangla font support */
.bangla-font-active .credits-container,
.bangla-font-active .credits-story,
.bangla-font-active .stat-line,
.bangla-font-active .credits-title-tag {
    font-family: 'Noto Sans Bengali', sans-serif !important;
    letter-spacing: normal;
}
.bangla-font-active .credits-title {
    letter-spacing: normal;
}

/*Bug report styles */
/* =========================================================================
   13. PREMIUM BUG REPORTING SYSTEM
   ========================================================================= */
.gp-bug-btn {
    margin-left: auto; /* Pushes button to the far top right of the header strip */
    background: none;
    border: 1px solid #1c1c1c;
    color: #555;
    padding: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.gp-bug-btn:hover {
    border-color: #D4AF37;
    color: #D4AF37;
    box-shadow: 0 0 8px rgba(212, 175, 55, 0.25);
}

.bug-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 1000003; /* Positioned securely over gameplay layouts */
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Courier New', monospace;
    padding: 20px;
}

.bug-card {
    background: #111;
    border: 1px solid #D4AF37;
    max-width: 420px;
    width: 100%;
    padding: 24px 20px;
    position: relative;
    box-shadow: 0 20px 40px rgba(0,0,0,0.6);
    animation: modal-slide-up 0.3s ease;
}

.bug-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 1px solid #222;
    padding-bottom: 8px;
}

.bug-card h3 {
    color: #D4AF37;
    margin: 0;
    letter-spacing: 2px;
    font-size: 14px;
}

.bug-close-btn {
    background: none;
    border: none;
    color: #666;
    font-size: 24px;
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s;
}

.bug-close-btn:hover {
    color: #e05050;
}

.bug-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 16px;
    text-align: left;
}

.bug-field label {
    font-size: 10px;
    color: #666;
    letter-spacing: 2px;
    font-weight: bold;
}

.bug-field input, 
.bug-field textarea {
    background: #090909;
    border: 1px solid #222;
    color: #E5E5E5;
    padding: 10px 12px;
    font-family: 'Courier New', monospace;
    font-size: 13px;
    outline: none;
    border-radius: 0;
    transition: border-color 0.2s;
    width: 100%;
}

.bug-field input:focus, 
.bug-field textarea:focus {
    border-color: #D4AF37;
}

.bug-submit-btn {
    width: 100%;
    background: none;
    border: 1px solid #D4AF37;
    color: #D4AF37;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    font-weight: bold;
    letter-spacing: 2px;
    padding: 12px;
    cursor: pointer;
    transition: 0.2s;
    text-transform: uppercase;
}

.bug-submit-btn:hover {
    background: #D4AF37;
    color: #0c0c0c;
    box-shadow: 0 0 12px rgba(212,175,55,0.4);
}

.bug-success-text {
    color: #C8C8C8;
    font-size: 13px;
    line-height: 1.7;
    text-align: left;
    border-left: 2px solid #D4AF37;
    padding-left: 14px;
    margin: 15px 0 5px 0;
    min-height: 44px;
    word-break: break-word;
}

/* Ensure font alignment fixes hold valid for Bangla overrides */
.bangla-font-active .bug-card,
.bangla-font-active .bug-success-text {
    font-family: 'Noto Sans Bengali', sans-serif !important;
    letter-spacing: normal !important;
}
/* click to continue*/
.choice-result-box {
    padding: 15px;
    margin-top: 10px;
    background: rgba(0, 0, 0, 0.05);
    border-left: 3px solid #4a90e2;
    animation: fadeIn 0.3s forwards;
}

.continue-hint {
    margin-top: 10px;
    font-style: italic;
    color: #555;
    user-select: none;
}