/* Word Unscrambler Game - Bold & Eye-Catching Design */

* {
    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;
    padding: 20px;
    color: #333;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

/* Header */
.game-header {
    background: white;
    padding: 25px 30px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    margin-bottom: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 15px;
}

.game-icon {
    font-size: 48px;
}

.logo h1 {
    font-size: 36px;
    font-weight: 900;
    color: #667eea;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 20px;
    font-size: 18px;
    font-weight: 700;
    flex-wrap: wrap;
}

.user-info strong {
    color: #667eea;
    font-size: 22px;
}

/* Buttons */
.btn {
    padding: 16px 32px;
    font-size: 18px;
    font-weight: 900;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.2);
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.3);
}

.btn:active {
    transform: translateY(-1px);
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-easy {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    color: white;
    font-size: 24px;
    padding: 20px 50px;
}

.btn-medium {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    font-size: 24px;
    padding: 20px 50px;
}

.btn-hard {
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
    color: white;
    font-size: 24px;
    padding: 20px 50px;
}

/* Auth Section */
.auth-section {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 60vh;
}

.welcome-card {
    background: white;
    padding: 50px;
    border-radius: 20px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.3);
    max-width: 550px;
    width: 100%;
}

.welcome-card h2 {
    font-size: 36px;
    font-weight: 900;
    color: #667eea;
    margin-bottom: 15px;
    text-align: center;
}

.welcome-card p {
    font-size: 20px;
    color: #666;
    margin-bottom: 30px;
    text-align: center;
    font-weight: 600;
}

.auth-tabs {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
}

.tab-btn {
    flex: 1;
    padding: 16px;
    font-size: 20px;
    font-weight: 900;
    border: 3px solid #667eea;
    background: white;
    color: #667eea;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
}

.tab-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.auth-form input {
    width: 100%;
    padding: 18px 20px;
    margin-bottom: 20px;
    border: 4px solid #ddd;
    border-radius: 12px;
    font-size: 18px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.auth-form input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
    transform: scale(1.02);
}

.error-message {
    color: #dc3545;
    font-weight: 700;
    font-size: 16px;
    margin-top: 15px;
    padding: 15px;
    background: #ffe6e6;
    border-radius: 8px;
    border-left: 5px solid #dc3545;
}

/* Difficulty Selection */
.difficulty-section {
    background: white;
    padding: 60px;
    border-radius: 20px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.3);
    text-align: center;
    margin-bottom: 30px;
}

.difficulty-section h2 {
    font-size: 42px;
    font-weight: 900;
    color: #333;
    margin-bottom: 40px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.difficulty-buttons {
    display: flex;
    gap: 25px;
    justify-content: center;
    flex-wrap: wrap;
}

/* Game Play Area */
.game-play-section {
    margin-bottom: 30px;
}

.game-card {
    background: white;
    padding: 60px;
    border-radius: 20px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.3);
    text-align: center;
}

.difficulty-badge {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 50px;
    font-size: 22px;
    font-weight: 900;
    margin-bottom: 30px;
    text-transform: uppercase;
    letter-spacing: 2px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.2);
}

.difficulty-badge.easy {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    color: white;
}

.difficulty-badge.medium {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
}

.difficulty-badge.hard {
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
    color: white;
}

/* HUGE SCRAMBLED WORD - Yellow with Black Background */
.scrambled-word {
    background: #000000;
    color: #FFD700;
    font-size: 96px;
    font-weight: 900;
    padding: 40px 60px;
    border-radius: 20px;
    margin: 30px 0;
    letter-spacing: 15px;
    text-shadow: 
        0 0 10px rgba(255, 215, 0, 0.5),
        0 0 20px rgba(255, 215, 0, 0.3),
        4px 4px 8px rgba(0,0,0,0.5);
    box-shadow: 
        0 10px 40px rgba(0,0,0,0.5),
        inset 0 0 30px rgba(255, 215, 0, 0.1);
    border: 5px solid #FFD700;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.02);
    }
}

.word-info {
    font-size: 24px;
    font-weight: 700;
    color: #666;
    margin-bottom: 30px;
}

/* Answer Section - Bold Input */
.answer-section {
    margin: 40px 0;
}

.answer-section input {
    width: 100%;
    max-width: 600px;
    padding: 25px 30px;
    font-size: 32px;
    font-weight: 900;
    border: 6px solid #667eea;
    border-radius: 15px;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 3px;
    margin-bottom: 25px;
    transition: all 0.3s ease;
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.answer-section input:focus {
    outline: none;
    border-color: #764ba2;
    box-shadow: 
        0 0 0 6px rgba(102, 126, 234, 0.2),
        0 10px 30px rgba(0,0,0,0.25);
    transform: scale(1.03);
}

.answer-section button {
    font-size: 24px;
    padding: 20px 60px;
}

/* Game Actions */
.game-actions {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-top: 30px;
    flex-wrap: wrap;
}

.game-actions .btn {
    font-size: 20px;
    padding: 18px 40px;
}

/* Messages */
.game-message {
    margin-top: 25px;
    padding: 20px 30px;
    border-radius: 12px;
    font-size: 22px;
    font-weight: 900;
    text-align: center;
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}

.game-message.success {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    color: white;
}

.game-message.error {
    background: linear-gradient(135deg, #eb3349 0%, #f45c43 100%);
    color: white;
}

.game-message.info {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.hint-display {
    margin-top: 20px;
    padding: 18px 30px;
    background: #fff3cd;
    border: 4px solid #ffc107;
    border-radius: 12px;
    font-size: 26px;
    font-weight: 900;
    color: #856404;
    box-shadow: 0 6px 20px rgba(0,0,0,0.1);
}

/* Stats Section */
.stats-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

.stats-card {
    background: white;
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.3);
}

.stats-card h3 {
    font-size: 32px;
    font-weight: 900;
    color: #333;
    margin-bottom: 25px;
    border-bottom: 5px solid #667eea;
    padding-bottom: 15px;
    text-transform: uppercase;
}

.leaderboard-tabs {
    display: flex;
    gap: 12px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.leaderboard-tabs .tab-btn {
    flex: 1;
    min-width: 80px;
    padding: 12px;
    font-size: 16px;
}

.leaderboard-list,
.scores-list {
    max-height: 400px;
    overflow-y: auto;
}

.leaderboard-entry,
.score-entry {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px;
    margin-bottom: 12px;
    background: #f8f9fa;
    border-radius: 12px;
    font-weight: 700;
    font-size: 18px;
    border-left: 6px solid #667eea;
    transition: all 0.3s ease;
}

.leaderboard-entry:hover,
.score-entry:hover {
    background: #e9ecef;
    transform: translateX(5px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.rank {
    font-size: 24px;
    font-weight: 900;
    color: #667eea;
    min-width: 50px;
}

.player-name {
    flex: 1;
    font-size: 20px;
}

.player-score,
.score-points {
    font-size: 22px;
    font-weight: 900;
    color: #28a745;
}

.player-level {
    font-size: 18px;
    color: #666;
}

.score-difficulty {
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 900;
    text-transform: uppercase;
    color: white;
}

.score-difficulty.easy {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
}

.score-difficulty.medium {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.score-difficulty.hard {
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
}

.score-level {
    color: #666;
    font-size: 16px;
}

/* Footer */
.game-footer {
    background: white;
    padding: 25px;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    margin-top: 30px;
}

.game-footer p {
    font-size: 18px;
    font-weight: 700;
    color: #666;
}

/* Responsive Design */
@media (max-width: 768px) {
    .logo h1 {
        font-size: 28px;
    }
    
    .scrambled-word {
        font-size: 56px;
        padding: 30px 40px;
        letter-spacing: 8px;
    }
    
    .answer-section input {
        font-size: 24px;
        padding: 20px 25px;
    }
    
    .difficulty-section h2 {
        font-size: 32px;
    }
    
    .btn-easy,
    .btn-medium,
    .btn-hard {
        font-size: 20px;
        padding: 16px 40px;
    }
    
    .stats-section {
        grid-template-columns: 1fr;
    }
    
    .game-card {
        padding: 40px 25px;
    }
    
    .welcome-card {
        padding: 35px 25px;
    }
}

@media (max-width: 480px) {
    .scrambled-word {
        font-size: 42px;
        padding: 25px 30px;
        letter-spacing: 5px;
    }
    
    .answer-section input {
        font-size: 20px;
        padding: 18px 20px;
    }
    
    .game-actions {
        flex-direction: column;
    }
    
    .game-actions .btn {
        width: 100%;
    }
}
