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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #0f0f1e 0%, #1a1a2e 100%);
    color: #e0e0e0;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.container {
    width: 100%;
    max-width: 900px;
    background: rgba(26, 26, 46, 0.8);
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

header {
    text-align: center;
    margin-bottom: 30px;
    border-bottom: 2px solid #4ecdc4;
    padding-bottom: 20px;
}

h1 {
    font-size: 48px;
    font-weight: 700;
    background: linear-gradient(135deg, #4ecdc4 0%, #ff6b6b 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 20px;
    letter-spacing: 2px;
}

.stats {
    display: flex;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 18px;
}

.stat-item .label {
    color: #95e1d3;
    font-weight: 600;
}

.stat-item .value {
    font-size: 24px;
    font-weight: 700;
    color: #ff6b6b;
    min-width: 40px;
    text-align: right;
}

main {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.game-wrapper {
    position: relative;
    display: flex;
    justify-content: center;
    margin: 20px 0;
}

#gameCanvas {
    border: 3px solid #4ecdc4;
    border-radius: 8px;
    background: #1a1a2e;
    display: block;
    max-width: 100%;
    height: auto;
    box-shadow: 0 0 20px rgba(78, 205, 196, 0.3);
    transition: box-shadow 0.3s ease;
}

#gameCanvas:hover {
    box-shadow: 0 0 30px rgba(78, 205, 196, 0.5);
}

.overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: none;
    justify-content: center;
    align-items: center;
    border-radius: 8px;
    z-index: 10;
}

.overlay.show {
    display: flex;
}

.modal {
    background: linear-gradient(135deg, #16213e 0%, #1a1a2e 100%);
    padding: 40px;
    border-radius: 12px;
    border: 2px solid #4ecdc4;
    text-align: center;
    box-shadow: 0 8px 32px rgba(78, 205, 196, 0.2);
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#modalTitle {
    font-size: 32px;
    margin-bottom: 15px;
    color: #4ecdc4;
    font-weight: 700;
}

#modalMessage {
    font-size: 18px;
    margin-bottom: 30px;
    color: #e0e0e0;
}

.btn {
    background: linear-gradient(135deg, #4ecdc4 0%, #45b7aa 100%);
    color: #1a1a2e;
    border: none;
    padding: 12px 40px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(78, 205, 196, 0.3);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(78, 205, 196, 0.5);
}

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

.controls {
    background: rgba(78, 205, 196, 0.1);
    border: 1px solid #4ecdc4;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
}

.controls p {
    font-size: 14px;
    color: #95e1d3;
    margin: 8px 0;
}

.controls strong {
    color: #4ecdc4;
    font-weight: 600;
}

/* Responsive design */
@media (max-width: 768px) {
    .container {
        padding: 20px;
        border-radius: 12px;
    }

    h1 {
        font-size: 36px;
    }

    .stats {
        gap: 20px;
    }

    .stat-item {
        font-size: 14px;
    }

    .stat-item .value {
        font-size: 18px;
    }

    #gameCanvas {
        max-width: 100%;
        height: auto;
    }

    .modal {
        padding: 30px;
    }

    #modalTitle {
        font-size: 24px;
    }

    #modalMessage {
        font-size: 16px;
    }
}

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

    h1 {
        font-size: 28px;
        margin-bottom: 15px;
    }

    .stats {
        flex-direction: column;
        gap: 12px;
    }

    .stat-item {
        justify-content: center;
        font-size: 12px;
    }

    .controls p {
        font-size: 12px;
    }

    .modal {
        padding: 20px;
        width: 90%;
    }

    #modalTitle {
        font-size: 20px;
        margin-bottom: 10px;
    }

    #modalMessage {
        font-size: 14px;
        margin-bottom: 20px;
    }

    .btn {
        padding: 10px 30px;
        font-size: 14px;
    }
}
