/* geo-guess.css — GeoGuess photo location game */

.gg-page .study-main { display: flex; flex-direction: column; }

.gg-screen { display: none; flex: 1; min-height: 0; }
.gg-screen--active { display: flex; flex-direction: column; }

/* ── Menu ─────────────────────────────────────────────── */
.gg-menu {
    max-width: 720px;
    width: 100%;
    margin: 0 auto;
    padding: 24px 20px 48px;
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.gg-menu-hero { text-align: center; padding-top: 18px; }
.gg-logo-icon {
    display: inline-flex;
    font-size: 3rem;
    color: var(--accent-purple, #10B981);
    margin-bottom: 6px;
}
.gg-logo-title {
    font-family: var(--font-heading, 'Poppins', sans-serif);
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-primary, #0f172a);
}
.gg-logo-subtitle {
    color: var(--text-secondary, #475569);
    margin-top: 4px;
}

.gg-menu-stats {
    display: flex;
    justify-content: center;
    gap: 28px;
    flex-wrap: wrap;
}
.gg-stat {
    background: var(--bg-surface, #fff);
    border: 1px solid var(--border-glass, rgba(0,0,0,0.05));
    border-radius: 14px;
    padding: 12px 22px;
    text-align: center;
    min-width: 140px;
}
.gg-stat-value {
    font-family: var(--font-heading, 'Poppins', sans-serif);
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--accent-blue, #059669);
}
.gg-stat-label {
    font-size: 0.8rem;
    color: var(--text-muted, #94a3b8);
}

.gg-section-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: var(--text-primary, #0f172a);
    margin-bottom: 10px;
}
.gg-section-title i { color: var(--accent-purple, #10B981); }

.gg-region-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 10px;
}
.gg-region-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 12px 10px;
    border-radius: 12px;
    border: 1.5px solid var(--border-glass, rgba(0,0,0,0.08));
    background: var(--bg-surface, #fff);
    color: var(--text-secondary, #475569);
    font: inherit;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast, 0.2s);
}
.gg-region-btn:hover { border-color: var(--accent-pink, #34D399); }
.gg-region-btn--active {
    border-color: var(--accent-purple, #10B981);
    background: rgba(16, 185, 129, 0.10);
    color: var(--accent-blue, #059669);
}

.gg-how {
    background: var(--bg-surface, #fff);
    border: 1px solid var(--border-glass, rgba(0,0,0,0.05));
    border-radius: 14px;
    padding: 16px 18px;
}
.gg-how ol {
    margin: 8px 0 0 0;
    padding-left: 20px;
    color: var(--text-secondary, #475569);
    display: grid;
    gap: 6px;
}

.gg-big-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 15px 20px;
    border: none;
    border-radius: 14px;
    font: inherit;
    font-weight: 700;
    font-size: 1.05rem;
    cursor: pointer;
    transition: transform var(--transition-fast, 0.2s), box-shadow var(--transition-fast, 0.2s);
}
.gg-big-btn--primary {
    background: var(--gradient-primary, linear-gradient(135deg, #059669, #34D399));
    color: #fff;
    box-shadow: 0 8px 20px rgba(5, 150, 105, 0.3);
}
.gg-big-btn--primary:hover { transform: translateY(-2px); }
.gg-big-btn--ghost {
    background: transparent;
    border: 1.5px solid var(--border-glass, rgba(0,0,0,0.1));
    color: var(--text-secondary, #475569);
}
.gg-big-btn--ghost:hover { border-color: var(--accent-purple, #10B981); color: var(--accent-blue, #059669); }

/* ── Game screen ──────────────────────────────────────── */
.gg-game {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    padding: 12px 16px 16px;
    gap: 10px;
}

.gg-hud {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
}
.gg-hud-left { display: flex; align-items: center; gap: 14px; }
.gg-hud-chip {
    background: var(--bg-surface, #fff);
    border: 1px solid var(--border-glass, rgba(0,0,0,0.05));
    border-radius: 999px;
    padding: 6px 14px;
    font-weight: 700;
    color: var(--text-primary, #0f172a);
    font-size: 0.92rem;
}
.gg-quit-link {
    background: none;
    border: none;
    color: var(--text-muted, #94a3b8);
    font: inherit;
    font-size: 0.88rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}
.gg-quit-link:hover { color: var(--text-secondary, #475569); }

.gg-arena {
    flex: 1;
    min-height: 0;
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
    gap: 12px;
}

.gg-photo-panel {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    background: #0b1220;
    border: 1px solid var(--border-glass, rgba(0,0,0,0.06));
    min-height: 260px;
}
#gg-photo {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    transition: opacity 0.25s ease;
}
.gg-photo-loader {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #cbd5e1;
    gap: 10px;
}
.gg-spinner {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 3px solid rgba(148, 163, 184, 0.3);
    border-top-color: #34D399;
    animation: gg-spin 0.8s linear infinite;
}
@keyframes gg-spin { to { transform: rotate(360deg); } }

.gg-photo-attrib {
    position: absolute;
    left: 10px;
    bottom: 10px;
    max-width: calc(100% - 20px);
    display: flex;
    align-items: center;
    gap: 8px;
}
.gg-attrib-toggle {
    flex: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: none;
    background: rgba(15, 23, 42, 0.62);
    color: #e2e8f0;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}
.gg-attrib-text {
    display: none;
    background: rgba(15, 23, 42, 0.78);
    color: #e2e8f0;
    border-radius: 10px;
    padding: 6px 12px;
    font-size: 0.74rem;
    line-height: 1.35;
}
.gg-attrib-text a { color: #6ee7b7; }
.gg-photo-attrib--open .gg-attrib-text { display: block; }

.gg-map-panel {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-height: 0;
}
.gg-map-box {
    position: relative;
    flex: 1;
    min-height: 220px;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--border-glass, rgba(0,0,0,0.06));
    background: var(--bg-surface, #fff);
}
#gg-map, .gg-map-svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.gg-map-svg { cursor: crosshair; touch-action: none; }

.gg-map-loader {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: var(--text-muted, #94a3b8);
    background: var(--bg-surface, #fff);
    z-index: 2;
}

.gg-map-sphere { fill: #b8dcf0; stroke: none; }
.gg-map-country {
    fill: #e7e3d4;
    stroke: #b3ad97;
    stroke-width: 0.4;
}
.gg-map-country:hover { fill: #ddd8c4; }
.gg-map-lake { fill: #b8dcf0; pointer-events: none; }
[data-theme="dark"] .gg-map-sphere { fill: #12233b; }
[data-theme="dark"] .gg-map-country { fill: #2c3a4f; stroke: #46586f; }
[data-theme="dark"] .gg-map-country:hover { fill: #38495f; }
[data-theme="dark"] .gg-map-lake { fill: #12233b; }

.gg-marker { pointer-events: none; }
.gg-marker--guess path { fill: #059669; stroke: #fff; stroke-width: 1.2; }
.gg-marker--guess circle { fill: #fff; }
.gg-marker--answer path { fill: #dc2626; stroke: #fff; stroke-width: 1.2; }
.gg-marker--answer circle { fill: #fff; }
.gg-guess-line {
    stroke: #dc2626;
    stroke-dasharray: 5 4;
    fill: none;
    pointer-events: none;
}

.gg-map-hint {
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-muted, #94a3b8);
    min-height: 1.2em;
}

.gg-map-actions { display: flex; gap: 10px; }
.gg-map-actions .gg-big-btn { padding: 12px 16px; }
.gg-big-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.gg-reveal-bar {
    display: none;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    background: var(--bg-surface, #fff);
    border: 1px solid var(--border-glass, rgba(0,0,0,0.06));
    border-left: 4px solid var(--accent-purple, #10B981);
    border-radius: 12px;
    padding: 10px 14px;
}
.gg-reveal-bar--show { display: flex; }
.gg-reveal-place { font-weight: 700; color: var(--text-primary, #0f172a); }
.gg-reveal-nums { display: flex; align-items: baseline; gap: 14px; }
.gg-reveal-dist { color: var(--text-secondary, #475569); font-size: 0.9rem; }
.gg-reveal-points {
    font-family: var(--font-heading, 'Poppins', sans-serif);
    font-weight: 800;
    font-size: 1.15rem;
    color: var(--accent-blue, #059669);
}

/* ── Results ──────────────────────────────────────────── */
.gg-results {
    max-width: 640px;
    width: 100%;
    margin: 0 auto;
    padding: 28px 20px 48px;
    display: flex;
    flex-direction: column;
    gap: 18px;
    text-align: center;
}
.gg-final-title {
    font-family: var(--font-heading, 'Poppins', sans-serif);
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--text-primary, #0f172a);
}
.gg-final-score-wrap { display: flex; align-items: baseline; justify-content: center; gap: 8px; }
#gg-final-score {
    font-family: var(--font-heading, 'Poppins', sans-serif);
    font-size: 3rem;
    font-weight: 800;
    background: var(--gradient-primary, linear-gradient(135deg, #059669, #34D399));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
#gg-final-max { color: var(--text-muted, #94a3b8); font-weight: 600; }
#gg-final-best {
    color: #d97706;
    font-weight: 700;
}

.gg-results-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    text-align: left;
}
.gg-result-row {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--bg-surface, #fff);
    border: 1px solid var(--border-glass, rgba(0,0,0,0.05));
    border-radius: 12px;
    padding: 8px 12px;
}
.gg-result-num {
    flex: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: rgba(16, 185, 129, 0.12);
    color: var(--accent-blue, #059669);
    font-size: 0.8rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.gg-result-thumb {
    flex: none;
    width: 52px;
    height: 40px;
    object-fit: cover;
    border-radius: 8px;
}
.gg-result-info { flex: 1; min-width: 0; }
.gg-result-name {
    font-weight: 600;
    color: var(--text-primary, #0f172a);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.gg-result-country { font-size: 0.8rem; color: var(--text-muted, #94a3b8); }
.gg-result-scores { text-align: right; flex: none; }
.gg-result-points { font-weight: 700; color: var(--accent-blue, #059669); }
.gg-result-dist { font-size: 0.75rem; color: var(--text-muted, #94a3b8); }

.gg-results-actions { display: flex; gap: 10px; }

/* ── Responsive ───────────────────────────────────────── */
@media (max-width: 900px) {
    .gg-arena { grid-template-columns: 1fr; grid-template-rows: minmax(200px, 42vh) minmax(240px, 1fr); }
    .gg-photo-panel { min-height: 200px; }
}
