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

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

.game-container {
    text-align: center;
    background: rgba(255, 255, 255, 0.1);
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
}

h1 {
    color: #fff;
    font-size: 2.5rem;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.controls {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    margin-bottom: 20px;
}

.control-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.control-group label {
    color: #ccc;
    font-size: 0.9rem;
}

select {
    padding: 10px 15px;
    border-radius: 10px;
    border: none;
    background: #fff;
    font-size: 1rem;
    cursor: pointer;
    transition: transform 0.2s;
}

select:hover {
    transform: scale(1.05);
}

.skin-options {
    display: flex;
    gap: 10px;
}

.skin-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 3px solid transparent;
    cursor: pointer;
    transition: all 0.2s;
}

.skin-btn:hover {
    transform: scale(1.15);
}

.skin-btn.active {
    border-color: #fff;
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.5);
}

.start-btn {
    padding: 12px 30px;
    font-size: 1.1rem;
    background: linear-gradient(135deg, #22c55e, #16a34a);
    color: white;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: bold;
}

.start-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 20px rgba(34, 197, 94, 0.4);
}

#gameCanvas {
    display: block;
    margin: 0 auto 15px;
    border-radius: 10px;
    background: #1e293b;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.score-display {
    color: #fff;
    font-size: 1.5rem;
    margin-bottom: 10px;
}

.score-display span {
    color: #22c55e;
    font-weight: bold;
}

.instructions {
    color: #888;
    font-size: 0.85rem;
}

/* ── Auth overlay ── */
.auth-overlay {
    position: fixed;
    inset: 0;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100;
}

.auth-box {
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(12px);
    padding: 40px 35px;
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.4);
    text-align: center;
    min-width: 320px;
}

.auth-box h2 {
    color: #fff;
    font-size: 1.6rem;
    margin-bottom: 24px;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.auth-form input {
    padding: 12px 16px;
    border-radius: 10px;
    border: 2px solid rgba(255,255,255,0.15);
    background: rgba(255,255,255,0.08);
    color: #fff;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.2s;
}

.auth-form input::placeholder { color: #999; }
.auth-form input:focus { border-color: #22c55e; }

.auth-btn {
    padding: 12px;
    border-radius: 10px;
    border: none;
    background: linear-gradient(135deg, #22c55e, #16a34a);
    color: #fff;
    font-size: 1.05rem;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.2s;
}
.auth-btn:hover { transform: scale(1.03); }

.auth-toggle {
    color: #aaa;
    font-size: 0.85rem;
    margin-top: 4px;
    cursor: pointer;
}
.auth-toggle span { color: #60a5fa; text-decoration: underline; }

.auth-error {
    color: #f87171;
    font-size: 0.85rem;
    min-height: 20px;
}

/* ── Top bar ── */
.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.greeting {
    color: #60a5fa;
    font-size: 1rem;
    font-weight: bold;
}

.logout-btn {
    padding: 6px 16px;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.2);
    background: rgba(255,255,255,0.08);
    color: #ccc;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
}
.logout-btn:hover { background: rgba(255,255,255,0.18); color: #fff; }