/**
 * Type Racer - Game Styles
 * Falling-word typing arcade game
 */

/* ==================== FULL-SCREEN CONTAINER ==================== */
html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: #060812;
}

#game-container {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #060812;
}

#game-canvas {
    display: block;
    image-rendering: auto;
}

/* ==================== MENU OVERLAY ==================== */
.tr-menu {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(6, 8, 18, 0.92);
    z-index: 100;
    backdrop-filter: blur(8px);
}

.tr-menu-content {
    text-align: center;
    padding: 40px 50px;
    background: rgba(15, 26, 58, 0.85);
    border: 1px solid rgba(111, 66, 193, 0.3);
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
    max-width: 420px;
    width: 90%;
}

.tr-menu h1 {
    font-family: 'Segoe UI', Tahoma, sans-serif;
    font-size: 2.6rem;
    font-weight: 800;
    margin: 0 0 8px 0;
    background: linear-gradient(135deg, #20c997, #6f42c1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 1px;
}

.tr-subtitle {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.95rem;
    margin-bottom: 28px;
}

.tr-controls-info {
    text-align: left;
    background: rgba(0, 0, 0, 0.25);
    border-radius: 8px;
    padding: 14px 18px;
    margin-bottom: 24px;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.65);
    line-height: 1.6;
}

.tr-controls-info strong {
    color: #20c997;
}

.tr-btn {
    display: block;
    width: 100%;
    padding: 14px 28px;
    font-size: 1.05rem;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(135deg, #6f42c1, #8b5cf6);
    border: 2px solid rgba(111, 66, 193, 0.5);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.25s ease;
    margin-bottom: 10px;
    font-family: 'Segoe UI', Tahoma, sans-serif;
}

.tr-btn:hover {
    background: linear-gradient(135deg, #8b5cf6, #6f42c1);
    border-color: #8b5cf6;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(111, 66, 193, 0.4);
}

.tr-btn:active {
    transform: translateY(0);
}

.tr-btn-green {
    background: linear-gradient(135deg, #20c997, #10b981);
    border-color: rgba(32, 201, 151, 0.5);
}

.tr-btn-green:hover {
    background: linear-gradient(135deg, #10b981, #20c997);
    border-color: #10b981;
    box-shadow: 0 6px 20px rgba(32, 201, 151, 0.4);
}

/* ==================== GAME OVER OVERLAY ==================== */
.tr-gameover {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(6, 8, 18, 0.92);
    z-index: 100;
    backdrop-filter: blur(8px);
}

.tr-gameover-content {
    text-align: center;
    padding: 36px 45px;
    background: rgba(15, 26, 58, 0.85);
    border: 1px solid rgba(111, 66, 193, 0.3);
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
    max-width: 440px;
    width: 90%;
}

.tr-gameover h2 {
    font-family: 'Segoe UI', Tahoma, sans-serif;
    font-size: 2rem;
    font-weight: 800;
    margin: 0 0 6px 0;
    background: linear-gradient(135deg, #e94560, #f43f5e);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.tr-final-score {
    font-size: 2.8rem;
    font-weight: 800;
    color: #20c997;
    margin: 12px 0 18px;
    font-family: 'Segoe UI', Tahoma, sans-serif;
}

.tr-stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 24px;
}

.tr-stat-item {
    background: rgba(0, 0, 0, 0.25);
    border-radius: 8px;
    padding: 10px 8px;
}

.tr-stat-item .value {
    font-size: 1.3rem;
    font-weight: 700;
    color: #8b5cf6;
}

.tr-stat-item .label {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.5);
    margin-top: 2px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 600px) {
    .tr-menu-content,
    .tr-gameover-content {
        padding: 24px 20px;
    }

    .tr-menu h1 {
        font-size: 2rem;
    }

    .tr-controls-info {
        font-size: 0.78rem;
    }
}
