/* Word Scramble Game Styles */

.scramble-container {
    max-width: 600px;
    margin: 0 auto;
    padding: 0 1rem;
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
}

/* Progress bar */
.progress-bar {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    margin: 1rem 0;
}

.progress-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #e0e0e0;
    transition: background 0.3s ease, transform 0.3s ease;
}

.progress-dot.solved {
    background: #6aaa64;
    transform: scale(1.2);
}

.progress-dot.current {
    background: #ffeb3b;
    box-shadow: 0 0 0 3px rgba(255, 235, 59, 0.3);
}

/* Game stats row */
.game-stats-row {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin: 0.75rem 0;
    font-size: 1rem;
    color: #555;
}

.game-stats-row .stat {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.game-stats-row .stat-value {
    font-weight: 700;
    color: #2c3e50;
}

/* Round label */
.round-label {
    text-align: center;
    font-size: 0.9rem;
    color: #888;
    margin-bottom: 0.75rem;
}

/* Scrambled letters display */
.scramble-area {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin: 1.5rem 0;
    min-height: 70px;
}

.scramble-tile {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    font-weight: 700;
    background: #f8f9fa;
    border: 2px solid #d3d6da;
    border-radius: 10px;
    cursor: pointer;
    user-select: none;
    transition: all 0.15s ease;
    color: #2c3e50;
}

.scramble-tile:hover {
    background: #fff3cd;
    border-color: #ffeb3b;
    transform: translateY(-3px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.scramble-tile:active {
    transform: translateY(0);
}

.scramble-tile.used {
    opacity: 0.25;
    pointer-events: none;
    transform: scale(0.9);
}

/* Answer area */
.answer-area {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin: 1.5rem 0;
    min-height: 70px;
}

.answer-slot {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    font-weight: 700;
    background: white;
    border: 2px dashed #d3d6da;
    border-radius: 10px;
    cursor: pointer;
    user-select: none;
    transition: all 0.15s ease;
    color: #2c3e50;
}

.answer-slot.filled {
    border-style: solid;
    border-color: #2c3e50;
    background: white;
}

.answer-slot.filled:hover {
    background: #fee2e2;
    border-color: #ef4444;
}

.answer-slot.hint {
    border-style: solid;
    border-color: #6aaa64;
    background: #f0fdf4;
    color: #6aaa64;
    pointer-events: none;
}

.answer-slot.correct {
    border-color: #6aaa64;
    background: #6aaa64;
    color: white;
    animation: popIn 0.3s ease;
}

.answer-slot.wrong {
    animation: shake 0.5s ease;
    border-color: #ef4444;
}

/* Controls */
.game-controls {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    margin: 1rem 0;
}

.game-btn {
    padding: 0.65rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-hint {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffc107;
}

.btn-hint:hover {
    background: #ffe69c;
}

.btn-hint:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-shuffle {
    background: #e8f0fe;
    color: #1a73e8;
    border: 1px solid #1a73e8;
}

.btn-shuffle:hover {
    background: #d2e3fc;
}

.btn-clear {
    background: #f8f9fa;
    color: #555;
    border: 1px solid #ddd;
}

.btn-clear:hover {
    background: #e9ecef;
}

.btn-submit {
    background: #6aaa64;
    color: white;
}

.btn-submit:hover {
    background: #5a9a54;
}

.btn-submit:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* Message area */
.game-message {
    text-align: center;
    min-height: 2rem;
    font-size: 1rem;
    font-weight: 600;
    margin: 0.5rem 0;
    transition: opacity 0.3s ease;
}

.game-message.success {
    color: #6aaa64;
}

.game-message.error {
    color: #ef4444;
}

.game-message.info {
    color: #1a73e8;
}

/* Completion overlay */
.completion-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.3s ease;
}

.completion-overlay.show {
    display: flex;
}

.completion-box {
    background: linear-gradient(135deg, #ffffff, #fefce8);
    border-radius: 24px;
    padding: 2rem;
    max-width: 420px;
    width: 90%;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    border: 2px solid #ffeb3b;
    animation: slideUp 0.3s ease;
}

.completion-emoji {
    font-size: 4rem;
    animation: bounce 1s ease infinite;
    margin-bottom: 0.5rem;
}

.completion-title {
    font-size: 1.75rem;
    font-weight: 800;
    color: #2c3e50;
    margin: 0.5rem 0;
}

.completion-subtitle {
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 1rem;
}

.completion-stats {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin: 1rem 0;
}

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

.completion-stat-value {
    font-size: 1.5rem;
    font-weight: 800;
    color: #2c3e50;
}

.completion-stat-label {
    font-size: 0.8rem;
    color: #888;
    text-transform: uppercase;
}

.completion-share-btn {
    display: inline-block;
    background: linear-gradient(135deg, #6aaa64, #5a9a54);
    color: white;
    border: none;
    padding: 0.85rem 2rem;
    border-radius: 12px;
    font-size: 1.05rem;
    font-weight: 700;
    cursor: pointer;
    margin-top: 0.75rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    width: 100%;
}

.completion-share-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(106, 170, 100, 0.4);
}

.completion-play-again {
    display: inline-block;
    background: transparent;
    color: #1a73e8;
    border: 1px solid #1a73e8;
    padding: 0.65rem 1.5rem;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    margin-top: 0.5rem;
    width: 100%;
    transition: background 0.2s ease;
}

.completion-play-again:hover {
    background: #e8f0fe;
}

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

@keyframes slideUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes popIn {
    0% { transform: scale(0.8); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-6px); }
    20%, 40%, 60%, 80% { transform: translateX(6px); }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-15px); }
    60% { transform: translateY(-8px); }
}

@keyframes wordSolved {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); background: #6aaa64; color: white; }
    100% { transform: scale(1); background: #6aaa64; color: white; }
}

/* Keyboard for mobile fallback */
.keyboard-input {
    position: absolute;
    left: -9999px;
    opacity: 0;
}

/* Responsive */
@media (max-width: 480px) {
    .scramble-tile,
    .answer-slot {
        width: 48px;
        height: 48px;
        font-size: 1.4rem;
    }

    .scramble-area,
    .answer-area {
        gap: 0.35rem;
    }

    .game-controls {
        flex-wrap: wrap;
    }

    .game-btn {
        padding: 0.55rem 1rem;
        font-size: 0.85rem;
    }

    .completion-box {
        padding: 1.5rem;
    }

    .completion-title {
        font-size: 1.4rem;
    }

    .game-stats-row {
        gap: 1rem;
        font-size: 0.9rem;
    }
}

/* SEO content area */
.seo-content {
    max-width: 800px;
    margin: 2rem auto;
    padding: 0 1rem;
    color: #333;
    line-height: 1.7;
}

.seo-content h2 {
    font-size: 1.5rem;
    color: #2c3e50;
    margin-top: 2rem;
    margin-bottom: 0.75rem;
}

.seo-content h3 {
    font-size: 1.2rem;
    color: #34495e;
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
}

.seo-content p {
    margin-bottom: 1rem;
}

.seo-content ul {
    padding-left: 1.5rem;
    margin-bottom: 1rem;
}

.seo-content li {
    margin-bottom: 0.4rem;
}

.seo-faq details {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 0.75rem;
}

.seo-faq summary {
    font-weight: 600;
    cursor: pointer;
    color: #2c3e50;
}

.seo-faq details p {
    margin-top: 0.75rem;
    color: #555;
}
