/* Spelling Champion Game Styles */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.container {
    max-width: 800px;
    width: 100%;
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

header {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
    padding: 30px;
    text-align: center;
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    font-weight: 700;
}

header p {
    font-size: 1.1rem;
    opacity: 0.9;
}

.game-area {
    padding: 30px;
}

.stats-panel {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 15px;
}

.stat {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.1rem;
    font-weight: 600;
}

.stat-label {
    color: #666;
}

.stat-value {
    color: #333;
    font-weight: 700;
}

.stat-separator {
    color: #999;
    margin: 0 5px;
}

.word-display {
    text-align: center;
    margin-bottom: 30px;
    padding: 30px;
    background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
    border-radius: 15px;
    position: relative;
}

.word-category {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(255, 255, 255, 0.9);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    color: #666;
}

.word-text {
    font-size: 3rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 10px;
    letter-spacing: 2px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.word-hint {
    font-size: 1.2rem;
    color: #666;
    font-style: italic;
    min-height: 1.5rem;
}

.input-section {
    margin-bottom: 20px;
}

#spelling-input {
    width: 100%;
    padding: 15px 20px;
    font-size: 1.5rem;
    border: 3px solid #e0e0e0;
    border-radius: 10px;
    text-align: center;
    font-weight: 600;
    margin-bottom: 20px;
    transition: all 0.3s ease;
}

#spelling-input:focus {
    outline: none;
    border-color: #4facfe;
    box-shadow: 0 0 0 3px rgba(79, 172, 254, 0.1);
}

.input-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.primary-btn, .secondary-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.primary-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.primary-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.secondary-btn {
    background: #f8f9fa;
    color: #666;
    border: 2px solid #e0e0e0;
}

.secondary-btn:hover {
    background: #e9ecef;
    border-color: #dee2e6;
}

.message {
    text-align: center;
    font-size: 1.2rem;
    font-weight: 600;
    min-height: 2rem;
    margin: 20px 0;
    padding: 15px;
    border-radius: 10px;
    transition: all 0.3s ease;
}

.message.correct {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.message.incorrect {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.message.hint {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.controls {
    text-align: center;
    margin-top: 20px;
}

.results {
    padding: 30px;
    text-align: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.results h2 {
    font-size: 2rem;
    margin-bottom: 30px;
}

.final-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.final-stat {
    background: rgba(255, 255, 255, 0.1);
    padding: 20px;
    border-radius: 10px;
    backdrop-filter: blur(10px);
}

.final-label {
    display: block;
    font-size: 0.9rem;
    opacity: 0.8;
    margin-bottom: 5px;
}

.final-value {
    display: block;
    font-size: 1.8rem;
    font-weight: 700;
}

.final-separator {
    margin: 0 5px;
}

.grade {
    font-size: 2rem !important;
}

.grade.A { color: #28a745; }
.grade.B { color: #17a2b8; }
.grade.C { color: #ffc107; }
.grade.D { color: #fd7e14; }
.grade.F { color: #dc3545; }

/* Responsive Design */
@media (max-width: 768px) {
    header {
        padding: 20px;
    }

    header h1 {
        font-size: 2rem;
    }

    .game-area {
        padding: 20px;
    }

    .stats-panel {
        flex-direction: column;
        gap: 10px;
    }

    .word-text {
        font-size: 2.5rem;
    }

    #spelling-input {
        font-size: 1.2rem;
    }

    .input-buttons {
        flex-direction: column;
    }

    .primary-btn, .secondary-btn {
        width: 100%;
    }

    .final-stats {
        grid-template-columns: 1fr;
    }
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.word-display, .input-section, .message {
    animation: fadeIn 0.5s ease-out;
}

.correct-animation {
    animation: correctPulse 0.6s ease-out;
}

.incorrect-animation {
    animation: incorrectShake 0.6s ease-out;
}

@keyframes correctPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

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