* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
}

body {
    background-color: #000000; /* Pure black */
    color: #f3f4f6;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow-y: auto;
    padding: 1rem;
}

.game-container {
    background: #000000; /* Pure black */
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    padding: 1.5rem;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8);
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 440px;
    width: 100%;
}

header {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.2rem;
}

h1 {
    font-size: 1.6rem;
    font-weight: 800;
    letter-spacing: 2px;
    background: linear-gradient(135deg, #6366f1, #a855f7);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.scoreboard {
    display: flex;
    gap: 0.8rem;
}

.score-box {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 0.4rem 0.8rem;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 600;
    color: #9ca3af;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.score-box span {
    font-size: 1.1rem;
    color: #ffffff;
    font-weight: 800;
}

.board-container {
    position: relative;
    width: 100%;
    max-width: 380px;
    aspect-ratio: 1 / 1;
    border-radius: 12px;
    overflow: hidden;
    border: 2px solid rgba(99, 102, 241, 0.3);
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.15);
}

#gameCanvas {
    background: #000000;
    display: block;
    width: 100%;
    height: 100%;
}

.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    z-index: 10;
}

.overlay h2 {
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: 1px;
}

.overlay p {
    color: #9ca3af;
    font-size: 0.85rem;
    text-align: center;
}

.game-over-title {
    background: linear-gradient(135deg, #ef4444, #f43f5e);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.btn {
    padding: 0.7rem 1.8rem;
    border: none;
    border-radius: 50px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    background: linear-gradient(135deg, #6366f1, #a855f7);
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.6);
}

.hidden {
    display: none !important;
}

.mobile-controls {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 1.2rem;
    gap: 8px;
    user-select: none;
    width: 100%;
}

.middle-row {
    display: flex;
    gap: 40px;
    align-items: center;
}

.control-btn {
    width: 54px;
    height: 54px;
    border-radius: 50%;
    border: 2px solid rgba(99, 102, 241, 0.4);
    background: rgba(255, 255, 255, 0.02);
    color: #ffffff;
    font-size: 1.3rem;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: background 0.1s, transform 0.1s, box-shadow 0.1s;
    touch-action: manipulation;
    box-shadow: 0 0 10px rgba(99, 102, 241, 0.1);
}

.control-btn:active {
    background: rgba(99, 102, 241, 0.3);
    transform: scale(0.9);
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.6);
    border-color: #6366f1;
}

.controls-info {
    margin-top: 1rem;
    font-size: 0.8rem;
    color: #4b5563;
    text-align: center;
}
