/* ── Game Screen — dark theme ──────────────────────────────────────────────── */

.game-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem;
}

/* Progress bar */
.game-progress {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 1.1rem 1.5rem;
    margin-bottom: 0;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.progress-track {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    height: 8px;
    overflow: hidden;
    margin-bottom: 0.6rem;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #10b981, #059669);
    border-radius: 8px;
    transition: width 0.5s ease;
    box-shadow: 0 0 12px rgba(16, 185, 129, 0.5);
}

#progressText {
    font-family: 'Mogra', cursive;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.4);
    text-align: center;
}

/* ── Intro card — takes most of the viewport so steps start below the fold ── */
.game-intro-card {
    min-height: calc(100vh - 100px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 1.5rem 3rem;
    text-align: center;
}

.game-intro {
    font-family: 'Mogra', cursive;
    font-size: 1.05rem;
    color: rgba(255, 255, 255, 0.8);
    line-height: 2;
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.7);
    max-width: 680px;
    margin: 0 auto 2.5rem;
    white-space: pre-line;
}

.start-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    border: none;
    padding: 1rem 2.5rem;
    border-radius: 14px;
    font-family: 'Knewave', cursive;
    font-size: 1.3rem;
    cursor: pointer;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    box-shadow: 0 6px 24px rgba(16, 185, 129, 0.45);
    letter-spacing: 0.02em;
}

.start-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 32px rgba(16, 185, 129, 0.6);
}

/* ── Game steps ─────────────────────────────────────────────────────────────── */
.game-steps {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    padding-bottom: 5rem;
    scroll-margin-top: 2rem;
}

.game-step {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 2rem;
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
}

/* Green tint overlay when unlocked */
.game-step::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.07) 0%, rgba(34, 197, 94, 0.03) 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
    border-radius: inherit;
}

.game-step.unlocked::before {
    opacity: 1;
}

/* Fully locked — blurred, invisible */
.game-step.step-locked {
    opacity: 0.2;
    pointer-events: none;
    filter: blur(6px) grayscale(1);
    user-select: none;
    -webkit-user-select: none;
}

.game-step.step-locked .step-body {
    filter: blur(8px);
}

.game-step.step-locked * {
    color: transparent !important;
    text-shadow: none !important;
}

.game-step.step-locked .step-number {
    background: linear-gradient(135deg, #374151, #1f2937) !important;
    box-shadow: none !important;
    color: rgba(255, 255, 255, 0.2) !important;
}

/* In 24h cooldown — previous step solved, timer running */
.game-step.step-cooldown {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(16, 185, 129, 0.18);
    pointer-events: none;
    opacity: 0.9;
}

.game-step.step-cooldown .riddle-widget {
    display: none;
}

.game-step.step-cooldown .step-number {
    background: linear-gradient(135deg, #1f2937, #111827);
    box-shadow: none;
}

/* ── Step header ────────────────────────────────────────────────────────────── */
.step-header {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    margin-bottom: 1.75rem;
    position: relative;
    z-index: 2;
}

.step-number {
    width: 54px;
    height: 54px;
    background: linear-gradient(135deg, #10b981, #059669);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Knewave', cursive;
    font-size: 1.6rem;
    color: white;
    box-shadow: 0 5px 18px rgba(16, 185, 129, 0.4);
    transition: all 0.4s ease;
    flex-shrink: 0;
    position: relative;
    z-index: 3;
}

.game-step.unlocked .step-number {
    background: linear-gradient(135deg, #22c55e, #16a34a);
    box-shadow: 0 8px 24px rgba(34, 197, 94, 0.55);
    transform: scale(1.08);
}

.step-label {
    font-family: 'Knewave', cursive;
    font-size: 1.4rem;
    color: rgba(255, 255, 255, 0.85);
    transition: color 0.4s ease;
    position: relative;
    z-index: 2;
}

.game-step.unlocked .step-label {
    color: #4ade80;
    text-shadow: 0 0 12px rgba(34, 197, 94, 0.35);
}

/* ── Step body ──────────────────────────────────────────────────────────────── */
.step-body {
    min-height: 180px;
    position: relative;
    z-index: 2;
    transition: filter 0.4s ease;
}

/* ── Clue revealed after correct answer ─────────────────────────────────────── */
.step-clue {
    background: rgba(34, 197, 94, 0.07);
    border: 1.5px solid rgba(34, 197, 94, 0.3);
    border-radius: 14px;
    padding: 1.75rem;
    margin-top: 1.5rem;
    animation: slideInUp 0.6s ease-out;
    position: relative;
    overflow: hidden;
}

.step-clue::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #22c55e, #16a34a, #22c55e);
    background-size: 200% 100%;
    animation: shimmer 2s linear infinite;
}

.clue-desc {
    font-family: 'Mogra', cursive;
    font-size: 1.05rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 1.5rem;
    line-height: 1.65;
}

.clue-map-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    background: linear-gradient(135deg, #22c55e, #16a34a);
    color: white;
    text-decoration: none;
    padding: 0.85rem 1.75rem;
    border-radius: 12px;
    font-family: 'Mogra', cursive;
    font-size: 1rem;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    box-shadow: 0 5px 18px rgba(34, 197, 94, 0.4);
    position: relative;
    overflow: hidden;
}

.clue-map-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
    transition: left 0.45s ease;
}

.clue-map-btn:hover::before {
    left: 100%;
}

.clue-map-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 26px rgba(34, 197, 94, 0.55);
}

.clue-coords {
    display: block;
    font-family: 'Mogra', cursive;
    font-size: 0.88rem;
    color: rgba(255, 255, 255, 0.45);
    margin-top: 0.8rem;
    font-style: italic;
}

/* ── Cooldown overlay ───────────────────────────────────────────────────────── */
.cooldown-overlay {
    background: rgba(16, 185, 129, 0.06);
    border: 1.5px solid rgba(16, 185, 129, 0.22);
    border-radius: 12px;
    padding: 1.75rem;
    margin-bottom: 1rem;
    text-align: center;
    animation: slideInUp 0.5s ease-out;
}

.cooldown-text {
    font-family: 'Mogra', cursive;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 0.5rem;
}

.cooldown-countdown {
    font-family: 'Knewave', cursive;
    font-size: 2.2rem;
    color: #10b981;
    text-shadow: 0 0 18px rgba(16, 185, 129, 0.5);
    animation: pulse 2s ease-in-out infinite;
}

.cooldown-countdown.hours-countdown {
    font-size: 2rem;
    color: #34d399;
}

/* ── Completion overlay ─────────────────────────────────────────────────────── */
.completion-overlay {
    background: rgba(34, 197, 94, 0.07);
    border: 1.5px solid rgba(34, 197, 94, 0.3);
    border-radius: 14px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    text-align: center;
    animation: slideInUp 0.5s ease-out;
}

.completion-text {
    font-family: 'Mogra', cursive;
    font-size: 1.1rem;
    color: #4ade80;
    animation: pulse 1s ease-in-out infinite;
}

/* ── Animations ─────────────────────────────────────────────────────────────── */
@keyframes slideInUp {
    from { opacity: 0; transform: translateY(18px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes shimmer {
    0%   { background-position: -200% 0; }
    100% { background-position:  200% 0; }
}

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

/* ── Media Modal ────────────────────────────────────────────────────────────── */
.media-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.media-modal-card {
    background: #1a1a1a;
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 2rem;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow: auto;
    position: relative;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.media-modal-card.has-video {
    max-width: 800px;
    width: 95%;
    max-height: 95vh;
}

.media-modal-card:not(.has-video) {
    max-width: 500px;
    width: 90%;
}

.media-modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.media-modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.media-modal-title {
    font-family: 'Knewave', cursive;
    font-size: 1.8rem;
    color: white;
    margin-bottom: 1.5rem;
    text-align: center;
}

.media-modal-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.media-modal-content video,
.media-modal-content audio {
    width: 100%;
    max-width: 500px;
    border-radius: 8px;
}

.media-modal-card.has-video .media-modal-content video,
.media-modal-card.has-video .media-modal-content audio {
    max-width: 800px;
}

.media-no-media {
    font-family: 'Mogra', cursive;
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.7);
    text-align: center;
    padding: 2rem;
}

/* ── Audio modal ────────────────────────────────────────────────────────────── */
.audio-photo-wrapper {
    position: relative;
    width: 200px;
    height: 200px;
    margin: 0 auto 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.audio-modal-photo {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    transform-origin: center center;
}

.audio-ring {
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    opacity: 0;
    transform-origin: center center;
}

.audio-bars {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    gap: 3px;
    height: 40px;
    margin: 1rem 0;
    transform-origin: center bottom;
}

.audio-bar {
    width: 4px;
    background: linear-gradient(to top, #10b981, #059669);
    border-radius: 2px;
    transform-origin: bottom center;
    transform: scaleY(0.08);
}
