/* Reset y estilos base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo h1 {
    font-size: 1.8rem;
    font-weight: 700;
    color: #667eea;
    margin-bottom: 0.2rem;
}

.logo .subtitle {
    font-size: 0.9rem;
    color: #666;
    font-weight: 500;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-info span {
    font-weight: 500;
    color: #333;
}

/* Botones */
.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.9rem;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

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

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

.btn-outline {
    background: transparent;
    color: #667eea;
    border: 2px solid #667eea;
}

.btn-outline:hover {
    background: #667eea;
    color: white;
}

/* Pantallas */
.screen {
    min-height: calc(100vh - 80px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 0;
}

/* Login Screen */
.login-card {
    background: white;
    padding: 3rem;
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    text-align: center;
    max-width: 400px;
    width: 100%;
}

.login-card h2 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    color: #333;
}

.login-card p {
    color: #666;
    margin-bottom: 2rem;
}

/* Formularios */
.form-group {
    margin-bottom: 1.5rem;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #333;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.2s ease;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #667eea;
}

/* Lobby Screen */
.lobby-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.lobby-header h2 {
    color: white;
    font-size: 2rem;
}

/* Login Screen */
.login-container {
    max-width: 500px;
    margin: 0 auto;
    padding: 3rem 2rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    text-align: center;
}

.login-header h1 {
    color: white;
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.login-header p {
    color: white;
    font-size: 1.1rem;
    opacity: 0.9;
    margin-bottom: 2rem;
}

/* Game Screen */
.game-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 12px;
    margin-bottom: 1rem;
}

.game-info h2 {
    color: white;
    margin: 0;
    font-size: 1.5rem;
}

.world-stats {
    color: white;
    opacity: 0.8;
    font-size: 0.9rem;
}

.player-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.player-stats {
    display: flex;
    gap: 1rem;
}

.stat {
    color: white;
    font-size: 0.9rem;
}

.stat strong {
    color: #FFD700;
}

/* Game Canvas */
.game-canvas-container {
    position: relative;
    background: #2c3e50;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 1rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

/* 3D Game Container */
.game-3d-container {
    position: relative;
    background: #87CEEB;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 1rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    height: calc(100vh - 300px);
    min-height: 500px;
}

#gameCanvas3D {
    display: block;
    width: 100%;
    height: 100%;
}

#gameCanvas {
    display: block;
    background: linear-gradient(45deg, #34495e 25%, transparent 25%), 
                linear-gradient(-45deg, #34495e 25%, transparent 25%), 
                linear-gradient(45deg, transparent 75%, #34495e 75%), 
                linear-gradient(-45deg, transparent 75%, #34495e 75%);
    background-size: 20px 20px;
    background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
}

.game-overlay {
    position: absolute;
    top: 20px;
    left: 20px;
    background: rgba(0, 0, 0, 0.7);
    padding: 1rem;
    border-radius: 8px;
    color: white;
}

.controls-info h4 {
    margin: 0 0 0.5rem 0;
    color: #FFD700;
}

.controls-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
}

.control-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
}

.key {
    background: #FFD700;
    color: #000;
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-weight: bold;
    font-size: 0.7rem;
}

/* Power-ups Status */
.powerups-status {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.powerup-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.1);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    color: white;
}

.powerup-icon {
    font-size: 1.2rem;
}

.powerup-text {
    font-size: 0.9rem;
}

.powerup-timer {
    background: rgba(255, 255, 255, 0.2);
    padding: 0.2rem 0.5rem;
    border-radius: 10px;
    font-size: 0.8rem;
    font-weight: bold;
}

/* Reset Timer */
.reset-timer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: rgba(255, 107, 107, 0.2);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    color: white;
    margin-bottom: 1rem;
}

.timer-label {
    font-size: 0.9rem;
}

.timer-value {
    background: rgba(255, 107, 107, 0.3);
    padding: 0.2rem 0.5rem;
    border-radius: 10px;
    font-weight: bold;
    font-size: 1rem;
}

.games-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
    visibility: visible !important;
    opacity: 1 !important;
}

.game-card {
    background: white;
    border-radius: 16px;
    padding: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 3px solid transparent;
    position: relative;
    overflow: hidden;
}

.game-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    border-color: #667eea;
}

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

.game-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.game-card:hover::before,
.game-card.selected::before {
    transform: scaleX(1);
}

.game-header {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
}

.game-icon {
    font-size: 2.5rem;
    margin-right: 1rem;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(102, 126, 234, 0.1);
    border-radius: 12px;
}

.game-title {
    font-size: 1.3rem;
    font-weight: 600;
    margin: 0;
    color: #333;
}

.game-card.selected .game-title {
    color: white;
}

.game-description {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 1rem;
    line-height: 1.4;
}

.game-card.selected .game-description {
    color: rgba(255, 255, 255, 0.9);
}

.game-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
}

.game-category {
    background: #f0f0f0;
    color: #666;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-weight: 500;
}

.game-card.selected .game-category {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

.game-stats {
    display: flex;
    gap: 1rem;
    color: #999;
}

.game-card.selected .game-stats {
    color: rgba(255, 255, 255, 0.8);
}

/* Rooms Section */
.rooms-section {
    margin-top: 2rem;
}

.rooms-section h3 {
    color: white;
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
}

.rooms-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.room-card {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: all 0.2s ease;
}

.room-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.15);
}

.room-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.room-game-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.room-game-icon {
    font-size: 2rem;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(102, 126, 234, 0.1);
    border-radius: 10px;
}

.room-game-info h3 {
    font-size: 1.2rem;
    margin: 0 0 0.25rem 0;
    color: #333;
}

.room-game-name {
    font-size: 0.9rem;
    color: #666;
    margin: 0;
}

.room-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.room-players {
    color: #666;
    font-size: 0.9rem;
}

.room-difficulty {
    background: #f0f0f0;
    color: #666;
    padding: 0.25rem 0.5rem;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 500;
}

.room-status {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.room-status.waiting {
    background: #e3f2fd;
    color: #1976d2;
}

.room-status.playing {
    background: #e8f5e8;
    color: #2e7d32;
}

.room-time {
    color: #999;
    font-size: 0.8rem;
    margin: 0;
}

/* Game Room Screen */
.room-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.room-header h2 {
    color: white;
    font-size: 2rem;
}

.room-content {
    display: grid;
    grid-template-columns: 1fr 2fr 1fr;
    gap: 2rem;
    background: white;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.players-section h3,
.game-section h3 {
    margin-bottom: 1rem;
    color: #333;
}

.players-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.player-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem;
    background: #f8f9fa;
    border-radius: 8px;
}

.player-name {
    font-weight: 500;
    color: #333;
}

.player-status {
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
}

.player-status.ready {
    background: #e8f5e8;
    color: #2e7d32;
}

.player-status.waiting {
    background: #fff3e0;
    color: #f57c00;
}

.waiting-area,
.game-area {
    text-align: center;
    padding: 2rem;
}

.waiting-area h3 {
    margin-bottom: 1rem;
    color: #333;
}

.waiting-area p {
    color: #666;
    margin-bottom: 1.5rem;
}

.game-board {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 2rem;
    min-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.modal-content {
    background: white;
    padding: 2rem;
    border-radius: 16px;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.modal-header h3 {
    font-size: 1.5rem;
    color: #333;
}

.close-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #666;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 2rem;
}

/* Game Info in Modal */
.game-info {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 1.5rem;
    margin: 1rem 0;
    border: 2px solid #e1e5e9;
}

.game-preview {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.game-preview .game-icon {
    font-size: 3rem;
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.game-details h4 {
    margin: 0 0 0.5rem 0;
    color: #333;
    font-size: 1.2rem;
}

.game-details p {
    margin: 0 0 1rem 0;
    color: #666;
    font-size: 0.9rem;
}

.game-stats {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.game-stats .stat {
    font-size: 0.85rem;
    color: #666;
}

.game-stats .stat strong {
    color: #333;
}

/* Loading */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #e1e5e9;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Toast */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 3000;
}

.toast {
    background: white;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    margin-bottom: 0.5rem;
    border-left: 4px solid #667eea;
    animation: slideIn 0.3s ease;
}

.toast.error {
    border-left-color: #e74c3c;
}

.toast.success {
    border-left-color: #27ae60;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Word Rush Game Styles */
.word-rush-game {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
}

.game-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding: 1rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    color: white;
}

.round-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.round-info span:first-child {
    font-size: 1.2rem;
    font-weight: 600;
}

.round-info span:last-child {
    font-size: 0.9rem;
    opacity: 0.8;
}

.timer-container {
    display: flex;
    align-items: center;
}

.timer-circle {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 3px solid rgba(255, 255, 255, 0.3);
    animation: pulse 1s infinite;
}

.timer-circle span {
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
}

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

.word-display {
    text-align: center;
    margin-bottom: 2rem;
}

.word-container {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%);
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 1rem;
    box-shadow: 0 10px 30px rgba(255, 107, 107, 0.3);
}

.word-text {
    font-size: 3rem;
    font-weight: 700;
    color: white;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    letter-spacing: 2px;
    animation: wordGlow 2s infinite alternate;
}

@keyframes wordGlow {
    0% { text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3); }
    100% { text-shadow: 2px 2px 20px rgba(255, 255, 255, 0.5); }
}

.word-hint {
    color: #666;
    font-size: 1rem;
    font-style: italic;
}

.answer-section {
    margin-bottom: 2rem;
}

.input-container {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.input-container input {
    flex: 1;
    padding: 1rem;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 1.2rem;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.2s ease;
}

.input-container input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.input-container input:disabled {
    background: #f8f9fa;
    color: #666;
}

.answer-status {
    text-align: center;
    font-weight: 600;
    min-height: 1.5rem;
}

.answer-status.correct {
    color: #27ae60;
    animation: correctPulse 0.5s ease;
}

.answer-status.incorrect {
    color: #e74c3c;
    animation: shake 0.5s ease;
}

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

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

.round-results {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.round-results h4 {
    margin-bottom: 1rem;
    color: #333;
    text-align: center;
}

.results-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.result-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.result-item.correct {
    border-left: 4px solid #27ae60;
}

.result-item.incorrect {
    border-left: 4px solid #e74c3c;
}

.game-over {
    text-align: center;
    padding: 2rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 16px;
    color: white;
}

.game-over h3 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
}

.final-leaderboard {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    backdrop-filter: blur(10px);
}

.leaderboard-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
}

.leaderboard-item:first-child {
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
    color: #333;
    font-weight: 600;
}

.leaderboard-item:nth-child(2) {
    background: linear-gradient(135deg, #c0c0c0 0%, #e8e8e8 100%);
    color: #333;
}

.leaderboard-item:nth-child(3) {
    background: linear-gradient(135deg, #cd7f32 0%, #daa520 100%);
    color: white;
}

/* Chat Styles */
.chat-section {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 1rem;
    height: 500px;
    display: flex;
    flex-direction: column;
}

.chat-header {
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #e1e5e9;
}

.chat-header h4 {
    margin: 0;
    color: #333;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    margin-bottom: 1rem;
    padding: 0.5rem;
    background: white;
    border-radius: 8px;
    border: 1px solid #e1e5e9;
}

.chat-message {
    margin-bottom: 0.75rem;
    padding: 0.5rem;
    border-radius: 8px;
    background: #f8f9fa;
}

.chat-message.own-message {
    background: #667eea;
    color: white;
    margin-left: 2rem;
}

.chat-message .message-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.25rem;
}

.chat-message .player-name {
    font-weight: 600;
    font-size: 0.9rem;
}

.chat-message .message-time {
    font-size: 0.8rem;
    opacity: 0.7;
}

.chat-message .message-text {
    font-size: 0.9rem;
}

.chat-input {
    display: flex;
    gap: 0.5rem;
}

.chat-input input {
    flex: 1;
    padding: 0.75rem;
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    font-size: 0.9rem;
}

.chat-input button {
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 768px) {
    .room-content {
        grid-template-columns: 1fr;
    }
    
    .lobby-header {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }
    
    .room-header {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }
    
    .rooms-grid {
        grid-template-columns: 1fr;
    }
    
    .modal-actions {
        flex-direction: column;
    }
    
    .word-text {
        font-size: 2rem;
    }
    
    .timer-circle {
        width: 60px;
        height: 60px;
    }
    
    .timer-circle span {
        font-size: 1.2rem;
    }
    
    .input-container {
        flex-direction: column;
    }
    
    .chat-section {
        height: 300px;
    }
}

/* Mario Kart Game Styles */
.mario-kart-game {
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
}

.game-canvas-container {
    position: relative;
    background: #2c3e50;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 1rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

#gameCanvas {
    display: block;
    background: linear-gradient(45deg, #34495e 25%, transparent 25%), 
                linear-gradient(-45deg, #34495e 25%, transparent 25%), 
                linear-gradient(45deg, transparent 75%, #34495e 75%), 
                linear-gradient(-45deg, transparent 75%, #34495e 75%);
    background-size: 20px 20px;
    background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
}

.game-overlay {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 1rem;
    border-radius: 8px;
    backdrop-filter: blur(10px);
}

.controls-info h4 {
    margin: 0 0 0.5rem 0;
    font-size: 0.9rem;
}

.controls-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
}

.control-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
}

.key {
    background: #667eea;
    color: white;
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-weight: 600;
    min-width: 2rem;
    text-align: center;
}

.game-stats {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 1rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.stat-item {
    text-align: center;
    padding: 0.5rem;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.stat-label {
    display: block;
    font-size: 0.8rem;
    color: #666;
    margin-bottom: 0.25rem;
}

.stat-value {
    display: block;
    font-size: 1.2rem;
    font-weight: 600;
    color: #333;
}

.powerups-status {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.powerup-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.9rem;
    animation: powerupGlow 2s infinite alternate;
}

@keyframes powerupGlow {
    0% { box-shadow: 0 0 5px rgba(102, 126, 234, 0.5); }
    100% { box-shadow: 0 0 20px rgba(102, 126, 234, 0.8); }
}

.powerup-icon {
    font-size: 1.2rem;
}

.powerup-timer {
    background: rgba(255, 255, 255, 0.2);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-weight: 600;
}

.winner-info {
    text-align: center;
    margin-bottom: 1rem;
}

.winner-text {
    font-size: 1.5rem;
    font-weight: 600;
    color: #ffd700;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

/* Responsive para Mario Kart */
@media (max-width: 768px) {
    .game-canvas-container {
        margin: 0 -1rem;
        border-radius: 0;
    }
    
    #gameCanvas {
        width: 100%;
        height: auto;
    }
    
    .game-overlay {
        position: static;
        margin: 1rem;
        background: rgba(0, 0, 0, 0.9);
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .powerups-status {
        flex-direction: column;
    }
}