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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: #0D0B1A;
    color: #E0D7FF;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

#app {
    max-width: 600px;
    width: 100%;
    text-align: center;
}

header {
    margin-bottom: 48px;
}

h1 {
    font-size: clamp(3rem, 10vw, 4.5rem);
    font-weight: 700;
    background: linear-gradient(135deg, #8B5CF6, #A78BFA);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.02em;
}

.subtitle {
    font-size: clamp(0.9rem, 2vw, 1.2rem);
    color: #7C6FA6;
    font-weight: 400;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    margin-top: -6px;
}

.coming-soon {
    background: #1E1A3A;
    border-radius: 24px;
    padding: 60px 30px;
    border: 1px solid #2D2648;
    box-shadow: 0 20px 60px rgba(139, 92, 246, 0.08);
}

.coming-soon p {
    font-size: clamp(1.2rem, 3vw, 1.8rem);
    font-weight: 600;
    color: #E0D7FF;
    margin-top: 24px;
}

.coming-soon small {
    display: block;
    margin-top: 8px;
    color: #5B4E7A;
    font-size: clamp(0.8rem, 1.5vw, 1rem);
}

.spinner {
    width: 48px;
    height: 48px;
    margin: 0 auto;
    border: 3px solid #2D2648;
    border-top-color: #8B5CF6;
    border-radius: 50%;
    animation: spin 0.9s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

footer {
    margin-top: 48px;
    color: #3D3560;
    font-size: 0.8rem;
    letter-spacing: 0.05em;
}

/* Адаптив для мобилок */
@media (max-width: 480px) {
    body {
        padding: 12px;
    }
    .coming-soon {
        padding: 40px 20px;
        border-radius: 16px;
    }
}


/* ===== АВТОРИЗАЦИЯ ===== */
.auth-container {
    background: #1E1A3A;
    border-radius: 24px;
    padding: 40px 30px;
    border: 1px solid #2D2648;
    max-width: 400px;
    margin: 0 auto;
}

.auth-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 30px;
    background: #0D0B1A;
    border-radius: 12px;
    padding: 4px;
}

.auth-tab {
    flex: 1;
    padding: 10px;
    border: none;
    background: transparent;
    color: #7C6FA6;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 0.9rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.auth-tab.active {
    background: #8B5CF6;
    color: white;
}

.auth-tab:hover:not(.active) {
    color: #E0D7FF;
}

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

.auth-form.active {
    display: flex;
}

.auth-form input {
    padding: 14px 16px;
    border-radius: 12px;
    border: 1px solid #2D2648;
    background: #0D0B1A;
    color: #E0D7FF;
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    transition: border-color 0.2s;
}

.auth-form input:focus {
    outline: none;
    border-color: #8B5CF6;
}

.auth-form input::placeholder {
    color: #4A3D6A;
}

.auth-form button {
    padding: 14px;
    border: none;
    border-radius: 12px;
    background: #8B5CF6;
    color: white;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s;
}

.auth-form button:hover {
    background: #7C3AED;
    transform: scale(1.02);
}

.auth-error {
    color: #F87171;
    font-size: 0.85rem;
    text-align: center;
    min-height: 20px;
}

/* ===== ЛОББИ ===== */
.lobby {
    max-width: 600px;
    margin: 0 auto;
}

.lobby.hidden {
    display: none;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 16px;
    background: #1E1A3A;
    padding: 16px 20px;
    border-radius: 16px;
    border: 1px solid #2D2648;
    margin-bottom: 24px;
}

.avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #8B5CF6;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.user-profile span {
    flex: 1;
    font-weight: 600;
    font-size: 1.1rem;
}

.logout-btn {
    padding: 8px 16px;
    border: 1px solid #4A3D6A;
    background: transparent;
    color: #7C6FA6;
    border-radius: 8px;
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
}

.logout-btn:hover {
    border-color: #F87171;
    color: #F87171;
}

.lobby-actions {
    display: flex;
    gap: 12px;
    margin-bottom: 32px;
}

.lobby-actions button {
    flex: 1;
    padding: 14px;
    border: none;
    border-radius: 12px;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s;
}

.primary-btn {
    background: #8B5CF6;
    color: white;
}

.primary-btn:hover {
    background: #7C3AED;
    transform: scale(1.02);
}

.secondary-btn {
    background: #1E1A3A;
    color: #E0D7FF;
    border: 1px solid #2D2648 !important;
}

.secondary-btn:hover {
    background: #2D2648;
}

.games-list {
    background: #1E1A3A;
    border-radius: 16px;
    padding: 20px;
    border: 1px solid #2D2648;
}

.games-list h3 {
    margin-bottom: 16px;
    color: #A78BFA;
}

.empty-message {
    color: #4A3D6A;
    text-align: center;
    padding: 20px 0;
}

/* Прячем заглушку при авторизации */
.coming-soon.hidden {
    display: none;
}