/* ========================================================== */
/* INDIC ATLAS - GAME STYLES                                 */
/* ========================================================== */

/* Header Start Button */
#game-start-button {
    font-size: 14px;
    font-weight: bold;
    color: var(--primary-blue, #3388ff);
    background: #e6f3ff;
    border: 1px solid var(--primary-blue, #3388ff);
    border-radius: 5px;
    padding: 6px 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-left: auto;
}

#game-start-button:hover {
    background: var(--primary-blue, #3388ff);
    color: white;
}

/* Container Fullscreen Alignment & Scrolling */
#container.game-mode-active #details {
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    text-align: center;
    overflow-y: auto;
    padding: 0;
    box-sizing: border-box;
    background: #ffffff;
}

/* In-Game Quiz Active Panel */
#game-panel {
    padding: 20px 16px;
    text-align: center;
    max-width: 520px;
    width: 100%;
    margin: 0 auto;
    box-sizing: border-box;
}

/* Question Category Badge */
.game-category-tag {
    display: inline-block;
    font-size: 11px;
    font-weight: 800;
    color: #0284c7;
    background-color: #e0f2fe;
    border: 1px solid #bae6fd;
    padding: 3px 12px;
    border-radius: 12px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 12px;
}

#game-question {
    font-size: 1.35em;
    font-weight: 600;
    margin-bottom: 16px;
    color: #2c3e50;
    line-height: 1.45;
}

#game-answer-progress {
    min-height: 0.5em;
    margin-bottom: 12px;
}

/* Map Overlays */
#game-timer-map-overlay {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 1001;
    background: rgba(15, 23, 42, 0.85);
    color: white;
    font-family: 'Courier New', Courier, monospace;
    font-size: 1.7em;
    font-weight: bold;
    padding: 6px 14px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.35);
    display: none;
    border: 1px solid rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(4px);
}

#game-score-tracker {
    font-size: 1.15em;
    color: #444;
    margin-bottom: 25px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.score-line {
    padding: 6px 14px;
    border-radius: 6px;
    width: 80%;
    max-width: 220px;
    text-align: center;
    font-weight: 600;
}

.score-line-correct {
    border: 1.5px solid #28a745;
    background-color: #f0fff4;
    color: #1e7e34;
}

.score-line-progress {
    border: 1.5px solid #3388ff;
    background-color: #f0f7ff;
    color: #0d47a1;
}

/* Ultra-Compact Map Floating Status Pill (Fits between Back & Home on all screens) */
#confirm-answer-container {
    position: absolute;
    bottom: 14px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1001;
    text-align: center;
    display: none;
    pointer-events: none;
    width: auto;
    max-width: calc(100vw - 160px);
}

.map-floating-hint-pill {
    background: rgba(15, 23, 42, 0.94);
    color: #4ade80;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 11.5px;
    font-weight: 700;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(74, 222, 128, 0.35);
    backdrop-filter: blur(4px);
    white-space: nowrap;
    letter-spacing: 0.3px;
    animation: pill-pulse 1.8s infinite ease-in-out;
}

@keyframes pill-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.03); }
}

/* Final Score & Performance Report Screens */
#game-final-score-container,
#game-report-container {
    text-align: center;
    padding: 24px 20px;
    max-width: 540px;
    width: 100%;
    margin: 0 auto;
    box-sizing: border-box;
    padding-bottom: max(60px, calc(40px + env(safe-area-inset-bottom, 0px)));
}

#game-final-score-container h2,
#game-report-container h2 {
    font-size: 1.6em;
    color: #333;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 2px solid var(--primary-blue, #3388ff);
    padding-bottom: 6px;
    text-align: left;
}

#game-final-score {
    font-size: 3.2em;
    font-weight: bold;
    color: var(--primary-blue, #3388ff);
    margin-bottom: 25px;
}

.final-actions-container {
    margin-top: 25px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    width: 100%;
}

#game-change-mode-btn,
#game-quit-btn,
#game-report-btn {
    padding: 12px 28px;
    font-size: 1.05em;
    font-weight: bold;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 220px;
    max-width: 260px;
    box-sizing: border-box;
    border: 2px solid transparent;
}

#game-change-mode-btn {
    background-color: var(--primary-blue, #3388ff);
    color: white;
    border-color: var(--primary-blue, #3388ff);
}
#game-change-mode-btn:hover { background-color: #2968cc; }

#game-quit-btn {
    background-color: #f44336;
    color: white;
    border-color: #f44336;
}
#game-quit-btn:hover { background-color: #c62828; }

#game-report-btn {
    background-color: #28a745;
    color: white;
    border-color: #28a745;
}
#game-report-btn:hover { background-color: #218838; }

.report-list {
    list-style: none;
    padding: 0;
    margin-top: 20px;
    text-align: left;
    width: 100%;
}

.report-item {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 14px 16px;
    margin-bottom: 12px;
}

.report-item.incorrect { border-left: 5px solid #f44336; }
.report-item.correct { border-left: 5px solid #28a745; }

.report-question {
    font-size: 1.05em;
    margin-bottom: 6px;
    color: #343a40;
}

.report-answer {
    color: #495057;
    font-size: 0.95em;
    margin-top: 4px;
}

/* Sleek Gaming-Native Back Buttons */
.back-btn {
    padding: 6px 14px;
    font-size: 13px;
    font-weight: 700;
    color: #334155;
    background: #f1f5f9;
    border: 1.5px solid #cbd5e1;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.18s ease;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    user-select: none;
}

.back-btn:hover {
    background: #0f172a;
    color: #ffffff;
    border-color: #0f172a;
    transform: translateX(-2px);
    box-shadow: 0 3px 8px rgba(15, 23, 42, 0.2);
}

#bottom-back-settings-btn {
    background: #f8fafc;
    border-color: #94a3b8;
    color: #1e293b;
    padding: 9px 20px;
}

#bottom-back-settings-btn:hover {
    background: #0f172a;
    color: #ffffff;
    border-color: #0f172a;
}

/* Floating Navigation Buttons on Map */
.game-nav-btn {
    padding: 7px 15px;
    font-size: 12px;
    font-weight: 700;
    border: 1.5px solid #64748b;
    color: #1e293b;
    background-color: rgba(255, 255, 255, 0.96);
    border-radius: 20px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.18);
    cursor: pointer;
    transition: all 0.15s ease;
    user-select: none;
    backdrop-filter: blur(6px);
}

.game-nav-btn:hover {
    background-color: #0f172a;
    color: #ffffff;
    border-color: #0f172a;
    transform: translateY(-2px);
    box-shadow: 0 5px 14px rgba(15, 23, 42, 0.35);
}

.game-nav-map-btn {
    position: absolute;
    z-index: 1001;
    display: none;
}

#game-map-back-btn { bottom: 14px; left: 14px; }
#game-map-home-btn { bottom: 14px; right: 14px; }

/* 3-Screen Arena UI Layout */
.arena-wrapper {
    width: 100%;
    max-width: 540px;
    background: #ffffff;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    text-align: left;
    box-sizing: border-box;
}

.arena-header {
    padding: 16px 20px 14px;
    border-bottom: 2px solid var(--primary-blue, #3388ff);
    background: #ffffff;
    position: sticky;
    top: 0;
    z-index: 100;
}

.arena-header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.arena-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #111827;
    margin: 0;
}

.arena-subtitle {
    font-size: 0.85rem;
    color: #666;
    margin-top: 3px;
}

.arena-content {
    flex: 1;
    padding: 18px 20px;
    padding-bottom: max(95px, calc(75px + env(safe-area-inset-bottom, 0px)));
    overflow-y: auto;
    box-sizing: border-box;
}

/* Screen 1 Mode Cards */
.mode-button-group {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 10px;
}

.mode-entry-card {
    border: 2px solid #dee2e6;
    border-radius: 12px;
    padding: 18px 20px;
    background: #ffffff;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: space-between;
    text-align: left;
    position: relative;
}

.mode-entry-card:hover {
    border-color: var(--primary-blue, #3388ff);
    background: #fbfdff;
    transform: translateY(-2px);
    box-shadow: 0 4px 14px rgba(51, 136, 255, 0.15);
}

.mode-badge-top {
    position: absolute;
    top: -9px;
    right: 18px;
    font-size: 10px;
    font-weight: 800;
    color: #ffffff;
    background: #0d47a1;
    padding: 2px 8px;
    border-radius: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.mode-entry-title {
    font-size: 16px;
    font-weight: 700;
    color: #111827;
}

.mode-entry-desc {
    font-size: 12.5px;
    color: #555;
    margin-top: 5px;
    line-height: 1.45;
}

.mode-entry-arrow {
    font-size: 20px;
    color: var(--primary-blue, #3388ff);
    font-weight: bold;
    margin-left: 12px;
}

/* Screen 2 Accordion & Quick Actions */
.quick-action-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    background: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
}

.quick-btn {
    padding: 4px 10px;
    font-size: 11.5px;
    font-weight: 600;
    background: #ffffff;
    color: #2968cc;
    border: 1px solid #ced4da;
    border-radius: 14px;
    cursor: pointer;
}

.quick-btn:hover {
    background: #e6f3ff;
    border-color: #3388ff;
}

.pool-badge {
    font-size: 11.5px;
    font-weight: 700;
    color: #155724;
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    padding: 3px 8px;
    border-radius: 12px;
}

.subject-card {
    border: 1.5px solid #dee2e6;
    border-radius: 10px;
    margin-bottom: 12px;
    background: #ffffff;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    overflow: hidden;
}

.subject-card.has-selected {
    border-color: #b8daff;
}

.subject-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    background: #ffffff;
    cursor: pointer;
    user-select: none;
}

.subject-card.has-selected .subject-card-header {
    background: #fbfdff;
}

.subject-left {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
}

.custom-checkbox {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--primary-blue, #3388ff);
}

.subject-title {
    font-size: 14px;
    font-weight: 700;
    color: #212529;
}

.subject-count-tag {
    font-size: 11px;
    color: #666;
    font-weight: normal;
}

.accordion-arrow {
    font-size: 12px;
    color: #6c757d;
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 4px 6px;
    user-select: none;
}

.expand-text {
    font-size: 11px;
    color: #0277bd;
    font-weight: 600;
    text-transform: lowercase;
}

.accordion-chevron {
    transition: transform 0.2s ease;
    display: inline-block;
}

.subject-card.open .accordion-chevron {
    transform: rotate(180deg);
}

.layer-drawer {
    display: none;
    padding: 8px 14px 12px 42px;
    background: #f8fbff;
    border-top: 1px solid #eef3f8;
    flex-direction: column;
    gap: 8px;
}

.subject-card.open .layer-drawer {
    display: flex;
}

.layer-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 4px 0;
    cursor: pointer;
}

.layer-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #333;
    cursor: pointer;
}

.layer-badge {
    font-size: 10.5px;
    color: #666;
    background: #e9ecef;
    padding: 2px 6px;
    border-radius: 10px;
}

/* Single Select Cards */
.simple-card-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 6px;
}

.selectable-card {
    border: 1.5px solid #dee2e6;
    border-radius: 10px;
    padding: 14px 16px;
    cursor: pointer;
    transition: all 0.15s ease;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #ffffff;
}

.selectable-card:hover {
    border-color: var(--primary-blue, #3388ff);
    background: #f0f7ff;
}

.selectable-card.active {
    border-color: var(--primary-blue, #3388ff);
    background: #f0f7ff;
    box-shadow: 0 2px 8px rgba(51, 136, 255, 0.2);
}

.selectable-title {
    font-size: 14px;
    font-weight: 700;
    color: #111827;
}

.selectable-desc {
    font-size: 12px;
    color: #666;
    margin-top: 2px;
}

/* Screen 3 Settings */
.settings-section {
    margin-bottom: 24px;
}

.settings-section h3 {
    font-size: 14.5px;
    font-weight: 700;
    color: #111;
    margin: 0 0 12px 0;
    border-bottom: 1.5px solid var(--primary-blue, #3388ff);
    padding-bottom: 5px;
}

.settings-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.settings-chip {
    border: 1.5px solid #dee2e6;
    border-radius: 8px;
    padding: 10px 6px;
    text-align: center;
    cursor: pointer;
    font-size: 13.5px;
    font-weight: 600;
    background: #ffffff;
    transition: all 0.15s ease;
    user-select: none;
}

.settings-chip:hover {
    border-color: var(--primary-blue, #3388ff);
    background: #e6f3ff;
}

.settings-chip.active {
    background: var(--primary-blue, #3388ff);
    border-color: var(--primary-blue, #3388ff);
    color: #ffffff;
    box-shadow: 0 2px 6px rgba(51, 136, 255, 0.3);
}

.settings-chip.highlight-special {
    border-color: #28a745;
    color: #218838;
    background: #f4fbf6;
}

.settings-chip.highlight-special.active {
    background: #28a745;
    border-color: #28a745;
    color: #ffffff;
}

.settings-chip.disabled {
    background: #f1f3f5 !important;
    border-color: #e2e8f0 !important;
    color: #a0aec0 !important;
    cursor: not-allowed !important;
    box-shadow: none !important;
    opacity: 0.6;
}

.custom-input-row {
    margin-top: 10px;
    display: none;
    align-items: center;
    gap: 10px;
    background: #f8f9fa;
    padding: 10px 14px;
    border-radius: 8px;
    border: 1px solid #dee2e6;
}

.custom-input-row.visible {
    display: flex;
}

.custom-number-input {
    width: 80px;
    padding: 6px 10px;
    font-size: 14px;
    border: 1.5px solid var(--primary-blue, #3388ff);
    border-radius: 6px;
    outline: none;
}

/* Sticky Bottom Action Bar */
.bottom-action-bar {
    position: fixed;
    bottom: 0;
    width: 100%;
    max-width: 540px;
    background: #ffffff;
    border-top: 1px solid #dee2e6;
    padding: 12px 20px max(16px, env(safe-area-inset-bottom, 16px));
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 -4px 12px rgba(0,0,0,0.05);
    z-index: 100;
}

.selection-summary {
    display: flex;
    flex-direction: column;
}

.summary-main {
    font-size: 13px;
    font-weight: 700;
    color: #111827;
}

.summary-sub {
    font-size: 11.5px;
    color: #666;
}

.next-btn {
    background: #28a745;
    color: #ffffff;
    border: none;
    border-radius: 24px;
    padding: 10px 22px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.15s ease, transform 0.1s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.next-btn:hover {
    background: #218838;
    transform: translateY(-1px);
}

.next-btn:disabled {
    background: #ced4da;
    cursor: not-allowed;
    transform: none;
}