/* WordPath Game - Cosmic Gaming Theme */

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #1a0a2e 0%, #16213e 25%, #0f3460 50%, #533483 75%, #e94560 100%);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    color: #ffffff;
}

/* Animated Cosmic Background */
.cosmic-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.stars, .twinkling {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
}

.stars {
    background: transparent url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><radialGradient id="star"><stop offset="0%" stop-color="%23fff" stop-opacity="1"/><stop offset="100%" stop-color="%23fff" stop-opacity="0"/></radialGradient></defs><circle cx="20" cy="20" r="1" fill="url(%23star)"/><circle cx="80" cy="40" r="0.8" fill="url(%23star)"/><circle cx="40" cy="60" r="1" fill="url(%23star)"/><circle cx="90" cy="80" r="0.5" fill="url(%23star)"/><circle cx="10" cy="90" r="0.8" fill="url(%23star)"/></svg>') repeat;
    background-size: 200px 200px;
}

.twinkling {
    background: transparent url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><radialGradient id="twinkle"><stop offset="0%" stop-color="%23ffb3d9" stop-opacity="1"/><stop offset="100%" stop-color="%23ffb3d9" stop-opacity="0"/></radialGradient></defs><circle cx="30" cy="30" r="0.5" fill="url(%23twinkle)"/><circle cx="70" cy="70" r="0.3" fill="url(%23twinkle)"/><circle cx="60" cy="20" r="0.4" fill="url(%23twinkle)"/></svg>') repeat;
    background-size: 300px 300px;
    animation: twinkle 8s linear infinite;
}

@keyframes twinkle {
    from { transform: translateX(0); }
    to { transform: translateX(-300px); }
}

/* Container and Layout */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    position: relative;
    z-index: 1;
    display: contents;
}

/* Header */
.header {
    text-align: center;
    margin-bottom: 30px;
    color: #ffffff;
}

.back-btn {
    display: inline-block;
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    text-decoration: none;
    padding: 12px 24px;
    border-radius: 25px;
    margin-bottom: 20px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.back-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.header h1 {
    font-size: 3rem;
    text-shadow: 0 0 20px rgba(255, 179, 217, 0.8);
    margin-bottom: 10px;
}

.subtitle {
    font-size: 1.2rem;
    opacity: 0.9;
    margin-bottom: 30px;
}

/* Cosmic Cards */
.cosmic-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(15px);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    margin-bottom: 20px;
    overflow: hidden;
    animation: cosmic-glow 3s ease-in-out infinite alternate;
}

@keyframes cosmic-glow {
    0% { box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3); }
    100% { box-shadow: 0 8px 32px rgba(255, 179, 217, 0.2); }
}

.cosmic-card-header {
    background: rgba(255, 255, 255, 0.1);
    padding: 20px;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.header-title {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.cosmic-card-header h2 {
    color: #ffffff;
    font-size: 1.8rem;
    text-shadow: 0 0 10px rgba(255, 179, 217, 0.6);
    margin: 0;
}

/* Game Container */
.game-container {
    padding: 30px;
}

/* Game Info Panel */
.game-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    margin-bottom: 30px;
}

.round-info {
    text-align: center;
    color: white;
}

.round-display {
    font-size: 1.4em;
    font-weight: bold;
    color: #ffb3d9;
    text-shadow: 0 0 10px rgba(255, 179, 217, 0.6);
    margin-bottom: 5px;
}

.round-description {
    font-size: 1em;
    opacity: 0.9;
    font-style: italic;
}

.score-panel {
    display: flex;
    gap: 30px;
    background: rgba(255, 255, 255, 0.1);
    padding: 15px 30px;
    border-radius: 15px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.score-panel > div {
    color: white;
    font-size: 1.2em;
    font-weight: bold;
    text-shadow: 0 0 5px rgba(255, 179, 217, 0.6);
}

/* Game Board */
.game-board {
    display: flex;
    justify-content: center;
    margin-bottom: 30px;
}

.grid-container {
    position: relative;
    display: inline-block;
}

.wordpath-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(4, 1fr);
    gap: 8px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    width: 400px;
    max-width: 100%;
}

.start-game-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 1.8rem;
    font-weight: bold;
    padding: 20px 40px;
    background: linear-gradient(135deg, #ffb3d9, #e94560);
    color: white;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 2px;
    box-shadow: 0 8px 25px rgba(233, 69, 96, 0.4);
    animation: start-button-glow 2s ease-in-out infinite alternate;
    backdrop-filter: blur(10px);
    z-index: 10;
}

.start-game-overlay:hover {
    transform: translate(-50%, -50%) translateY(-3px) scale(1.05);
    box-shadow: 0 12px 30px rgba(233, 69, 96, 0.6);
    background: linear-gradient(135deg, #e94560, #ffb3d9);
}

.letter-tile {
    aspect-ratio: 1 / 1;
    width: 100%;
    min-width: 0;
    min-height: 0;
    background: #C9BEA3;
    border: 2px solid rgba(201, 190, 163, 0.8);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: #4a3c2a;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    user-select: none;
    position: relative;
    text-align: center;
    gap: 0;
    opacity: 0;
    transform: translateY(-100px);
}

.letter-tile.visible {
    opacity: 1;
    transform: translateY(0);
}

.letter-tile.falling {
    animation: fallIn 0.8s ease-out forwards;
}

.letter-text {
    font-size: clamp(1.1rem, 4vw, 1.8rem);
    line-height: 1;
    margin: 0;
    padding: 0;
}

.letter-points {
    font-size: clamp(0.5rem, 1.4vw, 0.7rem);
    opacity: 0.9;
    color: #6b5d47;
    position: absolute;
    bottom: 2px;
    right: 2px;
    font-weight: bold;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 3px;
    padding: 1px 3px;
    min-width: 12px;
    text-align: center;
}

.bonus-indicator {
    position: absolute;
    top: -2px;
    right: -2px;
    font-size: 0.5em;
    padding: 1px 2px;
    border-radius: 3px;
    color: white;
    font-weight: bold;
    text-shadow: 1px 1px 1px rgba(0,0,0,0.5);
    min-width: 18px;
    text-align: center;
}

.bonus-tile {
    border-width: 3px;
    animation: bonus-glow 2s ease-in-out infinite alternate;
}

@keyframes bonus-glow {
    0% { box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2); }
    100% { box-shadow: 0 4px 20px rgba(255, 179, 217, 0.4); }
}

.letter-tile:hover {
    background: #D4C5A9;
    border-color: #B8A082;
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 6px 20px rgba(201, 190, 163, 0.6);
}

.letter-tile.selected {
    background: linear-gradient(135deg, #ffb3d9, #e94560);
    border-color: #e94560;
    color: white;
    transform: scale(1.1);
    box-shadow: 0 8px 25px rgba(233, 69, 96, 0.5);
}

.letter-tile.used {
    background: linear-gradient(135deg, #533483, #16213e);
    border-color: #533483;
    color: white;
}

.letter-tile.invalid {
    background: linear-gradient(135deg, #e94560, #ff6b6b);
    border-color: #e94560;
    color: white;
    animation: shake 0.3s ease-in-out;
}

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

@keyframes fallIn {
    0% {
        opacity: 0;
        transform: translateY(-100px) scale(0.8);
    }
    60% {
        opacity: 1;
        transform: translateY(10px) scale(1.05);
    }
    80% {
        transform: translateY(-5px) scale(0.98);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Game Controls */
.game-controls {
    display: flex;
    flex-direction: column;
    gap: 20px;
    align-items: center;
    margin-bottom: 30px;
}

.word-input-section {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
    justify-content: center;
}

#word-input {
    padding: 12px 20px;
    font-size: 1.2em;
    border: 2px solid rgba(255, 179, 217, 0.5);
    border-radius: 10px;
    width: 300px;
    text-align: center;
    font-weight: bold;
    text-transform: uppercase;
    background: rgba(255, 255, 255, 0.7);
    color: #333;
    cursor: default;
}

#word-input:focus {
    outline: none;
}

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

button {
    padding: 12px 24px;
    font-size: 1em;
    font-weight: bold;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}


#new-game, #shuffle-grid, #hint {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

#new-game:hover, #shuffle-grid:hover, #hint:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

/* Game Sidebar */
.game-sidebar {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 20px;
}

.found-words, .leaderboard {
    background: rgba(255, 255, 255, 0.1);
    padding: 20px;
    border-radius: 15px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
}

.found-words h3, .leaderboard h3 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #ffb3d9;
    text-shadow: 0 0 10px rgba(255, 179, 217, 0.6);
}

/* Leaderboard Styles */
.leaderboard-list {
    min-height: 120px;
}

.leaderboard-entry {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    margin-bottom: 5px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    border-left: 3px solid #ffb3d9;
}

.leaderboard-entry:last-child {
    margin-bottom: 0;
}

.leaderboard-rank {
    font-weight: bold;
    color: #ffb3d9;
    min-width: 20px;
}

.leaderboard-name {
    flex: 1;
    margin-left: 10px;
    font-weight: bold;
}

.leaderboard-score {
    color: #ffb3d9;
    font-weight: bold;
}

.loading {
    text-align: center;
    opacity: 0.7;
    font-style: italic;
}

.info-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.2em;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.info-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.words-list {
    max-height: 200px;
    overflow-y: auto;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.found-word {
    background: rgba(255, 179, 217, 0.3);
    padding: 5px 10px;
    border-radius: 8px;
    font-size: 0.9em;
    font-weight: bold;
    color: white;
    border: 1px solid rgba(255, 179, 217, 0.5);
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-width: 80px;
}

.word-text {
    margin-right: 8px;
}

.word-points {
    font-size: 0.8em;
    opacity: 0.8;
    background: rgba(255, 255, 255, 0.2);
    padding: 2px 4px;
    border-radius: 4px;
}

/* Info Modal */
.info-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(5px);
}

.info-modal .modal-content {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(15px);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    color: white;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 30px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.modal-header h2 {
    margin: 0;
    color: #ffb3d9;
    text-shadow: 0 0 15px rgba(255, 179, 217, 0.8);
    font-size: 1.8em;
}

.close-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.5em;
    transition: all 0.3s ease;
}

.close-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.modal-body {
    padding: 30px;
}

.info-section {
    margin-bottom: 30px;
}

.info-section:last-child {
    margin-bottom: 0;
}

.info-section h3 {
    color: #ffb3d9;
    text-shadow: 0 0 10px rgba(255, 179, 217, 0.6);
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 1.3em;
}

.info-section ul {
    margin: 0;
    padding-left: 20px;
    list-style-type: none;
}

.info-section li {
    margin-bottom: 8px;
    line-height: 1.4;
    position: relative;
    padding-left: 10px;
}

.info-section li:before {
    content: "•";
    color: #ffb3d9;
    font-weight: bold;
    position: absolute;
    left: -10px;
}

/* High Score Modal */
.high-score-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    backdrop-filter: blur(5px);
}

.high-score-modal .modal-content {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(15px);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    color: white;
    max-width: 500px;
    width: 90%;
}

.high-score-modal .modal-header {
    padding: 20px 30px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    text-align: center;
}

.high-score-modal .modal-header h2 {
    margin: 0;
    color: #ffb3d9;
    text-shadow: 0 0 15px rgba(255, 179, 217, 0.8);
    font-size: 2em;
}

.congratulations {
    text-align: center;
    font-size: 1.2em;
    margin-bottom: 20px;
    color: #ffb3d9;
}

.score-display {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 20px;
    text-align: center;
    margin-bottom: 25px;
    border: 2px solid #ffb3d9;
}

.score-label {
    display: block;
    font-size: 1em;
    margin-bottom: 10px;
    opacity: 0.9;
}

.score-value {
    font-size: 3em;
    font-weight: bold;
    color: #ffb3d9;
    text-shadow: 0 0 20px rgba(255, 179, 217, 0.8);
}

.name-input-section {
    margin-bottom: 25px;
}

.name-input-section label {
    display: block;
    margin-bottom: 10px;
    font-weight: bold;
    color: #ffb3d9;
}

#player-name {
    width: 100%;
    padding: 12px;
    font-size: 1.1em;
    border: 2px solid rgba(255, 179, 217, 0.5);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    text-align: center;
    backdrop-filter: blur(10px);
}

#player-name:focus {
    outline: none;
    border-color: #ffb3d9;
    box-shadow: 0 0 10px rgba(255, 179, 217, 0.5);
}

.name-validation {
    margin-top: 5px;
    font-size: 0.9em;
    min-height: 20px;
}

.name-validation.error {
    color: #ff6b6b;
}

.name-validation.success {
    color: #4CAF50;
}

.submit-btn, .skip-btn {
    padding: 12px 24px;
    font-size: 1.1em;
    font-weight: bold;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin: 0 5px;
}

.submit-btn {
    background: linear-gradient(135deg, #4CAF50, #45a049);
    color: white;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(76, 175, 80, 0.4);
}

.submit-btn:disabled {
    background: rgba(255, 255, 255, 0.3);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.skip-btn {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.skip-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

/* Countdown Overlay */
.countdown-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    backdrop-filter: blur(5px);
}

.countdown-content {
    text-align: center;
    color: white;
}

.countdown-round-info {
    font-size: 2.5rem;
    font-weight: bold;
    color: #ffb3d9;
    text-shadow: 0 0 20px rgba(255, 179, 217, 0.8);
    margin-bottom: 20px;
    animation: cosmic-glow 2s ease-in-out infinite alternate;
}

.countdown-number {
    font-size: 8rem;
    font-weight: bold;
    color: white;
    text-shadow: 0 0 30px rgba(255, 255, 255, 0.8);
    margin: 30px 0;
    animation: countdown-pulse 1s ease-in-out;
}

.countdown-message {
    font-size: 1.5rem;
    color: #ffb3d9;
    font-style: italic;
    opacity: 0.9;
    text-shadow: 0 0 10px rgba(255, 179, 217, 0.6);
}

.start-game-btn {
    font-size: 1.8rem;
    font-weight: bold;
    padding: 20px 40px;
    margin-top: 30px;
    background: linear-gradient(135deg, #ffb3d9, #e94560);
    color: white;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 2px;
    box-shadow: 0 8px 25px rgba(233, 69, 96, 0.4);
    animation: start-button-glow 2s ease-in-out infinite alternate;
}

.start-game-btn:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 12px 30px rgba(233, 69, 96, 0.6);
    background: linear-gradient(135deg, #e94560, #ffb3d9);
}

@keyframes start-button-glow {
    0% {
        box-shadow: 0 8px 25px rgba(233, 69, 96, 0.4);
    }
    100% {
        box-shadow: 0 8px 25px rgba(255, 179, 217, 0.6);
    }
}

@keyframes countdown-pulse {
    0% {
        transform: scale(0.8);
        opacity: 0.5;
    }
    50% {
        transform: scale(1.2);
        opacity: 1;
        text-shadow: 0 0 40px rgba(255, 255, 255, 1);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Game Over Modal */
.game-over-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(15px);
    padding: 40px;
    border-radius: 20px;
    text-align: center;
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.modal-content h2 {
    margin-top: 0;
    font-size: 2em;
    color: #ffb3d9;
    text-shadow: 0 0 15px rgba(255, 179, 217, 0.8);
}

.final-stats {
    margin: 20px 0;
    font-size: 1.2em;
}

.final-stats p {
    margin: 10px 0;
}

.round-results {
    margin: 20px 0;
    padding: 15px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.round-result {
    display: flex;
    justify-content: space-between;
    margin: 8px 0;
    padding: 5px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.round-result:last-child {
    border-bottom: none;
}

.round-label {
    color: #ffb3d9;
    font-weight: bold;
}

.round-score {
    color: white;
    font-weight: bold;
}

.modal-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 30px;
}

.modal-buttons button {
    padding: 15px 30px;
    font-size: 1.1em;
}

/* Animation for new words */
.word-found-animation {
    animation: wordFound 0.5s ease-in-out;
}

@keyframes wordFound {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); background: rgba(255, 179, 217, 0.5); }
    100% { transform: scale(1); }
}

/* Animation for upgraded words */
.word-upgraded-animation {
    animation: wordUpgraded 0.5s ease-in-out;
}

@keyframes wordUpgraded {
    0% { transform: scale(1); background: rgba(255, 179, 217, 0.3); }
    50% { transform: scale(1.1); background: rgba(255, 215, 0, 0.6); border-color: #FFD700; }
    100% { transform: scale(1); background: rgba(255, 179, 217, 0.3); }
}

/* Timer warning colors */
.timer-warning {
    color: #ffb3d9 !important;
    animation: pulse 1s infinite;
}

.timer-danger {
    color: #e94560 !important;
    animation: pulse 0.5s infinite;
}

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

/* Responsive Design */
@media (max-width: 1024px) {
    .game-sidebar {
        grid-template-columns: 1fr;
        gap: 15px;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 15px;
    }

    .header h1 {
        font-size: 2.5rem;
    }

    .score-panel {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }

    .word-input-section {
        flex-direction: column;
        gap: 15px;
    }

    #word-input {
        width: 250px;
    }

    .game-buttons {
        flex-wrap: wrap;
        justify-content: center;
    }

    .bonus-indicator {
        font-size: 0.45em;
        min-width: 16px;
    }
}

@media (max-width: 480px) {
    .header h1 {
        font-size: 2em;
    }

    .bonus-indicator {
        font-size: 0.4em;
        min-width: 14px;
        padding: 1px;
    }

    #word-input {
        width: 200px;
    }
}