/* =============================================================
   Shade Finder — layout & game chrome
   ============================================================= */

.sf-wrapper {
    max-width: 520px;
    margin: 0 auto;
    padding: 1.25rem 1rem;
    text-align: center;
}

/* Mode selector */
.sf-mode-selector {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    margin-bottom: 0.4rem;
}


/* Daily color banner */
.sf-daily-banner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    margin-bottom: 0.75rem;
    padding: 0.35rem 0.85rem;
    border-radius: 99px;
    font-size: 0.9rem;
    font-weight: 500;
    background: rgba(13, 110, 253, 0.08);
    border: 1px solid rgba(13, 110, 253, 0.18);
    animation: sf-fadein 0.3s ease;
}

.sf-banner-dot {
    display: inline-block;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    flex-shrink: 0;
    box-shadow: 0 0 0 2px rgba(128, 128, 128, 0.25);
}

.sf-banner-name {
    font-weight: 700;
    text-decoration: none;
}

.sf-banner-name:hover {
    text-decoration: underline;
}

[data-bs-theme="dark"] .sf-daily-banner {
    background: rgba(13, 110, 253, 0.12);
    border-color: rgba(13, 110, 253, 0.3);
}

/* HUD */
.sf-hud {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
    font-size: 1rem;
    font-weight: 600;
}

.sf-timer {
    font-variant-numeric: tabular-nums;
    min-width: 3ch;
    text-align: right;
    transition: color 0.2s;
}

.sf-timer.sf-danger {
    color: #dc3545;
    animation: sf-pulse 0.5s ease-in-out infinite;
}

/* =============================================================
   Grid
   ============================================================= */

.sf-grid {
    display: grid;
    gap: 5px;
    width: 100%;
    max-width: 480px;
    margin: 0 auto 0.75rem;
    aspect-ratio: 1 / 1;
}

.sf-tile {
    border-radius: 6px;
    cursor: pointer;
    transition: transform 0.1s ease, box-shadow 0.1s ease;
    aspect-ratio: 1 / 1;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
}

.sf-tile:hover {
    transform: scale(1.05);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.sf-tile:active {
    transform: scale(0.95);
}

.sf-tile.sf-correct {
    outline: 3px solid #198754;
    outline-offset: 1px;
    animation: sf-pop 0.35s ease forwards;
}

.sf-tile.sf-wrong {
    outline: 3px solid #dc3545;
    outline-offset: 1px;
    animation: sf-shake 0.35s ease forwards;
}

/* =============================================================
   Color hint
   ============================================================= */

.sf-color-hint {
    min-height: 1.4rem;
    font-size: 0.85rem;
    opacity: 0.65;
    font-style: italic;
    margin-bottom: 0.25rem;
    transition: opacity 0.3s;
}

/* =============================================================
   Game-over screen
   ============================================================= */

.sf-gameover {
    padding: 1.5rem 0.5rem;
    animation: sf-fadein 0.4s ease;
}

.sf-stat-row {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin: 1.25rem 0;
    flex-wrap: wrap;
}

.sf-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.sf-stat-value {
    font-size: 2.6rem;
    font-weight: 700;
    line-height: 1;
}

.sf-stat-label {
    font-size: 0.72rem;
    opacity: 0.55;
    margin-top: 0.3rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.sf-percentile {
    font-size: 0.85rem;
    opacity: 0.6;
    min-height: 1.3rem;
    margin-bottom: 1rem;
}

/* Colors seen */
.sf-seen-label {
    font-size: 0.8rem;
    opacity: 0.55;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.sf-seen-colors {
    display: flex;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}

.sf-seen-color {
    width: 38px;
    height: 38px;
    border-radius: 8px;
    display: block;
    text-decoration: none;
    border: 1px solid rgba(128, 128, 128, 0.2);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.sf-seen-color:hover {
    transform: scale(1.18);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
}

/* Screenshot hint */
.sf-screenshot-hint {
    font-size: 0.8rem;
    opacity: 0.45;
    margin-bottom: 1rem;
    letter-spacing: 0.01em;
}

/* Actions */
.sf-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* =============================================================
   Animations
   ============================================================= */

@keyframes sf-pulse {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0.35; }
}

@keyframes sf-pop {
    0%   { transform: scale(1); }
    50%  { transform: scale(1.1); }
    100% { transform: scale(1); }
}

@keyframes sf-shake {
    0%, 100% { transform: translateX(0); }
    25%      { transform: translateX(-5px); }
    75%      { transform: translateX(5px); }
}

@keyframes sf-fadein {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* =============================================================
   Dark mode adjustments
   ============================================================= */

[data-bs-theme="dark"] .sf-tile {
    border-radius: 6px;
}

[data-bs-theme="dark"] .sf-seen-color {
    border-color: rgba(255, 255, 255, 0.12);
}

/* =============================================================
   Responsive
   ============================================================= */

@media (max-width: 420px) {
    .sf-grid {
        gap: 4px;
    }

    .sf-tile {
        border-radius: 4px;
    }

    .sf-stat-value {
        font-size: 2rem;
    }

    .sf-stat-row {
        gap: 1.25rem;
    }
}
