* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: #0a0a0a;
    color: #e0e0e0;
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    overflow: hidden;
}

#app {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100vh;
}

#game-canvas {
    display: none;
    border: 2px solid #333;
    border-radius: 4px;
}

#screen-container {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 480px;
    min-height: 400px;
}

.screen {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    padding: 32px;
    width: 100%;
}

h1 {
    font-size: 2.5rem;
    color: #FF6F00;
    text-shadow: 0 0 20px rgba(255, 111, 0, 0.3);
}

.title-logo {
    border-radius: 50%;
    margin-bottom: 8px;
    filter: drop-shadow(0 0 12px rgba(255, 111, 0, 0.4));
}

h2 {
    font-size: 1.5rem;
    color: #FF8F00;
}

.subtitle {
    color: #888;
    font-size: 0.9rem;
    margin-bottom: 16px;
}

.btn {
    padding: 12px 32px;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.15s ease;
    width: 100%;
    max-width: 280px;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn:active {
    transform: translateY(0);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.btn-primary {
    background: #FF6F00;
    color: #fff;
    font-weight: bold;
}

.btn-primary:hover {
    background: #FF8F00;
}

.btn-secondary {
    background: #333;
    color: #e0e0e0;
}

.btn-secondary:hover {
    background: #444;
}

.btn-large {
    padding: 16px 40px;
    font-size: 1.2rem;
}

.btn-link {
    background: none;
    color: #888;
    padding: 8px;
    text-decoration: underline;
}

.btn-link:hover {
    color: #bbb;
}

/* Auth forms */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
    max-width: 280px;
}

.auth-form input {
    padding: 12px 16px;
    border: 1px solid #333;
    border-radius: 6px;
    background: #1a1a1a;
    color: #e0e0e0;
    font-size: 1rem;
}

.auth-form input:focus {
    outline: none;
    border-color: #FF6F00;
}

.error-msg {
    color: #ef5350;
    font-size: 0.85rem;
    min-height: 1.2em;
    text-align: center;
}

/* Leaderboard */
.lb-table {
    width: 100%;
    border-collapse: collapse;
    margin: 8px 0;
}

.lb-table th {
    text-align: left;
    padding: 8px 12px;
    border-bottom: 2px solid #FF6F00;
    color: #FF8F00;
    font-size: 0.85rem;
    text-transform: uppercase;
}

.lb-table td {
    padding: 8px 12px;
    border-bottom: 1px solid #222;
}

.lb-table tr:hover td {
    background: #1a1a1a;
}

.empty-msg {
    color: #666;
    font-style: italic;
}

/* Biome transition */
.transition-screen {
    text-align: center;
}

.element-info {
    font-size: 1.3rem;
    margin: 8px 0;
}

.hint {
    color: #666;
    font-size: 0.9rem;
}

/* Game over / Victory */
.gameover-screen.victory h1 {
    color: #FFD600;
    text-shadow: 0 0 30px rgba(255, 214, 0, 0.4);
}

.victory-text {
    font-size: 1.2rem;
    color: #FFD600;
}

.submit-status {
    color: #888;
    font-size: 0.9rem;
}

/* Leaderboard screen */
.leaderboard-screen {
    max-height: 80vh;
    overflow-y: auto;
}

/* Footer */
.site-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    text-align: center;
    padding: 8px 12px 6px;
    font-size: 0.7rem;
    color: #555;
    background: linear-gradient(transparent, rgba(10, 10, 10, 0.95));
    pointer-events: none;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.footer-tagline {
    color: #444;
    font-size: 0.65rem;
}

.footer-links {
    font-size: 0.7rem;
}

.site-footer a {
    color: #666;
    text-decoration: none;
    pointer-events: auto;
}

.site-footer a:hover {
    color: #FF8F00;
}

.footer-sep {
    margin: 0 4px;
}
