/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #0066cc;
    --primary-dark: #0052a3;
    --secondary-color: #00a8e8;
    --secondary-dark: #0087c1;
    --danger-color: #dc3545;
    --danger-dark: #c82333;
    --warning-color: #ffc107;
    --warning-dark: #e0a800;
    --dark-bg: #000000;
    --darker-bg: #0a0a0a;
    --light-bg: #1a1a1a;
    --text-light: #ffffff;
    --text-dark: #000000;
    --accent-blue: #0099ff;
    --border-radius: 12px;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.5);
    --shadow-blue: 0 0 20px rgba(0, 102, 204, 0.3);
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #000000 0%, #0a0a0a 50%, #001a33 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    color: var(--text-light);
}

.container {
    width: 100%;
    max-width: 1200px;
}

/* Header */
header {
    text-align: center;
    color: white;
    margin-bottom: 30px;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px;
}

.header-title {
    text-align: center;
    flex: 1;
}

.header-auth {
    position: absolute;
    right: 20px;
    top: 20px;
}

header h1 {
    font-size: 3em;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.subtitle {
    font-size: 1.2em;
    opacity: 0.9;
}

/* Screen Management */
.screen {
    display: none;
}

.screen.active {
    display: block;
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Cards */
.menu-card,
.lobby-card,
.game-container,
.setup-card,
.load-card {
    background: linear-gradient(145deg, #0a0a0a 0%, #1a1a1a 100%);
    border: 2px solid var(--primary-color);
    border-radius: var(--border-radius);
    padding: 40px;
    box-shadow: var(--shadow-lg), var(--shadow-blue);
}

.menu-card {
    max-width: 500px;
    margin: 0 auto;
}

.setup-card,
.load-card {
    max-width: 800px;
    margin: 0 auto;
}

.menu-card h2,
.setup-card h2,
.load-card h2 {
    font-size: 2em;
    margin-bottom: 10px;
    color: var(--text-light);
}

.menu-card > p {
    color: #b0b0b0;
    margin-bottom: 30px;
}

/* Buttons */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.btn:active {
    transform: translateY(0);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.btn-large {
    padding: 16px 32px;
    font-size: 1.1em;
    width: 100%;
}

.btn-small {
    padding: 8px 16px;
    font-size: 0.9em;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
}

.btn-secondary {
    background: var(--secondary-color);
    color: white;
}

.btn-secondary:hover {
    background: var(--secondary-dark);
}

.btn-success {
    background: #28a745;
    color: white;
}

.btn-success:hover {
    background: #218838;
}

.btn-danger {
    background: var(--danger-color);
    color: white;
}

.btn-danger:hover {
    background: var(--danger-dark);
}

.btn-warning {
    background: var(--warning-color);
    color: white;
}

.btn-warning:hover {
    background: var(--warning-dark);
}

.btn-icon {
    font-size: 1.2em;
}

/* Pulse Animation for Important Buttons */
.pulse {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* Input Fields */
input[type="text"] {
    width: 100%;
    padding: 14px;
    border: 2px solid var(--primary-color);
    background: #0a0a0a;
    color: var(--text-light);
    border-radius: 8px;
    font-size: 1em;
    margin-bottom: 15px;
    transition: all 0.3s ease;
}

input[type="text"]:focus {
    outline: none;
    border-color: var(--accent-blue);
    box-shadow: 0 0 10px rgba(0, 153, 255, 0.3);
    background: #1a1a1a;
}

input[type="text"]::placeholder {
    color: #666666;
}

/* Menu Layout */
.menu-buttons {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 100%);
    border: 2px solid var(--primary-color);
    border-radius: var(--border-radius);
    padding: 40px;
    max-width: 500px;
    width: 90%;
    box-shadow: var(--shadow-lg), var(--shadow-blue);
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-content h2 {
    color: var(--text-light);
    margin-bottom: 10px;
    text-align: center;
}

.modal-content p {
    color: #b0b0b0;
    margin-bottom: 30px;
    text-align: center;
}

.mode-selection {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 20px;
}

.mode-selection .btn small {
    display: block;
    font-size: 0.75em;
    font-weight: normal;
    opacity: 0.8;
    margin-top: 5px;
}

.divider {
    text-align: center;
    color: #666666;
    font-weight: 600;
    margin: 10px 0;
}

.join-section {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Room Code Display - Large (for setup screen) */
.room-code-display-large {
    background: linear-gradient(135deg, #000000 0%, #001a33 100%);
    border: 3px solid var(--accent-blue);
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 30px;
    text-align: center;
    box-shadow: 0 0 30px rgba(0, 153, 255, 0.4);
}

.room-code-display-large h3 {
    color: var(--text-light);
    margin-bottom: 15px;
    font-size: 1.3em;
}

.code-display {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 10px;
}

.code-large {
    font-size: 3em;
    font-weight: bold;
    color: var(--accent-blue);
    letter-spacing: 8px;
    font-family: 'Courier New', monospace;
    text-shadow: 0 0 15px rgba(0, 153, 255, 0.7);
}

.code-hint {
    color: #999999;
    font-size: 0.9em;
    font-style: italic;
}

/* Lobby Screen */
.room-info {
    text-align: center;
    margin-bottom: 30px;
}

.room-info h2 {
    font-size: 2em;
    color: var(--text-light);
    margin-bottom: 15px;
}

.room-code-display {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    background: #000000;
    border: 2px solid var(--primary-color);
    padding: 20px;
    border-radius: 8px;
    box-shadow: var(--shadow-blue);
}

.room-code-display .label {
    font-weight: 600;
    color: #b0b0b0;
}

.room-code-display .code {
    font-size: 2em;
    font-weight: bold;
    color: var(--accent-blue);
    letter-spacing: 4px;
    font-family: 'Courier New', monospace;
    text-shadow: 0 0 10px rgba(0, 153, 255, 0.5);
}

/* Players Section */
.players-section {
    margin-bottom: 30px;
}

.players-section h3 {
    font-size: 1.5em;
    margin-bottom: 15px;
    color: var(--text-light);
}

.players-list {
    background: #000000;
    border: 1px solid var(--primary-color);
    border-radius: 8px;
    padding: 15px;
    min-height: 100px;
    max-height: 200px;
    overflow-y: auto;
}

.player-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px;
    margin-bottom: 8px;
    background: #1a1a1a;
    border: 1px solid #333333;
    border-radius: 6px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.player-name {
    font-weight: 600;
    color: var(--text-light);
}

.host-badge {
    background: var(--primary-color);
    color: white;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.85em;
    font-weight: 600;
    box-shadow: 0 0 10px rgba(0, 102, 204, 0.5);
}

/* Host Controls */
.host-controls {
    margin-bottom: 20px;
}

.host-controls h3 {
    font-size: 1.5em;
    margin-bottom: 15px;
    color: var(--text-light);
}

.upload-section {
    margin-bottom: 20px;
}

.upload-label {
    display: inline-block;
    padding: 12px 24px;
    background: var(--primary-color);
    color: white;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 0 15px rgba(0, 102, 204, 0.4);
}

.upload-label:hover {
    background: var(--accent-blue);
    transform: translateY(-2px);
    box-shadow: 0 0 20px rgba(0, 153, 255, 0.6);
}

.upload-status {
    margin-top: 10px;
    font-weight: 600;
    color: var(--text-light);
}

.preview-section {
    margin: 20px 0;
    text-align: center;
}

.preview-section img {
    max-width: 100%;
    max-height: 300px;
    border-radius: 8px;
    box-shadow: var(--shadow);
}

/* Game Screen */
.game-container {
    position: relative;
}

.game-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--primary-color);
}

.game-status {
    font-size: 1.5em;
    font-weight: bold;
    color: var(--text-light);
}

.room-code-small {
    font-size: 1em;
    color: #b0b0b0;
    font-weight: 600;
}

.room-code-small span {
    color: var(--accent-blue);
    font-family: 'Courier New', monospace;
}

/* Canvas */
.canvas-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 30px;
    min-height: 400px;
    position: relative;
}

#game-canvas {
    border: 3px solid var(--primary-color);
    border-radius: 8px;
    box-shadow: var(--shadow-lg), var(--shadow-blue);
    max-width: 100%;
    height: auto;
}

.loading {
    position: absolute;
    background: rgba(0, 0, 0, 0.95);
    border: 2px solid var(--primary-color);
    padding: 20px 40px;
    border-radius: 8px;
    font-weight: 600;
    color: var(--text-light);
    box-shadow: var(--shadow-blue);
}

/* Game Controls */
.game-controls {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

#host-game-controls,
#player-game-controls {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    justify-content: center;
}

/* Results */
.results-section {
    margin-bottom: 30px;
}

.results-card {
    background: linear-gradient(145deg, #0a0a0a 0%, #001a33 100%);
    border: 2px solid var(--primary-color);
    padding: 30px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow), var(--shadow-blue);
}

.results-card h2 {
    text-align: center;
    font-size: 2em;
    margin-bottom: 20px;
    color: var(--text-light);
}

.winner-display {
    text-align: center;
    margin-bottom: 30px;
}

.winner h3 {
    font-size: 1.5em;
    color: var(--text-light);
    margin-bottom: 10px;
}

.winner-name {
    font-size: 2.5em;
    font-weight: bold;
    color: var(--accent-blue);
    padding: 20px;
    background: #000000;
    border: 2px solid var(--primary-color);
    border-radius: 8px;
    box-shadow: var(--shadow-blue);
    text-shadow: 0 0 15px rgba(0, 153, 255, 0.7);
}

.ranking-display h4 {
    font-size: 1.3em;
    margin-bottom: 15px;
    color: var(--text-light);
}

.ranking-list {
    background: #000000;
    border: 1px solid var(--primary-color);
    border-radius: 8px;
    padding: 20px 20px 20px 40px;
    box-shadow: var(--shadow);
}

.ranking-list li {
    display: flex;
    justify-content: space-between;
    padding: 12px;
    margin-bottom: 8px;
    border-bottom: 1px solid #333333;
    font-size: 1.1em;
}

.ranking-list li:last-child {
    border-bottom: none;
}

.rank-name {
    font-weight: 600;
    color: var(--text-light);
}

.rank-time {
    color: #b0b0b0;
    font-size: 0.9em;
}

/* Game Players Sidebar */
.game-players-list {
    background: #000000;
    border: 1px solid var(--primary-color);
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.game-players-list h4 {
    margin-bottom: 10px;
    color: var(--text-light);
}

.players-compact {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.player-compact {
    background: #1a1a1a;
    border: 1px solid var(--primary-color);
    padding: 6px 12px;
    border-radius: 16px;
    font-size: 0.9em;
    font-weight: 600;
    color: var(--text-light);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* Notifications */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: var(--dark-bg);
    color: white;
    padding: 16px 24px;
    border-radius: 8px;
    box-shadow: var(--shadow-lg);
    transform: translateX(400px);
    transition: transform 0.3s ease;
    z-index: 1000;
    max-width: 300px;
    font-weight: 600;
}

.notification.show {
    transform: translateX(0);
}

.notification.success {
    background: var(--secondary-color);
}

.notification.error {
    background: var(--danger-color);
}

.notification.info {
    background: var(--primary-color);
}

/* Responsive Design */
@media (max-width: 768px) {
    header h1 {
        font-size: 2em;
    }

    .subtitle {
        font-size: 1em;
    }

    .menu-card,
    .lobby-card,
    .game-container {
        padding: 20px;
    }

    .room-code-display .code {
        font-size: 1.5em;
        letter-spacing: 2px;
    }

    .game-header {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }

    .btn-large {
        font-size: 1em;
    }

    #game-canvas {
        max-width: 100%;
    }
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #0a0a0a;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-blue);
}

/* Game Setup Screen */
.setup-section {
    margin-bottom: 25px;
}

.setup-section label {
    display: block;
    font-weight: 600;
    color: var(--text-light);
    margin-bottom: 8px;
}

.setup-section h3 {
    font-size: 1.3em;
    color: var(--text-light);
    margin-bottom: 15px;
}

.rounds-list {
    background: #000000;
    border: 1px solid var(--primary-color);
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
    min-height: 150px;
    max-height: 400px;
    overflow-y: auto;
}

.round-item {
    background: #1a1a1a;
    border: 1px solid #333333;
    border-radius: 6px;
    padding: 15px;
    margin-bottom: 10px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.round-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.round-item-header input {
    flex: 1;
    margin-right: 10px;
}

.round-item-image {
    display: flex;
    gap: 10px;
    align-items: center;
}

.round-item-image .upload-label {
    font-size: 0.9em;
    padding: 8px 16px;
}

.round-image-status {
    color: #b0b0b0;
    font-size: 0.9em;
}

.setup-actions {
    display: flex;
    gap: 15px;
    margin-top: 30px;
    flex-wrap: wrap;
}

/* Load Game Screen */
.saved-games-list {
    background: #000000;
    border: 1px solid var(--primary-color);
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
    min-height: 300px;
    max-height: 500px;
    overflow-y: auto;
}

.saved-game-item {
    background: #1a1a1a;
    border: 1px solid #333333;
    border-radius: 6px;
    padding: 15px;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.saved-game-info h4 {
    color: var(--accent-blue);
    margin-bottom: 5px;
}

.saved-game-info p {
    color: #b0b0b0;
    font-size: 0.9em;
}

.saved-game-actions {
    display: flex;
    gap: 10px;
}

/* Lobby Rounds Section */
.rounds-section {
    margin-bottom: 30px;
}

.rounds-section h3 {
    font-size: 1.5em;
    margin-bottom: 15px;
    color: var(--text-light);
}

.lobby-rounds-list {
    background: #000000;
    border: 1px solid var(--primary-color);
    border-radius: 8px;
    padding: 15px;
    max-height: 200px;
    overflow-y: auto;
}

.lobby-round-item {
    background: #1a1a1a;
    border: 1px solid #333333;
    border-radius: 6px;
    padding: 10px;
    margin-bottom: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.lobby-round-item.active {
    border-color: var(--accent-blue);
    box-shadow: 0 0 10px rgba(0, 153, 255, 0.3);
}

.round-badge {
    background: var(--primary-color);
    color: white;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.85em;
    font-weight: 600;
}

.round-badge.ready {
    background: #28a745;
}

.round-badge.active {
    background: var(--accent-blue);
}

/* Auth Button Styles */
#auth-btn {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 100;
    min-width: 100px;
}

#auth-btn.logged-in {
    background: var(--accent-blue);
    border: 2px solid #00ccff;
    box-shadow: 0 0 15px rgba(0, 153, 255, 0.5);
}

#auth-btn.logged-in:hover {
    background: #0077cc;
    box-shadow: 0 0 20px rgba(0, 153, 255, 0.7);
}

/* Auth Modal Styles */
.auth-modal-content {
    max-width: 420px;
}

.auth-tabs {
    display: flex;
    margin-bottom: 25px;
    border-bottom: 2px solid #333;
}

.auth-tab {
    flex: 1;
    padding: 12px 20px;
    background: transparent;
    border: none;
    color: #888;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
}

.auth-tab:hover {
    color: var(--text-light);
}

.auth-tab.active {
    color: var(--accent-blue);
    border-bottom-color: var(--accent-blue);
}

.auth-form {
    display: none;
}

.auth-form.active {
    display: block;
    animation: fadeIn 0.3s ease-in;
}

.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    color: #b0b0b0;
    font-size: 0.9em;
    margin-bottom: 6px;
    font-weight: 600;
}

.form-group input {
    margin-bottom: 0;
}

/* User Menu Modal */
.user-menu-options {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 20px;
}

.user-menu-options .btn small {
    display: block;
    font-size: 0.75em;
    font-weight: normal;
    opacity: 0.8;
    margin-top: 3px;
}

/* Modal Large */
.modal-large {
    max-width: 700px;
}

/* Saved Games List Updates */
.saved-games-list {
    background: #000000;
    border: 1px solid var(--primary-color);
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
    min-height: 200px;
    max-height: 400px;
    overflow-y: auto;
}

.empty-message {
    color: #888;
    text-align: center;
    padding: 40px 20px;
    font-style: italic;
}

.saved-game-item {
    background: #1a1a1a;
    border: 1px solid #333333;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.2s ease;
}

.saved-game-item:hover {
    border-color: var(--primary-color);
    box-shadow: 0 0 10px rgba(0, 102, 204, 0.2);
}

.saved-game-item:last-child {
    margin-bottom: 0;
}

.saved-game-info h4 {
    color: var(--accent-blue);
    margin-bottom: 5px;
    font-size: 1.1em;
}

.saved-game-info p {
    color: #888;
    font-size: 0.85em;
    margin: 0;
    text-align: left;
}

.saved-game-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.saved-game-actions .btn-small {
    padding: 8px 12px;
}

/* Responsive adjustments for auth */
@media (max-width: 768px) {
    #auth-btn {
        top: 10px;
        right: 10px;
        min-width: 80px;
        font-size: 0.85em;
        padding: 8px 12px;
    }
    
    .auth-modal-content {
        padding: 25px;
    }
    
    .modal-large {
        max-width: 95%;
    }
    
    .saved-game-item {
        flex-direction: column;
        gap: 12px;
        align-items: stretch;
    }
    
    .saved-game-actions {
        justify-content: flex-end;
    }
}

/* ── Game Type Selector (Setup Screen) ────────────────────────────────────── */
.game-type-selector {
    display: flex;
    gap: 12px;
    margin-top: 4px;
}

.type-btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 14px 20px;
    background: #1a1a1a;
    border: 2px solid #333;
    border-radius: var(--border-radius);
    color: var(--text-light);
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.type-btn .btn-icon {
    font-size: 1.6em;
}

.type-btn:hover {
    border-color: var(--primary-color);
    background: #111;
}

.type-btn.active {
    border-color: var(--accent-blue);
    background: rgba(0, 102, 204, 0.2);
    box-shadow: 0 0 12px rgba(0, 153, 255, 0.3);
    color: #00ccff;
}

/* ── Word Game Display ────────────────────────────────────────────────────── */
.word-display-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 30px 20px;
    min-height: 200px;
    width: 100%;
}

.word-round-label {
    font-size: 1.1em;
    color: #aaa;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.word-tiles {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px 4px;
    max-width: 700px;
    margin: 0 auto;
}

.word-group {
    display: flex;
    gap: 6px;
}

.word-spacer {
    width: 24px;
}

.letter-tile {
    width: 42px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5em;
    font-weight: 700;
    border-bottom: 3px solid var(--accent-blue);
    border-radius: 4px 4px 0 0;
    background: #111;
    color: var(--text-light);
    text-transform: uppercase;
    transition: background 0.3s, color 0.3s;
    position: relative;
}

.letter-tile.revealed {
    background: rgba(0, 102, 204, 0.15);
    color: #00ccff;
    border-bottom-color: #00ccff;
    animation: letterPop 0.35s ease;
}

@keyframes letterPop {
    0%   { transform: scale(1.4); background: rgba(0, 204, 255, 0.4); }
    100% { transform: scale(1); background: rgba(0, 102, 204, 0.15); }
}

.word-progress {
    margin-top: 20px;
    font-size: 0.9em;
    color: #888;
    letter-spacing: 1px;
}
