/**
 * Ordgåtan - Mobile-First Word Puzzle Game Styles
 * Refactored for card-based swipeable layout
 */

/* ==========================================================================
   CSS Variables
   ========================================================================== */
:root {
    /* Colors - Newsletter Style */
    --ordgata-primary: #ff8d00;
    --ordgata-primary-light: #ffa033;
    --ordgata-primary-dark: #e67e00;
    --ordgata-success: #10b981;
    --ordgata-success-light: #34d399;
    --ordgata-warning: #f59e0b;
    --ordgata-danger: #ef4444;
    --ordgata-dark: #1f2937;
    --ordgata-light: #f3f4f6;
    --ordgata-border: #ffe0c0;
    --ordgata-text-muted: #6b7280;

    /* Newsletter-style design tokens */
    --ordgata-gradient: linear-gradient(135deg, #fff8f2 0%, #fff 100%);
    --ordgata-shadow-accent: 0 4px 15px rgba(255, 141, 0, 0.2);
    --ordgata-focus-ring: 0 0 0 3px rgba(255, 141, 0, 0.15);
    --ordgata-radius: 12px;
    --ordgata-radius-sm: 8px;

    /* Timer urgency colors */
    --ordgata-timer-normal: #6b7280;
    --ordgata-timer-warning: #f59e0b;
    --ordgata-timer-danger: #ef4444;

    /* Layout dimensions (mobile-first) */
    --ordgata-header-height: 56px;
    --ordgata-hidden-word-height: 88px;
    --ordgata-footer-actions-height: 60px;
    --ordgata-keyboard-height: 180px;
    --ordgata-touch-target: 44px;
    --ordgata-card-gap: 12px;
    --ordgata-safe-area-bottom: env(safe-area-inset-bottom, 0px);

    /* Cell sizes */
    --ordgata-cell-size: 40px;
    --ordgata-cell-gap: 2px;

    /* Site header */
    --ordgata-site-header-height: 56px;
}

/* ==========================================================================
   DEDICATED LAYOUT - Full Screen Game Experience
   ========================================================================== */

/* Body reset for game pages */
.ordgata-body {
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: linear-gradient(180deg, #fff8f2 0%, #fff 100%);
    min-height: 100vh;
    min-height: 100dvh;
    overflow-x: hidden;
}

/* ==========================================================================
   Minimal Site Header (Logo + User) - REMOVED FROM GAME PAGES
   ========================================================================== */
/* This header is no longer used in game pages (play.html.twig) */
.ordgata-site-header {
    display: none; /* Hidden in game pages */
}

.ordgata-site-logo {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.ordgata-site-logo img {
    height: 32px;
    width: auto;
}

.ordgata-site-header-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.ordgata-user-link,
.ordgata-login-link {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: #333;
    padding: 8px 12px;
    border-radius: 8px;
    transition: background 0.2s;
    font-size: 0.9rem;
}

.ordgata-user-link:hover,
.ordgata-login-link:hover {
    background: #fff8f2;
}

.ordgata-user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #ff8d00;
}

.ordgata-user-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ff8d00, #ffa033);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.85rem;
}

.ordgata-user-name {
    font-weight: 500;
    max-width: 100px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ordgata-login-link i {
    color: #ff8d00;
}

/* Mobile: hide username, show only avatar/icon */
@media (max-width: 480px) {
    .ordgata-user-name,
    .ordgata-login-link span {
        display: none;
    }

    .ordgata-site-header {
        padding: 0 12px;
    }

    .ordgata-site-logo img {
        height: 28px;
    }
}

/* ==========================================================================
   Game Page - Mobile-First Layout
   ========================================================================== */
.ordgata-game {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    min-height: 100dvh;
    background: #f8fafc;
    overflow: hidden;
    position: relative;
}

/* ==========================================================================
   Fixed Header
   ========================================================================== */
.ordgata-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--ordgata-header-height);
    background: var(--ordgata-gradient);
    border-bottom: 1px solid var(--ordgata-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 12px;
    z-index: 100;
    gap: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
}

.ordgata-back {
    width: var(--ordgata-touch-target);
    height: var(--ordgata-touch-target);
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    font-size: 1.25rem;
    color: var(--ordgata-dark);
    cursor: pointer;
    border-radius: 8px;
    text-decoration: none;
    transition: background 0.2s;
}

.ordgata-back:hover {
    background: var(--ordgata-light);
}

.ordgata-progress {
    font-weight: 600;
    font-size: 1rem;
    color: var(--ordgata-text-muted);
}

/* OLD TIMER BADGE STYLE (deprecated) */
/* New minimal style is in .stat-item.stat-timer in header section */
.ordgata-timer {
    /* Deprecated - use .stat-timer instead */
}

/* Timer urgency states for .stat-timer */
.stat-timer.timer-green {
    color: #333;
}

.stat-timer.timer-yellow {
    color: var(--ordgata-timer-warning);
    animation: timer-pulse 1s infinite;
}

.stat-timer.timer-red {
    color: var(--ordgata-timer-danger);
    animation: timer-pulse 0.5s infinite;
}

@keyframes timer-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* ==========================================================================
   Hidden Word Section (Always Visible)
   ========================================================================== */
.ordgata-hidden-word {
    position: fixed;
    top: var(--ordgata-header-height);
    left: 0;
    right: 0;
    height: var(--ordgata-hidden-word-height);
    background: white;
    border-bottom: 2px solid var(--ordgata-primary);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    z-index: 99;
}

.hidden-word-label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--ordgata-text-muted);
    margin-bottom: 8px;
}

.hidden-word-boxes {
    display: flex;
    justify-content: center;
    gap: 6px;
}

.hidden-word-boxes .letter-box {
    position: relative;
    width: clamp(36px, 10vw, 44px);
    height: clamp(40px, 11vw, 48px);
    display: flex;
    align-items: center;
    justify-content: center;
    /* Stile distintivo arancione/dorato */
    background: linear-gradient(135deg, #fff8f0 0%, #ffe4c4 100%);
    border: 2px solid var(--og-accent, #ff8d00);
    border-radius: 8px;
    font-weight: 700;
    font-size: clamp(1rem, 4vw, 1.25rem);
    color: #cc7000;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(255, 141, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.5);
    animation: hidden-word-pulse 3s ease-in-out infinite;
}

/* Punto interrogativo trasparente nelle caselle non rivelate */
.hidden-word-boxes .letter-box:not(.revealed)::before {
    content: '?';
    position: absolute;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--og-accent, #ff8d00);
    opacity: 0.35;
}

@keyframes hidden-word-pulse {
    0%, 100% { box-shadow: 0 2px 8px rgba(255, 141, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.5); }
    50% { box-shadow: 0 2px 12px rgba(255, 141, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.5); }
}

.hidden-word-boxes .letter-box.revealed {
    background: linear-gradient(135deg, var(--ordgata-success) 0%, #059669 100%);
    border-color: var(--ordgata-success);
    color: white;
    animation: letter-reveal-enhanced 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.4);
}

@keyframes letter-reveal-enhanced {
    0% {
        transform: scale(0.5) rotateY(180deg);
        opacity: 0;
    }
    50% {
        transform: scale(1.2) rotateY(90deg);
    }
    100% {
        transform: scale(1) rotateY(0deg);
        opacity: 1;
    }
}

/* ==========================================================================
   Clue Card Carousel (CSS Scroll Snap)
   ========================================================================== */
.ordgata-clues-swiper {
    position: fixed;
    top: calc(var(--ordgata-header-height) + var(--ordgata-hidden-word-height));
    bottom: calc(var(--ordgata-footer-actions-height) + var(--ordgata-keyboard-height) + var(--ordgata-safe-area-bottom) + 44px);
    left: 0;
    right: 0;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    display: flex;
    gap: var(--ordgata-card-gap);
    padding: 16px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.ordgata-clues-swiper::-webkit-scrollbar {
    display: none;
}

.ordgata-clue-card {
    flex: 0 0 calc(100% - 32px);
    scroll-snap-align: center;
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    padding: 20px;
    display: flex;
    flex-direction: column;
    min-height: 180px;
    transition: transform 0.3s, box-shadow 0.3s;
}

.ordgata-clue-card.active {
    box-shadow: 0 8px 30px rgba(37, 99, 235, 0.15);
}

.ordgata-clue-card.solved {
    background: rgba(16, 185, 129, 0.05);
    border: 2px solid var(--ordgata-success);
}

/* Clue card header */
.clue-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.clue-number {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--ordgata-primary);
    color: white;
    border-radius: 50%;
    font-size: 0.9rem;
    font-weight: 700;
}

.clue-card.solved .clue-number {
    background: var(--ordgata-success);
}

.clue-letter-count {
    font-size: 0.85rem;
    color: var(--ordgata-text-muted);
    font-weight: 500;
}

/* Clue definition */
.clue-text {
    font-size: 1.1rem;
    line-height: 1.5;
    color: var(--ordgata-dark);
    text-align: center;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px 0;
}

/* ==========================================================================
   Individual Letter Input Boxes
   ========================================================================== */
.clue-answer-boxes {
    display: flex;
    justify-content: center;
    gap: 6px;
    flex-wrap: wrap;
    margin-top: auto;
    padding-top: 16px;
}

.clue-answer-boxes .letter-box {
    position: relative;
    width: clamp(36px, 11vw, 44px);
    height: clamp(44px, 13vw, 52px);
}

.clue-answer-boxes .letter-box input {
    width: 100%;
    height: 100%;
    border: 2px solid var(--ordgata-border);
    border-radius: 8px;
    background: white;
    font-size: 16px; /* Prevent iOS zoom */
    font-weight: 700;
    text-align: center;
    text-transform: uppercase;
    caret-color: var(--ordgata-primary);
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
    -webkit-appearance: none;
    appearance: none;
}

.clue-answer-boxes .letter-box input:focus {
    outline: none;
    border-color: var(--ordgata-primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
}

.clue-answer-boxes .letter-box input.filled {
    background: var(--ordgata-light);
}

/* Key letter indicator */
.clue-answer-boxes .letter-box.key-letter input {
    border-color: var(--ordgata-primary);
    background: rgba(37, 99, 235, 0.05);
}

.clue-answer-boxes .letter-box.key-letter::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 8px;
    height: 8px;
    background: var(--ordgata-primary);
    border-radius: 50%;
}

/* Correct/Wrong states */
.clue-answer-boxes .letter-box input.correct {
    border-color: var(--ordgata-success);
    background: var(--ordgata-success);
    color: white;
}

.clue-answer-boxes .letter-box input.wrong {
    border-color: var(--ordgata-danger);
    background: rgba(239, 68, 68, 0.1);
}

/* Answer display (shown when solved) */
.clue-answer-display {
    display: none;
    padding: 12px;
    background: rgba(16, 185, 129, 0.1);
    border-radius: 8px;
    text-align: center;
    margin-top: auto;
}

.clue-answer-display .answer-text {
    font-weight: 700;
    font-size: 1.25rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--ordgata-success);
}

.ordgata-clue-card.solved .clue-answer-boxes {
    display: none;
}

.ordgata-clue-card.solved .clue-answer-display {
    display: block;
}

/* ==========================================================================
   Dots Navigation
   ========================================================================== */
.ordgata-dots {
    position: fixed;
    bottom: calc(var(--ordgata-footer-actions-height) + var(--ordgata-keyboard-height) + var(--ordgata-safe-area-bottom));
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    padding: 12px;
    background: linear-gradient(to top, white 80%, transparent);
    z-index: 50;
}

.ordgata-dots .dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--ordgata-border);
    transition: all 0.2s;
    cursor: pointer;
}

.ordgata-dots .dot.active {
    background: var(--ordgata-primary);
    transform: scale(1.3);
}

.ordgata-dots .dot.solved {
    background: var(--ordgata-success);
}

/* ==========================================================================
   Fixed Footer Actions
   ========================================================================== */
.ordgata-actions {
    position: fixed;
    bottom: calc(var(--ordgata-keyboard-height) + var(--ordgata-safe-area-bottom));
    left: 0;
    right: 0;
    height: var(--ordgata-footer-actions-height);
    display: flex;
    gap: 12px;
    padding: 8px 16px;
    background: white;
    border-top: 1px solid var(--ordgata-border);
    z-index: 100;
}

.ordgata-hint-btn,
.ordgata-guess-btn {
    flex: 1;
    height: 44px;
    border: none;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    touch-action: manipulation;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.ordgata-hint-btn {
    background: var(--ordgata-light);
    color: var(--ordgata-text-muted);
}

.ordgata-hint-btn:active {
    background: var(--ordgata-border);
}

.ordgata-hint-btn .hint-count {
    background: var(--ordgata-warning);
    color: white;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.8rem;
}

.ordgata-hint-btn .hint-count.empty {
    background: var(--ordgata-danger);
}

.ordgata-guess-btn {
    background: var(--ordgata-warning);
    color: white;
}

.ordgata-guess-btn:hover {
    background: #ea580c;
}

.ordgata-guess-btn:active {
    transform: scale(0.98);
}

.ordgata-guess-btn.highlight {
    animation: glow-pulse 1.5s infinite;
}

@keyframes glow-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(249, 115, 22, 0.4); }
    50% { box-shadow: 0 0 0 8px rgba(249, 115, 22, 0); }
}

/* ==========================================================================
   Virtual Keyboard Container
   ========================================================================== */
.ordgata-keyboard-container {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: calc(var(--ordgata-keyboard-height) + var(--ordgata-safe-area-bottom));
    padding: 8px 4px;
    padding-bottom: calc(8px + var(--ordgata-safe-area-bottom));
    background: linear-gradient(180deg, #f5f0eb 0%, #e8e3de 100%);
    border-top: 1px solid var(--ordgata-border);
    z-index: 100;
}

.ordgata-keyboard {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-width: 500px;
    margin: 0 auto;
    height: 100%;
    padding-top: 5px;
}

.keyboard-row {
    display: flex;
    justify-content: center;
    gap: 4px;
    flex: 1;
}

.keyboard-key {
    min-width: 28px;
    flex: 1;
    max-width: 38px;
    border: none;
    border-radius: var(--ordgata-radius-sm);
    background: white;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--ordgata-dark);
    cursor: pointer;
    touch-action: manipulation;
    transition: background 0.15s ease, transform 0.1s ease, box-shadow 0.15s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
}

.keyboard-key:active,
.keyboard-key.pressed {
    background: #ffe0c0;
    transform: scale(0.95);
}

.keyboard-key-wide {
    min-width: 48px;
    max-width: 64px;
    flex: 1.5;
    font-size: 1.25rem;
}

.keyboard-key-enter {
    background: linear-gradient(135deg, var(--ordgata-primary) 0%, var(--ordgata-primary-dark) 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(255, 141, 0, 0.3);
}

.keyboard-key-enter:active {
    background: linear-gradient(135deg, var(--ordgata-primary-dark) 0%, #cc6600 100%);
}

/* Special character highlighting */
.keyboard-key-special {
    background: #fff8f2;
    border: 1px solid var(--ordgata-border);
}

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

/* Shake animation for wrong answers */
@keyframes shake-animation {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-4px); }
    20%, 40%, 60%, 80% { transform: translateX(4px); }
}

.shake-animation {
    animation: shake-animation 0.5s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}

/* Flying letter */
.flying-letter {
    position: fixed;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    background: var(--ordgata-primary);
    color: white;
    border-radius: 6px;
    z-index: 2000;
    pointer-events: none;
    will-change: transform, opacity;
}

/* Confetti container */
.ordgata-confetti-container {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 2000;
    overflow: hidden;
}

.ordgata-confetto {
    position: absolute;
    width: 10px;
    height: 10px;
    top: -20px;
    left: var(--x, 50vw);
    border-radius: 2px;
    animation: confetti-fall 3s linear forwards;
    animation-delay: var(--delay, 0s);
    transform: rotate(var(--rotation, 0deg));
}

@keyframes confetti-fall {
    0% {
        transform: translateY(0) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(100vh) rotate(720deg);
        opacity: 0;
    }
}

/* ==========================================================================
   Modals
   ========================================================================== */
.ordgata-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}

.ordgata-modal.active {
    opacity: 1;
    visibility: visible;
}

.ordgata-modal .modal-content {
    background: var(--ordgata-gradient);
    border: 1px solid var(--ordgata-border);
    border-radius: 16px;
    padding: 28px 24px;
    max-width: 90%;
    width: 380px;
    max-height: 90vh;
    overflow-y: auto;
    transform: scale(0.9) translateY(20px);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}

.ordgata-modal.active .modal-content {
    transform: scale(1) translateY(0);
}

.ordgata-modal h2 {
    font-size: 1.5rem;
    text-align: center;
    margin-bottom: 16px;
    color: var(--ordgata-dark);
}

.hint-modal button {
    width: 100%;
    height: 48px;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    margin-top: 12px;
    transition: all 0.2s;
}

.btn-primary-modal {
    background: linear-gradient(135deg, var(--ordgata-primary) 0%, var(--ordgata-primary-dark) 100%);
    color: white;
    box-shadow: var(--ordgata-shadow-accent);
}

.btn-primary-modal:hover {
    background: linear-gradient(135deg, var(--ordgata-primary-dark) 0%, #cc6600 100%);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(255, 141, 0, 0.35);
}

.btn-secondary-modal {
    background: white;
    border: 2px solid #ddd;
    color: #666;
}

.btn-secondary-modal:hover {
    border-color: var(--ordgata-primary);
    color: var(--ordgata-primary);
}

.btn-close-modal {
    background: transparent;
    color: var(--ordgata-text-muted);
}

/* Hint Modal */
.hint-modal .no-hints-message {
    text-align: center;
    color: var(--ordgata-text-muted);
    margin-bottom: 16px;
}

.hint-modal .earn-hints-section {
    border-top: 1px solid var(--ordgata-border);
    padding-top: 16px;
    margin-top: 16px;
}

.hint-modal .earn-hints-section p {
    text-align: center;
    font-size: 0.9rem;
    color: var(--ordgata-text-muted);
    margin-bottom: 12px;
}

.btn-share-hint {
    background: var(--ordgata-primary);
    color: white;
}

.btn-ad-hint {
    background: var(--ordgata-light);
    color: var(--ordgata-dark);
}

/* Early Guess Modal */
.modal-guess {
    text-align: center;
    padding: 32px 24px 20px;
}

.guess-header-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: linear-gradient(135deg, #fff8ed, #fff0db);
    border: 2px solid #ffd48a;
}

.guess-header-icon i {
    font-size: 1.5rem;
    color: var(--ordgata-primary);
}

.modal-guess .modal-title {
    font-size: 1.4rem;
    margin-bottom: 8px;
}

.guess-modal .bonus-display {
    text-align: center;
    margin-bottom: 10px;
}

.bonus-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    color: white;
    padding: 5px 14px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 0.9rem;
}

.bonus-pill i {
    font-size: 0.8rem;
}

.guess-hint-text {
    text-align: center;
    color: var(--ordgata-text-muted);
    font-size: 0.9rem;
    margin: 0 0 16px;
    line-height: 1.4;
}

/* Guess boxes - fluid sizing, never wrap */
.guess-modal .guess-boxes {
    display: flex;
    justify-content: center;
    gap: 6px;
    flex-wrap: nowrap;
    margin: 0 0 20px;
    padding: 0 4px;
}

.guess-modal .guess-boxes .letter-box {
    flex: 1 1 0;
    max-width: 48px;
    aspect-ratio: 5 / 6;
    min-width: 0;
}

.guess-modal .guess-boxes .letter-box input {
    width: 100%;
    height: 100%;
    border: 2px solid var(--ordgata-border);
    border-radius: 8px;
    font-size: clamp(14px, 4vw, 20px);
    font-weight: 700;
    text-align: center;
    text-transform: uppercase;
    padding: 0;
    background: #fff;
    transition: border-color 0.2s, box-shadow 0.2s;
    -webkit-appearance: none;
    appearance: none;
}

.guess-modal .guess-boxes .letter-box input:focus {
    outline: none;
    border-color: var(--ordgata-primary);
    box-shadow: 0 0 0 3px rgba(255, 141, 0, 0.15);
}

.guess-modal .guess-boxes .letter-box.pre-filled input {
    background: #fff7ed;
    border-color: var(--ordgata-primary);
    color: #c2410c;
    pointer-events: none;
    -webkit-user-select: none;
    user-select: none;
}

/* Submit + cancel buttons */
.guess-actions {
    display: flex;
    flex-direction: column;
    gap: 6px;
    align-items: center;
}

.guess-submit-btn {
    width: 100%;
    height: 48px;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: linear-gradient(135deg, var(--ordgata-primary) 0%, var(--ordgata-primary-dark) 100%);
    color: #fff;
    box-shadow: 0 4px 12px rgba(255, 141, 0, 0.25);
    transition: all 0.2s;
}

.guess-submit-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(255, 141, 0, 0.35);
}

.guess-submit-btn:active {
    transform: translateY(0);
}

/* Completion Modal */
.completion-screen {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .45);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}

.completion-screen.active {
    opacity: 1;
    visibility: visible;
}

.completion-screen .modal-content {
    background: #fff;
    border-radius: 14px;
    padding: 26px 30px 22px;
    max-width: 420px;
    width: 94%;
    max-height: 90vh;
    overflow-y: auto;
    color: #333;
    text-align: center;
    transform: translateY(20px) scale(.97);
    transition: transform .35s cubic-bezier(.34, 1.56, .64, 1);
    box-shadow: 0 20px 60px rgba(0, 0, 0, .18);
    position: relative;
}

.completion-screen.active .modal-content {
    transform: translateY(0) scale(1);
}

.completion-screen h1 {
    font-size: 1.75rem;
    margin-bottom: 20px;
}

.completion-word {
    display: flex;
    justify-content: center;
    gap: 5px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.completion-word .letter {
    width: 38px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--ordgata-primary);
    color: #fff;
    border-radius: 7px;
    font-size: 1.15rem;
    font-weight: 700;
    box-shadow: 0 2px 6px rgba(255, 141, 0, .15);
    animation: completion-letter-pop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) backwards;
}

.completion-word .letter:nth-child(1) { animation-delay: 0.1s; }
.completion-word .letter:nth-child(2) { animation-delay: 0.15s; }
.completion-word .letter:nth-child(3) { animation-delay: 0.2s; }
.completion-word .letter:nth-child(4) { animation-delay: 0.25s; }
.completion-word .letter:nth-child(5) { animation-delay: 0.3s; }
.completion-word .letter:nth-child(6) { animation-delay: 0.35s; }
.completion-word .letter:nth-child(7) { animation-delay: 0.4s; }
.completion-word .letter:nth-child(8) { animation-delay: 0.45s; }
.completion-word .letter:nth-child(9) { animation-delay: 0.5s; }
.completion-word .letter:nth-child(10) { animation-delay: 0.55s; }

@keyframes completion-letter-pop {
    0% { transform: scale(0); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

.completion-stats {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin: 20px 0;
}

.completion-stats .stat {
    text-align: center;
}

.completion-stats .stat-value {
    font-size: 1.5rem;
    font-weight: 700;
}

.completion-stats .stat-label {
    font-size: 0.8rem;
    color: var(--ordgata-text-muted);
}

.streak-badge {
    background: rgba(255, 141, 0, .1);
    color: var(--ordgata-primary);
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 600;
    margin: 12px 0;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

/* Share buttons section */
.completion-share {
    margin-top: 16px;
}

.completion-share-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 16px;
}

/* Share button - outlined lead-modal style */
.share-btn {
    width: 100%;
    height: 46px;
    background: #fff;
    color: #333;
    border: 2px solid #ddd;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.2s;
    box-shadow: none;
}

.share-btn:hover {
    border-color: var(--ordgata-primary);
    background: #fff8f2;
    color: #333;
}

.share-btn:active {
    transform: scale(0.98);
}

.share-btn i {
    color: var(--ordgata-primary);
}

/* Social share buttons */
.share-social-buttons {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin-top: 8px;
}

.share-btn-facebook {
    flex: 1;
    height: 40px;
    background: #fff;
    color: #1877f2;
    border: 1.5px solid #1877f2;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.2s;
}

.share-btn-facebook:hover {
    background: #1877f2;
    color: #fff;
}

.share-btn-facebook:active {
    transform: scale(0.98);
}

.share-btn-whatsapp {
    flex: 1;
    height: 40px;
    background: #fff;
    color: #25d366;
    border: 1.5px solid #25d366;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.2s;
}

.share-btn-whatsapp:hover {
    background: #25d366;
    color: #fff;
}

.share-btn-whatsapp:active {
    transform: scale(0.98);
}

/* Completion footer - subtle text link */
.completion-footer {
    margin-top: 16px;
    text-align: center;
    border-top: 1px solid #f0eeeb;
    padding-top: 14px;
}

.completion-footer a {
    color: #888;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.2s;
}

.completion-footer a:hover {
    color: var(--ordgata-primary);
    text-decoration: underline;
}

.completion-footer a.btn-primary {
    background: none;
    border: none;
    color: #888;
    font-weight: 500;
    padding: 0;
}

.completion-footer a.btn-primary:hover {
    background: none;
    color: var(--ordgata-primary);
}

/* ==========================================================================
   Toast Notifications
   ========================================================================== */
.ordgata-toast {
    position: fixed;
    top: calc(var(--og-action-bar-height, 74px) + var(--og-header-height, 48px) + 12px);
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.85);
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 500;
    z-index: 3000;
    pointer-events: none;
    animation: toast-in 0.3s ease;
    max-width: calc(100vw - 40px);
    text-align: center;
}

@keyframes toast-in {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(-12px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

@keyframes toast-out {
    from {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
    to {
        opacity: 0;
        transform: translateX(-50%) translateY(-12px);
    }
}

/* ==========================================================================
   Desktop Enhancements (768px+)
   ========================================================================== */
@media (min-width: 768px) {
    :root {
        --ordgata-keyboard-height: 180px;
    }

    .ordgata-game {
        max-width: 600px;
        margin: 0 auto;
    }

    .ordgata-clues-swiper {
        bottom: calc(var(--ordgata-footer-actions-height) + 44px);
    }

    .ordgata-dots {
        bottom: var(--ordgata-footer-actions-height);
    }

    .ordgata-actions {
        bottom: 0;
    }

    /* Keyboard now visible on desktop too */
    /* .ordgata-keyboard-container {
        display: none;
    } */

    .ordgata-clue-card {
        flex: 0 0 calc(100% - 64px);
    }

    .clue-answer-boxes .letter-box {
        width: 48px;
        height: 56px;
    }

    .clue-answer-boxes .letter-box input {
        font-size: 1.25rem;
    }
}

/* ==========================================================================
   Landing Page (preserved from original)
   ========================================================================== */
.ordgata-title {
    color: var(--ordgata-dark);
}

.ordgata-title-subtitle {
    font-size: 12pt;
}

.ordgata-today-card__header {
    background: linear-gradient(145deg, #fff9f2 0%, #fffefc 60%, #ffffff 100%);
    border-bottom: 1px solid #f0e4d6;
    padding: 14px 16px;
}

.ordgata-today-card__kicker {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12pt;
    font-weight: 600;
    color: #c2410c;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 6px;
}

.ordgata-today-card__kicker i {
    color: var(--ordgata-primary);
}

.ordgata-today-card__title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.ordgata-today-card__title {
    margin: 0;
    font-size: 15pt;
    color: #111827;
}

.ordgata-today-card__meta {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    background: #fff8f2;
    border: 1px solid #f0e4d6;
    padding: 3px 10px;
    font-size: 12pt;
    color: #9a3412;
    white-space: nowrap;
}

.ordgata-today-card__subtitle {
    margin: 6px 0 0;
    font-size: 12pt;
    color: #6b7280;
}

.hidden-word-preview {
    display: flex;
    justify-content: center;
    gap: 5px;
    padding: 16px 0;
    flex-wrap: wrap;
}

.hidden-word-preview .letter-box {
    width: 34px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #fafafa;
    border: 1.5px solid #e5e1dc;
    border-radius: 6px;
    font-size: 14pt;
    font-weight: 700;
    color: #bbb;
}

.how-to-icon {
    opacity: 0.8;
}

/* ==========================================================================
   Shared Page Components
   ========================================================================== */

.ordgata-page-title {
    font-size: 22pt;
    font-weight: 700;
    color: var(--ordgata-dark);
}

.ordgata-page-subtitle {
    font-size: 14pt;
    color: var(--ordgata-text-muted);
}

.ordgata-breadcrumb .breadcrumb {
    background: transparent;
    padding: 8px 0;
    font-size: 12pt;
}

.ordgata-breadcrumb .breadcrumb-item a {
    color: var(--ordgata-primary);
}

.ordgata-breadcrumb .breadcrumb-item.active {
    color: var(--ordgata-text-muted);
}

/* ==========================================================================
   Sidebar Cards (Shared across pages)
   ========================================================================== */

.ordgata-sidebar-card {
    border: 1px solid #f0e4d6;
    border-radius: var(--ordgata-radius);
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
    background: #fff;
}

.ordgata-sidebar-header {
    background: linear-gradient(135deg, #fff9f3 0%, #fff 100%);
    border-bottom: 1px solid #f0e4d6;
    font-weight: 600;
    font-size: 12pt;
    color: var(--ordgata-dark);
    padding: 12px 16px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.ordgata-sidebar-header i {
    color: var(--ordgata-primary);
    margin-right: 4px;
}

.ordgata-sidebar-body {
    padding: 0;
}

.ordgata-sidebar-footer {
    border-top: 1px solid #f0e4d6;
    padding: 0;
    text-align: center;
}

.ordgata-sidebar-link {
    display: block;
    padding: 10px 16px;
    color: var(--ordgata-text-muted);
    font-weight: 500;
    font-size: 12pt;
    text-decoration: none;
    transition: all 0.2s ease;
}

.ordgata-sidebar-link:hover {
    background: #fff8f2;
    color: var(--ordgata-primary);
    text-decoration: none;
}

.ordgata-sidebar-link i {
    font-size: 12pt;
    margin-left: 4px;
    transition: transform 0.2s ease;
}

.ordgata-sidebar-link:hover i {
    transform: translateX(3px);
}

/* --- Leaderboard --- */

.ordgata-leaderboard-list {
    display: flex;
    flex-direction: column;
}

.ordgata-leaderboard-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    text-decoration: none;
    color: var(--ordgata-dark);
    border-bottom: 1px solid #f5f3f0;
    transition: background 0.15s ease;
}

.ordgata-leaderboard-row:last-child {
    border-bottom: none;
}

.ordgata-leaderboard-row:hover {
    background: #fff8f2;
    text-decoration: none;
    color: var(--ordgata-dark);
}

.ordgata-rank-medal {
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-weight: 700;
    font-size: 12pt;
    color: #fff;
    flex-shrink: 0;
}

.ordgata-rank-medal--gold {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.35);
}

.ordgata-rank-medal--silver {
    background: linear-gradient(135deg, #9ca3af, #6b7280);
    box-shadow: 0 2px 8px rgba(107, 114, 128, 0.3);
}

.ordgata-rank-medal--bronze {
    background: linear-gradient(135deg, #d97706, #92400e);
    box-shadow: 0 2px 8px rgba(217, 119, 6, 0.3);
}

.ordgata-rank-medal--default {
    background: var(--ordgata-light);
    color: var(--ordgata-text-muted);
    font-size: 12pt;
}

.ordgata-leaderboard-name {
    flex: 1;
    font-weight: 500;
    font-size: 12pt;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ordgata-leaderboard-points {
    font-weight: 700;
    font-size: 12pt;
    color: var(--ordgata-primary-dark);
    white-space: nowrap;
}

.ordgata-leaderboard-points small {
    font-weight: 400;
    font-size: 12pt;
    color: var(--ordgata-text-muted);
    margin-left: 2px;
}

/* --- Recent Puzzles --- */

.ordgata-puzzle-list {
    display: flex;
    flex-direction: column;
}

.ordgata-puzzle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    text-decoration: none;
    color: var(--ordgata-dark);
    border-bottom: 1px solid #f5f3f0;
    transition: background 0.15s ease;
}

.ordgata-puzzle-row:last-child {
    border-bottom: none;
}

.ordgata-puzzle-row:hover {
    background: #fff8f2;
    text-decoration: none;
    color: var(--ordgata-dark);
}

.ordgata-puzzle-date {
    font-size: 12pt;
    font-weight: 500;
}

.ordgata-puzzle-date i {
    color: var(--ordgata-primary);
    margin-right: 6px;
    font-size: 12pt;
}

.ordgata-diff-badge {
    border-radius: 12px;
    padding: 3px 10px;
    font-size: 12pt;
    font-weight: 600;
    text-transform: capitalize;
}

.ordgata-diff-badge--easy {
    background: #d1fae5;
    color: #065f46;
}

.ordgata-diff-badge--medium {
    background: #ffedd5;
    color: #9a3412;
}

.ordgata-diff-badge--hard {
    background: #fee2e2;
    color: #991b1b;
}

/* --- Difficulty Selector (Home Page) --- */
.ordgata-difficulty-selector {
    display: flex;
    gap: 8px;
    justify-content: center;
}
.ordgata-diff-btn {
    border: 1.5px solid #e5e7eb;
    background: #fff;
    border-radius: 20px;
    padding: 5px 14px;
    font-size: 12pt;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}
.ordgata-diff-btn--easy {
    color: #065f46;
}
.ordgata-diff-btn--easy.active,
.ordgata-diff-btn--easy:hover {
    background: #d1fae5;
    border-color: #065f46;
}
.ordgata-diff-btn--medium {
    color: #9a3412;
}
.ordgata-diff-btn--medium.active,
.ordgata-diff-btn--medium:hover {
    background: #ffedd5;
    border-color: #9a3412;
}
.ordgata-diff-btn--hard {
    color: #991b1b;
}
.ordgata-diff-btn--hard.active,
.ordgata-diff-btn--hard:hover {
    background: #fee2e2;
    border-color: #991b1b;
}

/* ==========================================================================
   Stats Page
   ========================================================================== */

.ordgata-stat-card {
    background: #fff;
    border: 1px solid var(--ordgata-border);
    border-radius: var(--ordgata-radius);
    padding: 20px 16px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.06);
    height: 100%;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ordgata-stat-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--ordgata-shadow-accent);
}

.ordgata-stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
    font-size: 18pt;
}

.ordgata-stat-icon--primary {
    background: #ffe4c4;
    color: var(--ordgata-primary-dark);
}

.ordgata-stat-icon--warning {
    background: #fef3c7;
    color: #b45309;
}

.ordgata-stat-icon--success {
    background: #d1fae5;
    color: #047857;
}

.ordgata-stat-icon--danger {
    background: #fee2e2;
    color: #b91c1c;
}

.ordgata-stat-value {
    font-size: 24pt;
    font-weight: 700;
    color: var(--ordgata-dark);
    line-height: 1.2;
}

.ordgata-stat-label {
    font-size: 12pt;
    color: var(--ordgata-text-muted);
    margin-top: 4px;
}

/* Tighter gutters for stat cards on mobile */
@media (max-width: 767px) {
    .ordgata-stats-row {
        margin-left: -6px;
        margin-right: -6px;
    }
    .ordgata-stats-row > [class*="col-"] {
        padding-left: 6px;
        padding-right: 6px;
    }
    .ordgata-stat-card {
        padding: 16px 10px;
    }
    .ordgata-stat-value {
        font-size: 20pt;
    }
    .ordgata-stat-label {
        font-size: 10pt;
    }
}

/* Back link for sub-pages */
.ordgata-back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--ordgata-primary);
    text-decoration: none;
    font-size: 11pt;
    padding: 6px 0;
    margin-bottom: 8px;
}
.ordgata-back-link:hover {
    color: var(--ordgata-primary-dark);
    text-decoration: none;
}

.ordgata-rank-display {
    text-align: center;
    margin-bottom: 12px;
}

.ordgata-rank-big {
    font-size: 36pt;
    font-weight: 700;
    color: var(--ordgata-success);
    line-height: 1.2;
}

/* --- Custom Table --- */

.ordgata-table-wrap {
    overflow-x: auto;
}

.ordgata-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12pt;
}

.ordgata-table thead th {
    padding: 12px 16px;
    font-weight: 600;
    font-size: 12pt;
    color: var(--ordgata-text-muted);
    border-bottom: 2px solid var(--ordgata-border);
    background: #fafafa;
    white-space: nowrap;
}

.ordgata-table tbody td {
    padding: 12px 16px;
    font-size: 12pt;
    border-bottom: 1px solid #f3f4f6;
    vertical-align: middle;
}

.ordgata-table tbody tr:hover {
    background: #fff8f2;
}

.ordgata-table tbody tr:last-child td {
    border-bottom: none;
}

.ordgata-table-highlight {
    background: #fff8f2;
}

.ordgata-table-highlight td {
    font-weight: 600;
}

.ordgata-player-link {
    color: var(--ordgata-dark);
    text-decoration: none;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.ordgata-player-link:hover {
    color: var(--ordgata-primary);
    text-decoration: none;
}

.ordgata-player-avatar {
    border-radius: 50%;
    border: 2px solid var(--ordgata-border);
}

/* --- Primary Button --- */

.ordgata-btn-primary {
    display: inline-block;
    padding: 10px 20px;
    background: linear-gradient(135deg, var(--ordgata-primary) 0%, var(--ordgata-primary-dark) 100%);
    color: #fff;
    border: none;
    border-radius: var(--ordgata-radius-sm);
    font-size: 12pt;
    font-weight: 600;
    text-decoration: none;
    text-align: center;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(255, 141, 0, 0.25);
}

.ordgata-btn-primary:hover {
    background: linear-gradient(135deg, var(--ordgata-primary-light) 0%, var(--ordgata-primary) 100%);
    color: #fff;
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 141, 0, 0.35);
}

/* ==========================================================================
   Archive Page
   ========================================================================== */

/* --- Archive: Mobile-first column order --- */
@media (max-width: 767px) {
    .ordgata-archive-main {
        order: 1;
    }
    .ordgata-archive-sidebar {
        order: 2;
    }
}

/* --- Month Section Headers --- */

.ordgata-month-section {
    margin-bottom: 12px;
}

.ordgata-month-header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15pt;
    font-weight: 700;
    color: var(--ordgata-dark);
    padding: 10px 0 8px;
    margin-bottom: 8px;
    border-bottom: 2px solid var(--ordgata-primary);
}

.ordgata-month-header i {
    color: var(--ordgata-primary);
}

.ordgata-month-count {
    background: var(--ordgata-primary);
    color: #fff;
    font-size: 11pt;
    font-weight: 600;
    padding: 2px 10px;
    border-radius: 12px;
    margin-left: auto;
}

/* --- Top Scorer in Archive Card --- */

.ordgata-archive-top-scorer {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 10px;
    padding-top: 8px;
    border-top: 1px solid #f3f4f6;
    font-size: 11pt;
    color: var(--ordgata-text-muted);
}

.ordgata-archive-top-scorer > i {
    color: #f59e0b;
    font-size: 12pt;
}

.ordgata-scorer-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: var(--ordgata-dark);
    font-weight: 600;
    text-decoration: none;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 110px;
}

.ordgata-scorer-link:hover {
    color: var(--ordgata-primary);
    text-decoration: none;
}

.ordgata-scorer-avatar {
    border-radius: 50%;
    border: 1px solid var(--ordgata-border);
    flex-shrink: 0;
}

.ordgata-scorer-pts {
    margin-left: auto;
    font-weight: 700;
    color: var(--ordgata-primary-dark);
    white-space: nowrap;
}

/* --- Category List (Sidebar) --- */

.ordgata-category-list {
    display: flex;
    flex-direction: column;
}

.ordgata-category-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 18px;
    text-decoration: none;
    color: var(--ordgata-dark);
    font-size: 12pt;
    border-bottom: 1px solid #f3f4f6;
    transition: background 0.15s ease;
}

.ordgata-category-row:last-child {
    border-bottom: none;
}

.ordgata-category-row:hover {
    background: #fff8f2;
    text-decoration: none;
    color: var(--ordgata-dark);
}

.ordgata-category-row--active {
    background: #fff8f2;
    border-left: 3px solid var(--ordgata-primary);
    font-weight: 600;
}

.ordgata-category-name {
    font-weight: 500;
    display: flex;
    align-items: center;
}

.ordgata-category-count {
    background: var(--ordgata-light);
    color: var(--ordgata-text-muted);
    font-size: 12pt;
    font-weight: 600;
    padding: 2px 10px;
    border-radius: 12px;
}

/* --- Archive Puzzle Cards --- */

.ordgata-archive-card {
    background: #fff;
    border: 1px solid var(--ordgata-border);
    border-radius: var(--ordgata-radius);
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.06);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    flex-direction: column;
}

.ordgata-archive-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--ordgata-shadow-accent);
}

.ordgata-archive-card-header {
    background: linear-gradient(135deg, #fff8f2 0%, #fff 100%);
    border-bottom: 1px solid var(--ordgata-border);
    padding: 14px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ordgata-archive-date {
    font-size: 12pt;
    font-weight: 600;
    color: var(--ordgata-dark);
}

.ordgata-archive-date i {
    color: var(--ordgata-primary);
    margin-right: 6px;
}

.ordgata-archive-card-body {
    padding: 16px;
    flex: 1;
}

.ordgata-archive-tema {
    font-size: 12pt;
    color: var(--ordgata-text-muted);
    margin: 0 0 10px;
}

.ordgata-archive-tema i {
    color: var(--ordgata-primary);
    margin-right: 4px;
}

.ordgata-archive-stats {
    display: flex;
    gap: 14px;
    font-size: 12pt;
    color: var(--ordgata-text-muted);
}

.ordgata-archive-stats i {
    margin-right: 4px;
}

.ordgata-archive-card-footer {
    padding: 12px 16px;
    border-top: 1px solid #f3f4f6;
}

.ordgata-archive-card-footer .ordgata-btn-primary {
    display: block;
    width: 100%;
}

/* --- Pagination --- */

.ordgata-pagination {
    display: flex;
    justify-content: center;
    gap: 6px;
    list-style: none;
    padding: 0;
    margin: 20px 0;
}

.ordgata-page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    border: 1px solid var(--ordgata-border);
    border-radius: var(--ordgata-radius-sm);
    color: var(--ordgata-dark);
    font-size: 12pt;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
}

.ordgata-page-link:hover {
    background: #fff8f2;
    border-color: var(--ordgata-primary);
    color: var(--ordgata-primary);
    text-decoration: none;
}

.ordgata-page-link--active {
    background: var(--ordgata-primary);
    border-color: var(--ordgata-primary);
    color: #fff;
}

.ordgata-page-link--active:hover {
    background: var(--ordgata-primary-dark);
    color: #fff;
}

/* --- Empty State --- */

.ordgata-empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--ordgata-text-muted);
    font-size: 13pt;
    background: #fff;
    border: 1px solid var(--ordgata-border);
    border-radius: var(--ordgata-radius);
}

.ordgata-empty-state i {
    color: var(--ordgata-primary);
    margin-right: 6px;
}

/* ==========================================================================
   Builder Page (preserved from original)
   ========================================================================== */
.letter-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: var(--ordgata-primary);
    color: white;
    border-radius: 8px;
    font-weight: 700;
    font-size: 1.1rem;
}

.clue-builder-row.complete .clue-preview {
    color: var(--ordgata-success) !important;
}

.ordgata-grid-preview .preview-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px;
    border-bottom: 1px solid var(--ordgata-border);
}

.ordgata-grid-preview .preview-row.incomplete {
    opacity: 0.5;
}

.preview-number {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--ordgata-primary);
    color: white;
    border-radius: 50%;
    font-size: 0.75rem;
    font-weight: 600;
}

.preview-letter {
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--ordgata-success);
    color: white;
    border-radius: 6px;
    font-weight: 700;
}

.preview-answer {
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.preview-hidden-word .hw-preview-cell {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    margin: 0 2px;
    background: var(--ordgata-primary);
    color: white;
    border-radius: 6px;
    font-weight: 700;
}

/* ==========================================================================
   Stats Page (preserved from original)
   ========================================================================== */
.rank-number {
    font-size: 3rem;
    font-weight: 700;
    color: var(--ordgata-success);
}

/* ==========================================================================
   Legacy Game Grid (for backwards compatibility)
   ========================================================================== */
.ordgata-game-container {
    max-width: 1400px;
}

.ordgata-grid {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--ordgata-cell-gap);
    padding: 20px;
}

.grid-row {
    display: flex;
    gap: var(--ordgata-cell-gap);
}

.grid-cell {
    flex: 1 1 0;
    aspect-ratio: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border: 2px solid var(--ordgata-border);
    border-radius: 6px;
    font-weight: 700;
    font-size: 1.1rem;
    text-transform: uppercase;
    transition: all 0.3s ease;
}

.grid-cell.empty-cell {
    background: transparent;
    border: none;
}

.grid-cell.central-cell {
    background: var(--ordgata-primary);
    border-color: var(--ordgata-primary);
    color: white;
}

.grid-cell.revealed {
    background: var(--ordgata-success);
    border-color: var(--ordgata-success);
    color: white;
}

/* Legacy hidden word row */
.hidden-word-row {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 3px solid var(--ordgata-primary);
    text-align: center;
}

.hidden-word-cells {
    display: flex;
    justify-content: center;
    gap: 6px;
}

.hidden-word-cell {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--ordgata-light);
    border: 3px solid var(--ordgata-border);
    border-radius: 8px;
    font-weight: 700;
    font-size: 1.5rem;
    text-transform: uppercase;
    color: #999;
    transition: all 0.3s ease;
}

.hidden-word-cell.revealed {
    background: var(--ordgata-success);
    border-color: var(--ordgata-success);
    color: white;
}

/* Score panel */
#score-card .score-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #6b7280;
}

#score-card .score-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--ordgata-dark);
}

/* Early guess card */
#early-guess-card {
    border-color: var(--ordgata-warning);
}

#early-guess-card .card-header {
    background: var(--ordgata-warning);
}

#hidden-word-guess {
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 2px;
    font-size: 1.1rem;
    text-align: center;
}

/* Success modal legacy */
.success-hidden-word h2 {
    font-size: 2.5rem;
    font-weight: 700;
    letter-spacing: 4px;
    color: var(--ordgata-success);
    text-transform: uppercase;
}

.success-stats .stat-box {
    padding: 15px;
    background: var(--ordgata-light);
    border-radius: 10px;
}

.success-stats .stat-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--ordgata-dark);
}

.success-stats .stat-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    color: #6b7280;
}

/* Legacy clues panel */
.ordgata-clues-card {
    max-height: calc(100vh - 200px);
    overflow: hidden;
}

.ordgata-clues-card .card-body {
    overflow-y: auto;
    max-height: calc(100vh - 280px);
}

.ordgata-clue-item {
    display: flex;
    align-items: flex-start;
    padding: 12px;
    border-bottom: 1px solid var(--ordgata-border);
    transition: background-color 0.2s;
}

.ordgata-clue-item:last-child {
    border-bottom: none;
}

.ordgata-clue-item.solved {
    background-color: rgba(16, 185, 129, 0.1);
}

.ordgata-clue-item.feedback-correct {
    animation: pulse-success 0.5s ease;
}

.ordgata-clue-item.feedback-wrong {
    animation: shake-animation 0.5s ease;
}

@keyframes pulse-success {
    0%, 100% { background-color: transparent; }
    50% { background-color: rgba(16, 185, 129, 0.3); }
}

.clue-content {
    flex: 1;
    min-width: 0;
}

.clue-input-wrapper {
    display: flex;
    gap: 8px;
}

.clue-input {
    flex: 1;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.clue-status {
    margin-left: 12px;
    flex-shrink: 0;
}

/* Swipe indicator */
.swipe-indicator {
    display: none;
    text-align: center;
    padding: 8px;
    font-size: 0.8rem;
    color: #9ca3af;
}

@media (max-width: 575px) {
    .swipe-indicator {
        display: block;
    }
}

/* ==========================================================================
   Responsive Adjustments
   ========================================================================== */
@media (max-width: 991px) {
    .ordgata-clues-card {
        max-height: none;
    }

    .ordgata-clues-card .card-body {
        max-height: 300px;
    }

    :root {
        --ordgata-cell-size: 35px;
    }

    .hidden-word-cell {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }
}

@media (max-width: 575px) {
    :root {
        --ordgata-cell-size: 30px;
    }

    .hidden-word-cell {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }

    .success-hidden-word h2 {
        font-size: 1.8rem;
        letter-spacing: 2px;
    }
}

/* ==========================================================================
   GRID MODE - CodyCross Style Interface
   Desktop-first with mobile support
   ========================================================================== */

/* Variables for grid mode */
.ordgata-game--grid-mode {
    --og-gradient: linear-gradient(135deg, #fff8f2 0%, #fff 100%);
    --og-gradient-subtle: linear-gradient(135deg, #fffaf5 0%, #fff 100%);
    --og-border: #ffe0c0;
    --og-border-light: #fff0e0;
    --og-accent: #ff8d00;
    --og-accent-hover: #e67e00;
    --og-accent-light: rgba(255, 141, 0, 0.1);
    --og-accent-glow: rgba(255, 141, 0, 0.25);
    --og-radius: 12px;
    --og-radius-sm: 6px;
    --og-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    --og-shadow-accent: 0 4px 15px rgba(255, 141, 0, 0.2);
    --og-cell-size: 48px;
    --og-cell-gap: 4px;
    --og-header-height: 48px;
    --og-action-bar-height: 74px;
    --og-panel-width: 340px;
}

/* Main container - full screen (no site header in game pages) */
.ordgata-game--grid-mode {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    min-height: 100dvh;
    margin-top: 0;
    background: linear-gradient(180deg, #f8f9fa 0%, #f0f2f5 100%);
    overflow: hidden;
}

/* ==========================================================================
   Grid Mode Header - Single Row, iOS/Scandinavian Style
   ========================================================================== */
.ordgata-header--grid {
    position: fixed;
    top: var(--og-action-bar-height, 74px);
    left: 0;
    right: 0;
    height: var(--og-header-height);
    padding: 0 16px;
    background: #ffffff;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    z-index: 52;
}

.ordgata-header-nav {
    display: flex;
    align-items: center;
    width: 100%;
    height: 100%;
    gap: 8px;
}

.ordgata-brand-inline {
    display: inline-flex;
    align-items: baseline;
    flex-direction: row;
    gap: 6px;
    justify-self: center;
    line-height: 1;
}

.ordgata-logo {
    font-size: 1.05rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    color: #ff8d00;
}

.ordgata-date-separator {
    display: inline;
    color: #d1d5db;
    font-weight: 300;
    font-size: 0.9rem;
}

.ordgata-date {
    font-size: 0.85rem;
    color: #9ca3af;
    font-weight: 500;
}

/* Timer in header - clean text */
.ordgata-header-timer {
    font-size: 0.85rem;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    color: #6b7280;
    white-space: nowrap;
    flex-shrink: 0;
}

.stat-timer {
    font-variant-numeric: tabular-nums;
}

/* Back button - flat, borderless */
.ordgata-header-nav .ordgata-back {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
    font-size: 1.05rem;
    background: none;
    border: none;
    box-shadow: none;
    color: #374151;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: background 0.15s;
}

.ordgata-header-nav .ordgata-back:hover {
    background: #f3f4f6;
}

/* Help button - flat, borderless */
.btn-help-minimal {
    width: 36px;
    height: 36px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f3f4f6;
    border: none;
    border-radius: 50%;
    color: #6b7280;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.15s;
    padding: 0;
    box-shadow: none;
}

.btn-help-minimal:hover {
    color: #374151;
    background: #f3f4f6;
}

/* ==========================================================================
   Main Game Area
   ========================================================================== */
.ordgata-main {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    margin-top: calc(var(--og-action-bar-height, 74px) + var(--og-header-height));
    height: calc(100dvh - var(--og-action-bar-height, 74px) - var(--og-header-height));
    padding: 0;
    overflow: hidden;
}

.ordgata-game-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: none;
    width: 100%;
    height: 100%;
    min-height: 0;
    padding: 12px;
    overflow: hidden;
}

/* ==========================================================================
   Grid Container
   ========================================================================== */
.ordgata-grid-container {
    flex: 1;
    display: flex;
    justify-content: center;
    width: 100%;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
}

.ordgata-crossword-grid {
    background: var(--og-gradient);
    border: 1px solid var(--og-border);
    border-radius: var(--og-radius);
    padding: 8px;
    box-shadow: var(--og-shadow);
    display: inline-flex;
    flex-direction: column;
    gap: var(--og-cell-gap);
    width: 100%;
    box-sizing: border-box;
    margin: 0;
}

.grid-row {
    display: flex;
    gap: var(--og-cell-gap);
    width: 100%;
}

/* Grid cells */
.grid-cell {
    flex: 1 1 0;
    aspect-ratio: 1;
    min-width: 0;
    position: relative;
    border-radius: var(--og-radius-sm);
    transition: all 0.2s ease;
}

.grid-cell--empty {
    background: transparent;
    pointer-events: none;
}

.grid-cell:not(.grid-cell--empty) {
    background: white;
    border: 2px solid #949494;
    border-radius: var(--og-radius-sm);
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.grid-cell:not(.grid-cell--empty):hover {
    border-color: var(--og-accent);
    box-shadow: var(--ordgata-focus-ring);
    transform: scale(1.03);
}

/* Hidden word column - visible but not selected */
.grid-cell--key {
    background: #ffe4cc !important;
}

/* Key cell when solved - stays orange with special effect */
.grid-cell--key.grid-cell--solved {
    background: linear-gradient(135deg, #ffcc80 0%, #ffb74d 100%) !important;
    border-color: var(--og-accent) !important;
    box-shadow: 0 0 12px rgba(255, 141, 0, 0.5), inset 0 0 0 2px rgba(255, 255, 255, 0.5);
    animation: key-revealed-glow 1.5s ease-in-out infinite alternate;
}

@keyframes key-revealed-glow {
    0% { box-shadow: 0 0 8px rgba(255, 141, 0, 0.4), inset 0 0 0 2px rgba(255, 255, 255, 0.4); }
    100% { box-shadow: 0 0 16px rgba(255, 141, 0, 0.6), inset 0 0 0 2px rgba(255, 255, 255, 0.6); }
}

/* Selected row */
.grid-cell--selected {
    background: var(--og-accent-light) !important;
    border-color: var(--og-accent) !important;
    box-shadow: 0 0 0 3px var(--og-accent-glow);
    z-index: 1;
}

/* Current focus cell */
.grid-cell--focus {
    border-color: var(--og-accent) !important;
    box-shadow: 0 0 0 3px var(--og-accent-glow), inset 0 0 0 2px var(--og-accent-light);
}

/* Solved cells */
.grid-cell--solved {
    background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%) !important;
    border-color: var(--ordgata-success) !important;
}

.grid-cell--solved .cell-input {
    color: #333;
}

/* Wrong answer animation */
.grid-cell--wrong {
    background: #fee2e2 !important;
    border-color: var(--ordgata-danger) !important;
    animation: shake-gentle 0.4s ease;
}

@keyframes shake-gentle {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-2px); }
    40%, 80% { transform: translateX(2px); }
}

/* Cell input */
.cell-input {
    width: 100%;
    height: 100%;
    border: none;
    background: transparent;
    font-size: 1.15rem;
    font-weight: 700;
    text-align: center;
    text-transform: uppercase;
    color: var(--ordgata-dark);
    caret-color: var(--og-accent);
    cursor: pointer;
    padding: 0;
}

.cell-input:focus {
    outline: none;
}

.cell-input.revealed {
    color: var(--og-accent);
    font-style: italic;
}

/* Cascade reveal - letter revealed from another word's correct answer */
.grid-cell--cascade {
    animation: cascade-glow 0.6s ease-out;
}

.cell-input.cascade-revealed {
    color: #7c3aed !important;
    font-weight: 700;
}

@keyframes cascade-glow {
    0% {
        background: rgba(124, 58, 237, 0.4);
        transform: scale(1.15);
        box-shadow: 0 0 12px rgba(124, 58, 237, 0.5);
    }
    100% {
        background: white;
        transform: scale(1);
        box-shadow: none;
    }
}

/* ==========================================================================
   Side Panel
   ========================================================================== */
.ordgata-side-panel {
    display: none;
}

/* Definition Panel */
.ordgata-definition-panel {
    background: var(--og-gradient);
    border: 1px solid var(--og-border);
    border-radius: var(--og-radius);
    padding: 20px;
    box-shadow: var(--og-shadow);
}

.definition-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--og-border-light);
}

.definition-number {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--og-accent) 0%, var(--og-accent-hover) 100%);
    color: white;
    border-radius: 50%;
    font-size: 1rem;
    font-weight: 700;
    box-shadow: var(--og-shadow-accent);
}

.definition-meta {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.definition-length {
    font-size: 0.85rem;
    color: var(--ordgata-text-muted);
}

.definition-text {
    font-size: 1.02rem;
    line-height: 1.45;
    color: var(--ordgata-dark);
    min-height: 60px;
    overflow-wrap: break-word;
    word-break: break-word;
}

.btn-hint {
    width: 100%;
    margin-top: 16px;
    padding: 14px 18px;
    min-height: 44px;
    background: transparent;
    border: 2px solid var(--og-accent);
    color: var(--og-accent);
    border-radius: var(--ordgata-radius-sm);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s ease;
}

.btn-hint:hover {
    background: var(--og-accent);
    color: white;
}

.btn-hint:active {
    transform: scale(0.98);
}

.btn-hint .hint-count {
    background: var(--og-accent-light);
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.85rem;
}

.btn-hint:hover .hint-count {
    background: rgba(255, 255, 255, 0.2);
}

.btn-hint--disabled {
    opacity: 0.5;
    cursor: pointer;
    /* Keep clickable to show registration modal for anonymous users */
}

.btn-hint--disabled:hover {
    background: rgba(255, 141, 0, 0.1);
    color: var(--og-accent);
}

/* Hidden Word Panel */
.ordgata-hidden-word-panel {
    background: var(--og-gradient);
    border: 1px solid var(--og-border);
    border-radius: var(--og-radius);
    padding: 20px;
    box-shadow: var(--og-shadow);
    text-align: center;
}

.ordgata-hidden-word-panel .hidden-word-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--ordgata-text-muted);
    margin-bottom: 12px;
}

.ordgata-hidden-word-panel .hidden-word-boxes {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-bottom: 16px;
}

.ordgata-hidden-word-panel .letter-box {
    position: relative;
    width: 40px;
    height: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
    /* Stile distintivo arancione/dorato coerente */
    background: linear-gradient(135deg, #fff8f0 0%, #ffe4c4 100%);
    border: 2px solid var(--og-accent, #ff8d00);
    border-radius: 8px;
    font-size: 1.3rem;
    font-weight: 700;
    color: #cc7000;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(255, 141, 0, 0.2);
    animation: hidden-word-pulse 3s ease-in-out infinite;
}

/* Punto interrogativo trasparente nelle caselle non rivelate */
.ordgata-hidden-word-panel .letter-box:not(.revealed)::before {
    content: '?';
    position: absolute;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--og-accent, #ff8d00);
    opacity: 0.35;
}

.ordgata-hidden-word-panel .letter-box.revealed {
    background: linear-gradient(135deg, var(--ordgata-success) 0%, #059669 100%);
    border-color: var(--ordgata-success);
    color: white;
    animation: letter-reveal-enhanced 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.4);
}

.btn-guess-word {
    width: 100%;
    padding: 14px 18px;
    min-height: 44px;
    background: linear-gradient(135deg, var(--og-accent) 0%, var(--og-accent-hover) 100%);
    border: none;
    color: white;
    border-radius: var(--ordgata-radius-sm);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s ease;
    box-shadow: var(--og-shadow-accent);
}

.btn-guess-word:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 141, 0, 0.35);
}

.btn-guess-word:active {
    transform: translateY(0);
}

/* ==========================================================================
   Keyboard (Now visible on both mobile and desktop in Grid Mode)
   ========================================================================== */
/* .ordgata-game--grid-mode .ordgata-keyboard-container {
    display: none;
} */

/* ==========================================================================
   Clue Bar (visible on both mobile and desktop)
   ========================================================================== */
.ordgata-mobile-clue-bar {
    position: fixed;
    left: 0;
    right: 0;
    /* bottom calculated dynamically by JS */
    min-height: 45px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    background: var(--ordgata-gradient);
    backdrop-filter: blur(10px);
    border-top: 2px solid var(--og-accent);
    border-radius: var(--ordgata-radius) var(--ordgata-radius) 0 0;
    z-index: 210;
    box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.08);
}

.ordgata-mobile-clue-bar .clue-number {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--og-accent) 0%, var(--og-accent-hover) 100%);
    color: white;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 700;
    flex: 0 0 auto;
}

.ordgata-mobile-clue-bar .clue-text {
    font-size: 13.5pt;
    font-weight: 500;
    color: var(--ordgata-dark);
    overflow-wrap: break-word;
    line-height: 1.3;
    flex: 1;
    min-width: 0;
}

.btn-hint-inline {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    height: 36px;
    padding: 0 10px;
    border-radius: 999px;
    border: 1.5px solid var(--og-accent);
    background: white;
    color: var(--og-accent);
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.btn-hint-inline i {
    font-size: 1rem;
}

.hint-credit-count {
    font-size: 0.85rem;
    font-weight: 700;
    min-width: 14px;
    text-align: center;
}

.btn-hint-inline.btn-hint--disabled {
    opacity: 0.4;
    border-color: #d1d5db;
    color: #9ca3af;
}

.btn-hint-inline:hover {
    background: var(--og-accent);
    color: white;
}

.btn-hint-inline:active {
    transform: scale(0.98);
}

/* ==========================================================================
   Grid Mode - Mobile Responsive
   ========================================================================== */
@media (max-width: 900px) {
    .ordgata-game--grid-mode {
        --og-cell-size: 38px;
        --og-panel-width: 280px;
    }

    .ordgata-game-area {
        gap: 16px;
    }
}

@media (max-width: 768px) {
    .ordgata-game--grid-mode {
        --og-cell-size: calc((100vw - 44px) / 8);
        --og-header-height: 48px;
        --og-panel-height: 0px;
    }

    .ordgata-main {
        height: calc(100dvh - var(--og-header-height) - var(--og-action-bar-height, 74px));
        overflow: hidden;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 0;
    }

    .ordgata-game-area {
        min-height: 0;
        height: 100%;
    }

    .ordgata-grid-container {
        overflow: auto;
        min-height: 0;
        padding-bottom: calc(228px + env(safe-area-inset-bottom));
    }

    .ordgata-hidden-word-panel {
        display: none;
    }

    .ordgata-hidden-word-panel .hidden-word-label {
        margin-bottom: 8px;
        font-size: 0.65rem;
    }

    .ordgata-hidden-word-panel .hidden-word-boxes {
        flex-direction: column;
        gap: 4px;
        margin-bottom: 10px;
    }

    .ordgata-hidden-word-panel .letter-box {
        width: 32px;
        height: 36px;
        font-size: 1rem;
    }

    .btn-guess-word {
        padding: 8px 12px;
        font-size: 0.85rem;
    }

    /* Show keyboard on mobile */
    .ordgata-game--grid-mode .ordgata-keyboard-container {
        display: block;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        height: calc(180px + env(safe-area-inset-bottom));
        padding: 0 8px;
        padding-bottom: calc(8px + env(safe-area-inset-bottom));
        background: linear-gradient(180deg, #f5f0eb 0%, #e8e3de 100%);
        z-index: 200;
    }
}

@media (min-width: 769px) {
    .ordgata-game--grid-mode {
        overflow: hidden;
    }

    .ordgata-main {
        overflow: hidden;
    }
}

@media (max-width: 480px) {
    .ordgata-game--grid-mode {
        --og-cell-size: 32px;
    }

    .ordgata-crossword-grid {
        padding: 10px;
    }

    .ordgata-hidden-word-panel .letter-box {
        width: 28px;
        height: 32px;
        font-size: 0.9rem;
    }
}

/* ==========================================================================
   Debug Hint Bar (dev only)
   ========================================================================== */
.ordgata-debug-hint {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 6px 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: rgba(0, 0, 0, 0.75);
    color: #fff;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    font-size: 12px;
    z-index: 2500;
    pointer-events: none;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.ordgata-debug-hint .debug-answer {
    font-weight: 700;
    color: #ffd18a;
}

/* ==========================================================================
   Flying Letter Animation (Grid Mode)
   ========================================================================== */
.flying-letter-grid {
    position: fixed;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1rem;
    background: linear-gradient(135deg, var(--og-accent) 0%, var(--og-accent-hover) 100%);
    color: white;
    border-radius: 6px;
    z-index: 2000;
    pointer-events: none;
    will-change: transform;
    box-shadow: var(--og-shadow-accent);
}

.ordgata-toast--success {
    background: var(--ordgata-success);
}

.ordgata-toast--error {
    background: var(--ordgata-danger);
}

/* ==========================================================================
   Support Pages - Session Hub / Resume UX
   ========================================================================== */
.ordgata-session-hub {
    display: grid;
    gap: 12px;
}

.ordgata-session-card {
    display: flex;
    align-items: center;
    gap: 10px;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    background: #fff;
    padding: 12px;
    box-shadow: 0 2px 12px rgba(15, 23, 42, 0.05);
}

.ordgata-session-card--daily {
    border-color: #ffd8b2;
    background: linear-gradient(135deg, #fffaf4 0%, #ffffff 100%);
}

.ordgata-session-card--resume {
    border-color: #fde1c4;
    background: linear-gradient(135deg, #fffbf7 0%, #ffffff 100%);
}

.ordgata-session-card__icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: #fff8f2;
    border: 1px solid #fde1c4;
    color: #ff8d00;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
}

.ordgata-session-card__content {
    flex: 1 1 auto;
    min-width: 0;
}

.ordgata-session-card__content h3 {
    margin: 0 0 2px;
    font-size: 13pt;
    font-weight: 600;
    color: #1f2937;
    line-height: 1.3;
}

.ordgata-session-card__content p {
    margin: 0;
    color: #6b7280;
    font-size: 12pt;
}

.ordgata-session-card__cta {
    white-space: nowrap;
}

.ordgata-in-progress-chip {
    display: block;
    border: 1px solid #fdd9b5;
    background: linear-gradient(180deg, #fffaf5 0%, #fff4e8 100%);
    color: #b45309;
    border-radius: 12px;
    padding: 10px 12px;
    font-size: 12pt;
    font-weight: 700;
    margin-bottom: 12px;
}

.ordgata-in-progress-chip__row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}

.ordgata-in-progress-chip__row strong {
    margin-left: auto;
    color: #92400e;
}

.ordgata-state-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #f59e0b;
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.2);
    flex-shrink: 0;
}

.ordgata-archive-state {
    margin-top: 10px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border-radius: 999px;
    padding: 4px 10px;
    font-size: 12pt;
    font-weight: 700;
}

.ordgata-archive-state--done {
    background: #ecfdf3;
    color: #047857;
    border: 1px solid #a7f3d0;
}

.ordgata-archive-state--progress {
    background: #fff8f0;
    color: #b45309;
    border: 1px solid #fdd9b5;
}

.ordgata-progress-line {
    margin-top: 6px;
    height: 6px;
    border-radius: 999px;
    background: #f3ece4;
    overflow: hidden;
}

.ordgata-progress-line > span {
    display: block;
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, #f59e0b 0%, #ff8d00 100%);
}

.ordgata-progress-line__meta {
    margin-top: 4px;
    font-size: 12pt;
    color: #9a8e82;
    font-weight: 500;
}

.ordgata-progress-line--archive {
    margin-top: 8px;
}

@media (max-width: 700px) {
    .ordgata-session-card {
        flex-wrap: wrap;
    }

    .ordgata-session-card__cta {
        width: 100%;
    }
}

/* Support pages - compact, elegant overrides */
.ordgata-support-page .ordgata-session-card__cta {
    font-size: 12pt;
    padding: 8px 16px;
    border-radius: 8px;
    font-weight: 600;
}

.ordgata-support-page .btn-primary {
    background: linear-gradient(135deg, #ff8d00, #e67e00);
    border: none;
    color: #fff;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(255, 141, 0, 0.2);
    transition: all 0.2s ease;
}

.ordgata-support-page .btn-primary:hover {
    box-shadow: 0 4px 12px rgba(255, 141, 0, 0.3);
    transform: translateY(-1px);
}

.ordgata-support-page .btn-outline-primary {
    border-color: #fdd9b5;
    color: var(--ordgata-primary-dark);
    font-weight: 500;
}

.ordgata-support-page .btn-outline-primary:hover {
    background: #fff8f2;
    border-color: var(--ordgata-primary);
}

.ordgata-support-page .ordgata-diff-badge {
    border: 1px solid rgba(0, 0, 0, 0.06);
    font-weight: 600;
}

.ordgata-support-page .card {
    border: 1px solid #f0e4d6;
    border-radius: var(--ordgata-radius);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
}

.ordgata-toast--info {
    background: rgba(0, 0, 0, 0.85);
}

/* ==========================================================================
   Tutorial Section - "Hur spelar man?"
   Senior-friendly: min 16px font, generous spacing
   ========================================================================== */

.ordgata-tutorial-section {
    background: var(--ordgata-light, #f3f4f6);
    border: 1px solid var(--ordgata-border, #ffe0c0);
    border-radius: 12px;
    padding: 16px 20px;
    margin-top: 16px;
}

.tutorial-header {
    padding-bottom: 12px;
    border-bottom: 1px solid var(--ordgata-border, #ffe0c0);
    margin-bottom: 16px;
}

.tutorial-title {
    font-size: 15pt;
    font-weight: 600;
    color: var(--ordgata-dark, #1f2937);
    display: flex;
    align-items: center;
    gap: 8px;
}

.tutorial-title i {
    color: var(--ordgata-primary, #ff8d00);
}

.tutorial-toggle {
    background: transparent;
    border: 1px solid var(--ordgata-border, #ffe0c0);
    border-radius: 6px;
    padding: 6px 12px;
    font-size: 12pt;
    color: var(--ordgata-text-muted, #6b7280);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
}

.tutorial-toggle:hover {
    background: white;
    border-color: var(--ordgata-primary, #ff8d00);
    color: var(--ordgata-primary, #ff8d00);
}

.tutorial-toggle .toggle-icon {
    transition: transform 0.3s ease;
}

.tutorial-toggle[aria-expanded="false"] .toggle-icon {
    transform: rotate(180deg);
}

.tutorial-content {
    overflow: hidden;
    max-height: 600px;
    transition: max-height 0.4s ease, opacity 0.3s ease;
    opacity: 1;
}

.tutorial-content.collapsed {
    max-height: 0;
    opacity: 0;
}

/* Mini-Grid Demo */
.tutorial-grid-demo {
    background: white;
    border: 1px solid var(--ordgata-border, #ffe0c0);
    border-radius: 10px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.demo-row {
    display: flex;
    align-items: center;
    gap: 4px;
}

.demo-number {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--ordgata-primary, #ff8d00);
    color: white;
    border-radius: 50%;
    font-size: 12pt;
    font-weight: 700;
    margin-right: 8px;
    flex-shrink: 0;
}

.demo-cell {
    width: 32px;
    height: 36px;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border: 2px solid #d1d5db;
    border-radius: 4px;
    font-size: 12pt;
    font-weight: 700;
    color: var(--ordgata-dark, #1f2937);
    text-transform: uppercase;
}

.demo-cell--key {
    background: #ffe4cc;
    border-color: var(--ordgata-primary, #ff8d00);
    color: var(--ordgata-primary-dark, #e67e00);
}

.demo-cell--empty {
    background: transparent;
    border: none;
}

.demo-hidden-word {
    display: flex;
    gap: 4px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 2px dashed var(--ordgata-primary, #ff8d00);
}

.demo-hidden-letter {
    width: 36px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--ordgata-success, #10b981) 0%, #059669 100%);
    color: white;
    border-radius: 6px;
    font-size: 13pt;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}

/* Tutorial Steps */
.tutorial-steps {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.tutorial-step {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255, 224, 192, 0.5);
}

.tutorial-step:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.step-number {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--ordgata-primary, #ff8d00) 0%, var(--ordgata-primary-dark, #e67e00) 100%);
    color: white;
    border-radius: 50%;
    font-size: 13pt;
    font-weight: 700;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(255, 141, 0, 0.25);
}

.step-content {
    flex: 1;
}

.step-content strong {
    display: block;
    font-size: 13pt;
    font-weight: 600;
    color: var(--ordgata-dark, #1f2937);
    margin-bottom: 4px;
}

.step-content p {
    font-size: 12pt;
    line-height: 1.5;
    color: var(--ordgata-text-muted, #6b7280);
    margin: 0;
}

/* Tutorial Responsive */
@media (max-width: 575px) {
    .ordgata-tutorial-section {
        padding: 14px 16px;
    }

    .demo-cell, .demo-cell--key {
        width: 28px;
        height: 32px;
        font-size: 12pt;
    }

    .demo-number {
        width: 26px;
        height: 26px;
        font-size: 12pt;
        margin-right: 6px;
    }

    .demo-hidden-letter {
        width: 32px;
        height: 36px;
        font-size: 12pt;
    }

    .step-number {
        width: 32px;
        height: 32px;
        font-size: 12pt;
    }
}

/* ==========================================================================
   Sprint 1: Gamification CSS - Credits, Modals, Rules
   ========================================================================== */

/* Help Button - OLD BADGE STYLE (deprecated, moved to .btn-help-minimal in header section) */
.btn-icon {
    /* Styles moved to .btn-help-minimal */
}


/* Modal Styles */
.ordgata-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    padding: 16px;
    box-sizing: border-box;
    z-index: 9999;
    animation: fadeIn 0.3s ease-in-out;
}

.ordgata-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    cursor: pointer;
}

.modal-content {
    position: relative;
    background: white;
    border-radius: 12px;
    max-width: 600px;
    max-height: 90vh;
    width: 90%;
    overflow-y: auto;
    padding: 2rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    animation: slideIn 0.3s ease-out;
    z-index: 10000;
}

/* Keep tall modals reachable on short/mobile viewports */
@media (max-height: 820px) {
    .ordgata-modal.active {
        align-items: flex-start;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        padding-top: max(12px, env(safe-area-inset-top));
        padding-bottom: max(12px, env(safe-area-inset-bottom));
    }

    .modal-content {
        max-height: calc(100dvh - 24px);
        margin: 0 auto;
    }
}

.modal-content > .btn-close-modal {
    position: absolute;
    top: 15px;
    right: 15px;
    width: auto;
    height: auto;
    margin-top: 0;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #999;
    cursor: pointer;
    min-width: 44px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border-radius: 8px;
    transition: all 0.2s;
}

.modal-content > .btn-close-modal:hover {
    color: #333;
    background: var(--ordgata-light);
}

.modal-title {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    text-align: center;
    color: var(--ordgata-dark);
}

.modal-icon-large {
    text-align: center;
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.modal-footer {
    margin-top: 2rem;
    text-align: center;
}

.modal-footer .btn-close-modal {
    position: static;
    width: 100%;
    height: 48px;
    min-width: auto;
    min-height: auto;
    font-size: 1rem;
    font-weight: 600;
    color: #666;
    background: #fff;
    border: 2px solid #ddd;
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-footer .btn-close-modal:hover {
    border-color: var(--ordgata-primary);
    color: var(--ordgata-primary);
    background: #fff8f2;
}

.modal-footer .btn-primary-modal {
    background: linear-gradient(135deg, var(--ordgata-primary) 0%, var(--ordgata-primary-dark) 100%);
    color: #fff;
    border: none;
}

.modal-footer .btn-primary-modal:hover {
    background: linear-gradient(135deg, var(--ordgata-primary-dark) 0%, #cc6600 100%);
    color: #fff;
}

.modal-footer .btn-primary-modal + .btn-close-modal {
    margin-top: 12px;
}

/* Tutorial Modal */
.modal-tutorial .tutorial-content {
    margin: 1rem 0;
}

.modal-tutorial .tutorial-visual-demo {
    margin-bottom: 2rem;
}

.modal-tutorial .tutorial-steps {
    padding: 0;
}

.modal-tutorial .tutorial-grid-demo {
    width: max-content;
    margin-left: auto;
    margin-right: auto;
    align-items: flex-start;
}

.modal-tutorial .demo-hidden-word {
    align-self: flex-start;
    justify-content: flex-start;
    padding-left: 40px;
}

/* No Credits Modal */
.modal-no-credits {
    text-align: center;
    padding: 32px 24px 20px;
}

.nc-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #fff8f2;
    border: 2px solid var(--ordgata-border);
}

.nc-icon i {
    font-size: 1.5rem;
    color: var(--ordgata-primary);
}

.modal-no-credits .modal-title {
    font-size: 1.4rem;
    margin-bottom: 6px;
}

.nc-subtitle {
    font-size: 0.9rem;
    color: var(--ordgata-text-muted);
    line-height: 1.45;
    margin: 0 0 20px;
}

/* Watch-ad button - card-style with badge */
.nc-ad-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 14px 16px;
    background: #fff;
    border: 2px solid var(--ordgata-border);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
    margin-bottom: 14px;
    text-align: left;
}

.nc-ad-btn:hover {
    border-color: var(--ordgata-primary);
    background: #fff8f2;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 141, 0, 0.15);
}

.nc-ad-btn:disabled {
    opacity: 0.6;
    cursor: wait;
    transform: none;
    box-shadow: none;
}

.nc-ad-btn__icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--ordgata-primary), var(--ordgata-primary-dark));
    color: #fff;
    font-size: 1.1rem;
}

.nc-ad-btn__text {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.nc-ad-btn__label {
    font-size: 0.95rem;
    font-weight: 600;
    color: #333;
}

.nc-ad-btn__sub {
    font-size: 0.78rem;
    color: var(--ordgata-text-muted);
}

.nc-ad-btn__badge {
    flex-shrink: 0;
    background: var(--ordgata-success);
    color: #fff;
    font-weight: 700;
    font-size: 0.95rem;
    padding: 4px 10px;
    border-radius: 8px;
    letter-spacing: 0.02em;
}

/* Countdown (registered users) */
.nc-countdown {
    background: #fff8f2;
    padding: 12px 16px;
    border-radius: 10px;
    border: 1.5px solid var(--ordgata-border);
    font-size: 0.9rem;
    color: #555;
    margin: 0 0 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.nc-countdown i {
    color: var(--ordgata-primary);
}

.nc-countdown strong {
    color: var(--ordgata-primary);
    font-size: 1.2rem;
    font-variant-numeric: tabular-nums;
}

/* Register CTA (anonymous users) */
.nc-register-cta {
    margin-bottom: 12px;
}

.nc-register-cta__text {
    font-size: 0.85rem;
    color: var(--ordgata-text-muted);
    margin: 0 0 10px;
}

/* Skip / continue without */
.nc-footer {
    padding-top: 8px;
}

.nc-skip-btn {
    background: none;
    border: none;
    color: #aaa;
    font-size: 0.82rem;
    cursor: pointer;
    padding: 6px 12px;
    transition: color 0.2s;
}

.nc-skip-btn:hover {
    color: #666;
}

/* Legacy .nc-benefits (for other modals) */
.nc-benefits {
    list-style: none;
    padding: 0;
    margin: 0 0 18px;
    text-align: left;
}

.nc-benefits li {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1rem;
    color: #555;
    line-height: 1.4;
    padding: 8px 0;
    border-bottom: 1px solid #f0eeeb;
}

.nc-benefits li:last-child {
    border-bottom: none;
}

.nc-check {
    flex-shrink: 0;
    color: #28a745;
    font-size: 1rem;
    font-weight: 700;
}

/* Completion Screen Enhancements */
.completion-title {
    font-family: Merriweather, serif;
    font-size: 22px;
    font-weight: 700;
    text-align: center;
    margin: 0 0 14px;
    color: #333;
    line-height: 1.25;
}

.completion-title i {
    color: var(--ordgata-primary);
    margin-right: 6px;
}

.completion-stats-primary {
    display: flex;
    justify-content: center;
    margin: 18px 0;
}

.stat-large {
    text-align: center;
}

.stat-large .stat-value {
    font-size: 2.2rem;
    font-weight: 700;
    color: #333;
    line-height: 1;
}

.stat-large .stat-label {
    font-size: 13px;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 6px;
}

/* Streak Display in Completion */
.completion-streak {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin: 12px 0;
    padding: 12px 16px;
    background: #fff8f2;
    border: 1.5px solid var(--ordgata-border);
    color: #333;
    border-radius: 10px;
}

.completion-streak .streak-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 1.25rem;
    font-weight: 600;
    color: #333;
    background: none;
    padding: 0;
    margin: 0;
    border-radius: 0;
}

.completion-streak .streak-badge i {
    font-size: 1.5rem;
    color: var(--ordgata-primary);
    animation: flicker 1.5s infinite;
}

.completion-streak .streak-multiplier {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--ordgata-primary);
}

.streak-label {
    font-size: 0.9rem;
    color: #666;
}

/* ===== Completion Badges Section ===== */
.completion-badges {
    margin: 16px 0;
    padding: 16px;
    background: linear-gradient(135deg, #fff8f2 0%, #fff 100%);
    border-radius: 12px;
    border: 1px solid var(--ordgata-border, #e0e0e0);
}

.completion-badges__title {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 700;
    color: #333;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
}

.completion-badges__title i {
    color: var(--ordgata-primary, #ff8d00);
}

.completion-badges__list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
}

.completion-badge-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    width: 90px;
    text-align: center;
    animation: badge-pop-in 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) backwards;
}

.completion-badge-item:nth-child(1) { animation-delay: 0.3s; }
.completion-badge-item:nth-child(2) { animation-delay: 0.5s; }
.completion-badge-item:nth-child(3) { animation-delay: 0.7s; }
.completion-badge-item:nth-child(4) { animation-delay: 0.9s; }
.completion-badge-item:nth-child(5) { animation-delay: 1.1s; }
.completion-badge-item:nth-child(6) { animation-delay: 1.3s; }

@keyframes badge-pop-in {
    0% { transform: scale(0); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

.completion-badge-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    position: relative;
}

/* Rarity gradient backgrounds */
.completion-badge-icon.rarity-comune {
    background: linear-gradient(135deg, #e6c07b, #CD7F32);
    color: #fff;
}
.completion-badge-icon.rarity-non_comune {
    background: linear-gradient(135deg, #E8E8E8, #a8a8a8);
    color: #fff;
}
.completion-badge-icon.rarity-raro {
    background: linear-gradient(135deg, #f7e98e, #d4a600);
    color: #fff;
}
.completion-badge-icon.rarity-epico {
    background: linear-gradient(135deg, #ce93d8, #9400D3);
    color: #fff;
}
.completion-badge-icon.rarity-leggendario {
    background: linear-gradient(135deg, #ffcc02, #FF4500);
    color: #fff;
}

/* Glow animation for newly unlocked badges */
.completion-badge-icon::after {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: 50%;
    background: inherit;
    opacity: 0.3;
    animation: badge-glow 2s ease-in-out infinite;
    z-index: -1;
}

@keyframes badge-glow {
    0%, 100% { transform: scale(1); opacity: 0.3; }
    50% { transform: scale(1.15); opacity: 0; }
}

.completion-badge-name {
    font-size: 11px;
    font-weight: 600;
    color: #333;
    line-height: 1.2;
}

.completion-badge-points {
    font-size: 10px;
    color: var(--ordgata-primary, #ff8d00);
    font-weight: 700;
}

/* Level Up Section */
.completion-level-up {
    margin: 12px 0;
    padding: 12px 20px;
    background: linear-gradient(135deg, #e8f5e9, #c8e6c9);
    border-radius: 12px;
    border: 1px solid #a5d6a7;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    animation: level-up-slide-in 0.5s ease-out backwards;
    animation-delay: 0.8s;
}

@keyframes level-up-slide-in {
    0% { transform: translateY(20px); opacity: 0; }
    100% { transform: translateY(0); opacity: 1; }
}

.level-up-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #66bb6a, #43a047);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.2rem;
}

.level-up-text {
    display: flex;
    flex-direction: column;
}

.level-up-label {
    font-size: 12px;
    font-weight: 600;
    color: #2e7d32;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.level-up-value {
    font-size: 20px;
    font-weight: 800;
    color: #1b5e20;
}

/* Anonymous badge preview (locked) */
.completion-badges-preview {
    margin: 16px 0;
    padding: 16px;
    background: linear-gradient(135deg, #f5f5f5 0%, #eeeeee 100%);
    border-radius: 12px;
    border: 1px dashed #bdbdbd;
}

.completion-badges__list--locked .completion-badge-item {
    opacity: 0.55;
    filter: grayscale(70%);
}

.completion-badges__list--locked .completion-badge-icon::after {
    display: none;
}

/* Badge overflow "+X" indicator */
.completion-badge-overflow {
    opacity: 0.7;
}
.completion-badge-overflow .completion-badge-icon {
    font-size: 16px;
    font-weight: 700;
    color: #666;
}
.completion-badge-overflow .completion-badge-icon span {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

/* Auth CTA in completion modal */
.completion-auth-cta {
    text-align: center;
    margin: 16px 0;
    padding: 16px;
    background: linear-gradient(135deg, #fff8f2 0%, #fff4e6 100%);
    border-radius: 12px;
    border: 1px solid #ffe0b2;
}
.completion-auth-cta__text {
    font-size: 13px;
    font-weight: 600;
    color: var(--ordgata-primary, #ff8d00);
    margin: 0 0 12px;
}
.completion-auth-cta .anonymous-prompt__google-btn {
    margin-bottom: 0;
}
.completion-auth-cta .anonymous-prompt__register-link {
    margin-top: 10px;
    display: block;
    font-size: 13px;
    color: var(--ordgata-primary, #ff8d00);
    text-decoration: none;
}
.completion-auth-cta .anonymous-prompt__register-link:hover {
    text-decoration: underline;
}

@media (prefers-reduced-motion: reduce) {
    .completion-badge-item,
    .completion-level-up {
        animation: none;
    }
    .completion-badge-icon::after {
        animation: none;
    }
}

/* Details Toggle - separator style like lead-modal */
.completion-details-toggle {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 16px 0;
    color: #999;
    font-size: 13px;
}

.completion-details-toggle::before,
.completion-details-toggle::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e0e0e0;
}

#btn-toggle-details {
    font-size: 14px;
    color: #888;
    text-decoration: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px 10px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
    white-space: nowrap;
}

#btn-toggle-details:hover {
    color: var(--ordgata-primary);
}

#btn-toggle-details i {
    transition: transform 0.3s;
    font-size: 11px;
}

#btn-toggle-details.expanded i {
    transform: rotate(180deg);
}

/* Details Table */
.completion-details {
    margin-top: 12px;
    padding-top: 0;
    animation: slideDown 0.3s ease-out;
}

.completion-details .table {
    margin-bottom: 0;
}

.completion-details .table td {
    padding: 8px 4px;
    font-size: 14px;
    color: #555;
    border: none;
    border-bottom: 1px solid #f0eeeb;
}

.completion-details .table tr:last-child td {
    border-bottom: none;
}

.completion-details .text-right {
    text-align: right;
    font-weight: 600;
    color: #333;
}

/* Anonymous Prompt - lead-modal style */
.anonymous-prompt {
    border-top: 1px solid #e0e0e0;
    padding-top: 16px;
    margin-top: 16px;
    text-align: center;
}

.anonymous-prompt__text {
    font-size: 14px;
    color: #666;
    margin: 0 0 12px;
    line-height: 1.4;
}

.anonymous-prompt__google-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 11px 20px;
    background: #fff;
    color: #333;
    border: 2px solid #ddd;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all .2s;
    text-decoration: none;
    box-sizing: border-box;
}

.anonymous-prompt__google-btn:hover {
    border-color: #ff8d00;
    background: #fff8f2;
    color: #333;
    text-decoration: none;
}

.anonymous-prompt__google-btn img {
    width: 20px;
    height: 20px;
}

.anonymous-prompt__register-link {
    display: block;
    text-align: center;
    margin-top: 10px;
    font-size: 13px;
    color: var(--ordgata-primary);
    text-decoration: none;
}

.anonymous-prompt__register-link:hover {
    text-decoration: underline;
}

/* Rules Section (Splash Page) - Lead-modal style */
.rules-box {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,.06);
    border: 1px solid #f0e4d6;
    padding: 20px 22px 18px;
    margin: 1.5rem 0;
}
.rules-box__title {
    font-family: Merriweather, serif;
    font-size: 20px;
    font-weight: 700;
    color: #333;
    text-align: center;
    margin: 0 0 20px;
}
.rules-box__title i {
    color: var(--ordgata-primary);
    margin-right: 6px;
}
.rules-box__section {
    padding: 16px 0;
    border-bottom: 1px solid #f0eeeb;
}
.rules-box__section:last-of-type {
    border-bottom: none;
}
.rules-box__section--highlight {
    background: linear-gradient(135deg, #fff8f2 0%, #fff 100%);
    border-radius: 10px;
    padding: 16px 18px;
    margin: 0 -10px;
    border-bottom: none;
}
.rules-box__label {
    display: block;
    font-size: 15px;
    font-weight: 700;
    color: #555;
    margin-bottom: 10px;
}
.rules-box__label i {
    margin-right: 6px;
    color: #999;
}
.rules-box__label--accent {
    color: var(--ordgata-primary-dark);
}
.rules-box__label--accent i {
    color: var(--ordgata-primary);
}
.rules-benefits {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px 16px;
}
.rules-benefits li {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #555;
    line-height: 1.35;
    padding: 3px 0;
}
.rules-check {
    flex-shrink: 0;
    color: #28a745;
    font-size: 14px;
    font-weight: 700;
}
.rules-cross {
    flex-shrink: 0;
    color: #ccc;
    font-size: 14px;
    font-weight: 700;
}
.rules-cta {
    display: block;
    width: 100%;
    margin-top: 14px;
    padding: 11px 20px;
    background: #fff;
    color: #333;
    border: 2px solid #ddd;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    font-family: 'Open Sans', sans-serif;
    text-align: center;
    text-decoration: none;
    transition: all .2s;
    box-sizing: border-box;
}
.rules-cta:hover {
    border-color: #ff8d00;
    background: #fff8f2;
    color: #333;
    text-decoration: none;
}
.rules-tip {
    margin-top: 16px;
    padding: 14px 16px;
    background: #f8f9fa;
    border-radius: 10px;
    border-left: 3px solid var(--ordgata-primary);
    font-size: 13px;
    color: #555;
    line-height: 1.5;
}
.rules-tip strong {
    display: block;
    font-size: 14px;
    color: #333;
    margin-bottom: 6px;
}
.rules-tip strong i {
    color: var(--ordgata-primary);
    margin-right: 4px;
}
.rules-tip p {
    margin: 0 0 6px;
}
.rules-tip ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2px 14px;
}
.rules-tip ul li {
    font-size: 13px;
    color: #666;
    padding: 2px 0;
}
.rules-tip ul li::before {
    content: '\2022';
    color: var(--ordgata-primary);
    font-weight: 700;
    margin-right: 6px;
}
@media (max-width: 500px) {
    .rules-box {
        padding: 20px 18px 16px;
    }
    .rules-box__title {
        font-size: 18px;
    }
    .rules-benefits {
        grid-template-columns: 1fr;
        gap: 2px;
    }
    .rules-box__section--highlight {
        margin: 0 -6px;
        padding: 14px 14px;
    }
    .rules-tip ul {
        grid-template-columns: 1fr;
    }
}


/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes slideDown {
    from {
        max-height: 0;
        opacity: 0;
    }
    to {
        max-height: 500px;
        opacity: 1;
    }
}

@keyframes flicker {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

@keyframes urgentPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.85; }
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        padding: 1.5rem;
        max-height: 85vh;
    }

    .modal-title {
        font-size: 1.5rem;
    }

    .modal-icon-large {
        font-size: 3rem;
    }

    .completion-title {
        font-size: 19px;
    }

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

    .completion-streak {
        flex-direction: column;
        gap: 6px;
    }

    .completion-screen .modal-content {
        padding: 22px 20px 18px;
    }

    .ordgata-stats {
        gap: 4px;
    }

    /* New header responsive styles */
    .ordgata-brand-inline {
        gap: 6px;
    }

    .ordgata-logo {
        font-size: 1rem;
    }

    .ordgata-date {
        font-size: 0.85rem;
    }

    .btn-help-minimal {
        width: 32px;
        height: 32px;
        font-size: 1.1rem;
    }

    .ordgata-header-nav {
        gap: 6px;
    }
}

@media (max-width: 480px) {
    .benefits-list li {
        font-size: 1rem;
    }

    .completion-details .table td {
        font-size: 13px;
        padding: 6px 2px;
    }
}

/* Extra small screens */
@media (max-width: 360px) {
    .ordgata-header--grid {
        padding: 0 8px;
    }

    .ordgata-header-nav {
        gap: 4px;
    }

    .ordgata-streak-indicator { font-size: 0.75rem; }
    .ordgata-live-points { font-size: 0.75rem; }
    .ordgata-progress-bar { min-width: 30px; height: 16px; }
    .ordgata-progress-bar .progress-text { font-size: 0.55rem; }
    .ordgata-header-timer { font-size: 0.75rem; }
}

/* Button sizing - elegant, not oversized */
.btn-lg {
    min-height: 44px;
    font-size: 13pt;
    padding: 0.6rem 1.25rem;
    border-radius: 10px;
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    .rules-box {
        border: 2px solid #333;
    }

    .btn-icon:hover {
        border: 2px solid var(--ordgata-primary);
    }
}

/* Mini progress bar for stats table */
.ordgata-progress-mini {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 100px;
}

.ordgata-progress-bar-wrap {
    flex: 1;
    height: 8px;
    background: var(--ordgata-light);
    border-radius: 4px;
    overflow: hidden;
}

.ordgata-progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--ordgata-primary), var(--ordgata-primary-dark));
    border-radius: 4px;
    transition: width 0.3s ease;
}

.ordgata-progress-pct {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--ordgata-primary-dark);
    white-space: nowrap;
    min-width: 32px;
}

.ordgata-btn-continue {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 12px;
    background: var(--ordgata-primary);
    color: #fff;
    border-radius: 16px;
    font-size: 0.8rem;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s;
}

.ordgata-btn-continue:hover {
    background: var(--ordgata-primary-dark);
    color: #fff;
    text-decoration: none;
}

/* ============================================
   GAMIFICATION OVERHAUL - Header, Secret Word,
   Feedback, Completion, Streak Banner
   ============================================ */

/* --- Header: Streak indicator --- */
.ordgata-streak-indicator {
    display: flex; align-items: center; gap: 2px;
    color: #ff5722; font-weight: 700; font-size: 0.85rem;
    flex-shrink: 0; white-space: nowrap;
}
.ordgata-streak-indicator i { font-size: 0.9rem; }

/* --- Header: Live points with bump --- */
.ordgata-live-points {
    display: flex; align-items: center; gap: 3px;
    font-weight: 700; font-size: 0.85rem; color: var(--ordgata-primary, #ff8d00);
    flex-shrink: 0; white-space: nowrap;
}
.ordgata-live-points .points-icon { font-size: 0.9rem; }
.ordgata-live-points.bump .points-value {
    animation: points-bump 0.4s ease-out;
}
@keyframes points-bump {
    0%   { transform: scale(1); }
    40%  { transform: scale(1.45); color: #ffd700; }
    100% { transform: scale(1); }
}

/* --- Header: Progress bar --- */
.ordgata-progress-bar {
    position: relative; flex: 1 1 0; min-width: 50px;
    height: 22px; border-radius: 11px;
    background: #e5e7eb; overflow: hidden;
}
.ordgata-progress-bar .progress-fill {
    height: 100%; border-radius: 11px;
    background: linear-gradient(90deg, #ff8d00, #10b981);
    transition: width 0.4s ease;
}
.ordgata-progress-bar .progress-text {
    position: absolute; inset: 0;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.72rem; font-weight: 700; color: #1f2937;
    pointer-events: none;
}

/* --- Header: Timer color states --- */
.stat-timer.timer-green .timer-value  { color: #10b981; }
.stat-timer.timer-orange .timer-value { color: #f59e0b; }
.stat-timer.timer-red .timer-value    { color: #ef4444; }
.stat-timer.timer-red { animation: timer-pulse 1s infinite; }

/* --- Action bar (above header) --- */
.ordgata-action-bar {
    position: fixed; top: 0; left: 0; right: 0; z-index: 53;
    background: #fff; padding: 5px 12px 5px 0;
    display: flex; align-items: center;
    border-bottom: 1px solid #e5e7eb;
    justify-content: space-between;
}
.action-bar-logo { height: 64px; width: auto; flex-shrink: 0; }
.action-bar-buttons { display: flex; align-items: center; gap: 8px; }
.btn-guess-now {
    display: flex; align-items: center; gap: 6px;
    background: linear-gradient(135deg, #ff8d00, #ff6d00);
    color: #fff; border: none; border-radius: 22px;
    padding: 8px 18px; font-weight: 700; font-size: 0.85rem;
    cursor: pointer; white-space: nowrap; min-height: 40px;
    transition: transform 0.15s ease;
    box-shadow: 0 2px 8px rgba(255, 141, 0, 0.3);
}
.btn-guess-now:active { transform: scale(0.96); }
.guess-bonus-badge {
    background: rgba(255,255,255,0.3); border-radius: 10px;
    padding: 2px 8px; font-size: 0.72rem; font-weight: 800;
}
.btn-use-hint-bar {
    display: flex; align-items: center; gap: 4px;
    background: #f3f4f6; color: #374151;
    border: 1px solid #e5e7eb; border-radius: 22px;
    padding: 8px 14px; font-weight: 600; font-size: 0.85rem;
    cursor: pointer; min-height: 40px;
    transition: background 0.15s, transform 0.15s;
}
.btn-use-hint-bar:active { transform: scale(0.96); }
.btn-use-hint-bar i { color: #f59e0b; font-size: 0.95rem; }
.btn-use-hint-bar .hint-credit-count {
    font-weight: 800; font-size: 0.8rem;
}
.btn-use-hint-bar .hint-credit-count.credits-zero {
    color: #ef4444;
}

/* --- Feedback: Correct flash --- */
.grid-cell--correct-flash { animation: correct-flash 0.5s ease; }
@keyframes correct-flash {
    0%  { background-color: #10b981; }
    100%{ background-color: transparent; }
}

/* --- Feedback: Wrong flash --- */
.grid-cell--wrong-flash { animation: wrong-flash 0.3s ease; }
@keyframes wrong-flash {
    0%  { background-color: #ef4444; }
    100%{ background-color: transparent; }
}

/* --- Feedback: Key letter glow --- */
.grid-cell--key-glow {
    animation: key-glow-pulse 1.2s ease-in-out 2;
}
@keyframes key-glow-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(255,141,0,0.4); }
    50%      { box-shadow: 0 0 12px 4px rgba(255,141,0,0.6); }
}

/* --- Toast: warning type (near-miss) --- */
.ordgata-toast--warning {
    background: #fffbeb !important; color: #92400e !important;
    border-left: 4px solid #f59e0b;
}

/* --- Credits zero indicator --- */
.hint-credit-count.credits-zero {
    color: #ef4444 !important; font-weight: 700;
}

/* (guess modal pre-filled + bonus-display styles moved to main Early Guess Modal section) */

/* --- Completion: ranking --- */
.completion-ranking {
    text-align: center; margin: 8px 0;
    font-size: 0.9rem; color: #6b7280;
}
.completion-ranking .ranking-text {
    background: #f3f4f6; padding: 4px 12px; border-radius: 12px;
    font-weight: 600;
}

/* --- Completion: countdown --- */
.completion-countdown {
    text-align: center; margin: 12px 0 8px; color: #6b7280;
    font-size: 0.85rem;
}
.completion-countdown .countdown-timer {
    font-weight: 700; color: #1f2937; font-variant-numeric: tabular-nums;
}

/* --- Completion: share primary button --- */
.share-btn.share-btn--primary {
    background: linear-gradient(135deg, #ff8d00, #ff6d00);
    color: #fff; border: none; font-weight: 700;
    padding: 12px 24px; border-radius: 12px; font-size: 1rem;
    min-height: 48px; width: 100%;
}

/* --- Completion: confetti --- */
.confetti-container {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    pointer-events: none; z-index: 999; overflow: hidden;
}
.confetti-piece {
    position: absolute; width: 10px; height: 10px;
    top: -10px; opacity: 0; border-radius: 2px;
    animation: confetti-fall-new 3s ease-out forwards;
}
@keyframes confetti-fall-new {
    0%   { transform: translateY(0) rotate(0deg); opacity: 1; }
    100% { transform: translateY(100vh) rotate(720deg); opacity: 0; }
}

/* --- Streak anxiety banner (landing page) --- */
.ordgata-streak-banner {
    background: linear-gradient(135deg, #fff7ed, #fed7aa);
    border: 1px solid #fdba74; border-radius: 12px;
    padding: 12px 16px; margin-bottom: 16px;
}
.streak-banner-content {
    display: flex; align-items: center; gap: 12px;
}
.streak-fire-icon {
    font-size: 16pt; color: #ff5722;
    animation: streak-flicker 1.5s infinite alternate;
}
@keyframes streak-flicker {
    0%   { opacity: 1; transform: scale(1); }
    100% { opacity: 0.7; transform: scale(1.1); }
}
.streak-banner-text { flex: 1; }
.streak-banner-text strong { display: block; color: #c2410c; font-size: 12pt; }
.streak-play-btn {
    white-space: nowrap; min-height: 44px;
    font-weight: 600;
}

/* --- Flying letter animation helper --- */
.flying-letter {
    position: fixed; z-index: 2000;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; border-radius: 6px;
    background: #fff7ed; border: 2px solid #ff8d00; color: #c2410c;
    transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    pointer-events: none;
}

/* ==========================================================================
   Solved Card - Landing Page (/ordgatan) completed state
   ========================================================================== */

.ordgata-solved-card {
    text-align: center;
    padding: 20px 0 0;
}

/* Revealed hidden word letters */
.ordgata-solved-word {
    display: flex;
    justify-content: center;
    gap: 5px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.ordgata-solved-letter {
    width: 38px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--ordgata-primary);
    color: #fff;
    border-radius: 7px;
    font-size: 14pt;
    font-weight: 700;
    box-shadow: 0 2px 6px rgba(255, 141, 0, .15);
    animation: completion-letter-pop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) backwards;
}

.ordgata-solved-letter:nth-child(1)  { animation-delay: 0.05s; }
.ordgata-solved-letter:nth-child(2)  { animation-delay: 0.10s; }
.ordgata-solved-letter:nth-child(3)  { animation-delay: 0.15s; }
.ordgata-solved-letter:nth-child(4)  { animation-delay: 0.20s; }
.ordgata-solved-letter:nth-child(5)  { animation-delay: 0.25s; }
.ordgata-solved-letter:nth-child(6)  { animation-delay: 0.30s; }
.ordgata-solved-letter:nth-child(7)  { animation-delay: 0.35s; }
.ordgata-solved-letter:nth-child(8)  { animation-delay: 0.40s; }
.ordgata-solved-letter:nth-child(9)  { animation-delay: 0.45s; }
.ordgata-solved-letter:nth-child(10) { animation-delay: 0.50s; }

/* Theme label */
.ordgata-solved-theme {
    color: var(--ordgata-text-muted);
    font-size: 12pt;
    margin-bottom: 16px;
}

.ordgata-solved-theme i {
    color: var(--ordgata-primary);
    margin-right: 4px;
}

/* Stats row */
.ordgata-solved-stats {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin: 16px 0;
    padding: 14px 0;
    border-top: 1px solid #f0f0f0;
    border-bottom: 1px solid #f0f0f0;
}

.ordgata-solved-stat {
    text-align: center;
}

.ordgata-solved-stat__value {
    display: block;
    font-size: 16pt;
    font-weight: 700;
    color: var(--ordgata-dark);
    line-height: 1.2;
}

.ordgata-solved-stat__value--perfect {
    color: var(--ordgata-success);
}

.ordgata-solved-stat__label {
    display: block;
    font-size: 12pt;
    color: var(--ordgata-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-top: 2px;
}

/* Badges (perfect, early guess) */
.ordgata-solved-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 14px;
    border-radius: 20px;
    font-size: 12pt;
    font-weight: 600;
    margin: 6px 4px;
}

.ordgata-solved-badge--perfect {
    background: #fef3c7;
    color: #b45309;
}

.ordgata-solved-badge--early {
    background: #ede9fe;
    color: #6d28d9;
}

/* Streak display */
.ordgata-solved-streak {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin: 12px 0;
    padding: 10px 16px;
    background: #fff8f2;
    border: 1.5px solid var(--ordgata-border);
    border-radius: 10px;
}

.ordgata-solved-streak__badge {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13pt;
    font-weight: 600;
    color: #333;
}

.ordgata-solved-streak__badge i {
    font-size: 15pt;
    color: var(--ordgata-primary);
    animation: streak-flicker 1.5s infinite alternate;
}

.ordgata-solved-streak__label {
    font-size: 12pt;
    color: #666;
}

.ordgata-solved-streak__multiplier {
    font-size: 14pt;
    font-weight: 700;
    color: var(--ordgata-primary);
}

/* Countdown to next puzzle */
.ordgata-solved-countdown {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 14px 0;
    padding: 10px 16px;
    background: var(--ordgata-light);
    border-radius: var(--ordgata-radius-sm);
    font-size: 12pt;
    color: var(--ordgata-text-muted);
}

.ordgata-solved-countdown i {
    color: var(--ordgata-primary);
}

.ordgata-countdown-timer {
    font-family: 'Courier New', monospace;
    font-size: 13pt;
    color: var(--ordgata-dark);
    min-width: 70px;
    text-align: center;
}

/* Action buttons */
.ordgata-solved-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 16px;
}

.ordgata-solved-actions .btn {
    flex: 1;
    max-width: 200px;
}

@media (max-width: 575px) {
    .ordgata-solved-stats {
        gap: 16px;
    }

    .ordgata-solved-stat__value {
        font-size: 14pt;
    }

    .ordgata-solved-letter {
        width: 32px;
        height: 38px;
        font-size: 12pt;
    }

    .ordgata-solved-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .ordgata-solved-actions .btn {
        max-width: none;
    }
}

/* ===== All Completed Hero ===== */
.ordgata-all-completed-hero {
    text-align: center;
    padding: 28px 20px;
    background: linear-gradient(135deg, #f0fdf4 0%, #ecfdf5 50%, #fffaf4 100%);
    border: 2px solid #a7f3d0;
    border-radius: var(--ordgata-radius, 12px);
}

.ordgata-all-completed-hero__icon {
    font-size: 2.5rem;
    color: #f59e0b;
    margin-bottom: 8px;
}

.ordgata-all-completed-hero__title {
    font-family: Merriweather, serif;
    font-size: 1.4rem;
    font-weight: 700;
    color: #1f2937;
    margin: 0 0 6px;
}

.ordgata-all-completed-hero__subtitle {
    font-size: 0.95rem;
    color: #6b7280;
    margin: 0 0 18px;
}

.ordgata-all-completed-countdown {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #fff8f2;
    padding: 14px 24px;
    border-radius: 10px;
    border: 1.5px solid var(--ordgata-border, #ffd8b2);
    font-size: 1rem;
    color: #6b7280;
    margin-bottom: 18px;
}

.ordgata-all-completed-countdown i {
    color: var(--ordgata-primary, #ff8d00);
}

.ordgata-all-completed-countdown strong {
    color: var(--ordgata-primary, #ff8d00);
    font-size: 1.3rem;
    font-variant-numeric: tabular-nums;
    font-family: 'Courier New', monospace;
}

.ordgata-all-completed-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.ordgata-all-completed-btn {
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 0.95rem;
}

@media (max-width: 575px) {
    .ordgata-all-completed-hero {
        padding: 22px 16px;
    }

    .ordgata-all-completed-hero__title {
        font-size: 1.2rem;
    }

    .ordgata-all-completed-countdown {
        padding: 10px 16px;
        font-size: 0.9rem;
    }

    .ordgata-all-completed-actions {
        flex-direction: column;
        align-items: stretch;
    }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
