* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #0a0c12;
    padding: 20px;
    position: relative;
}

/* Градиентный фон */
.bg-gradient {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(145deg, #0f1119 0%, #07090e 100%);
    z-index: -2;
}

.bg-gradient::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 80% 20%, rgba(59, 130, 246, 0.08), transparent 70%);
    z-index: -1;
}

.container {
    width: 100%;
    max-width: 460px;
    margin: 0 auto;
}

/* Стеклянные карточки */
.glass-card {
    background: rgba(18, 22, 32, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(72, 85, 106, 0.4);
    border-radius: 32px;
    box-shadow: 0 25px 45px rgba(0, 0, 0, 0.3);
}

.screen {
    border-radius: 32px;
    padding: 32px 28px;
    text-align: center;
    display: none;
    animation: fadeSlide 0.35s ease-out;
    color: #edf2f7;
}

.screen.active {
    display: block;
}

@keyframes fadeSlide {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Типографика */
h1 {
    font-size: 28px;
    font-weight: 600;
    letter-spacing: -0.5px;
    margin-bottom: 12px;
    background: linear-gradient(135deg, #fff, #a5c9ff);
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
}

p, .subtitle {
    font-size: 14px;
    line-height: 1.5;
    color: #b9c7e3;
    margin-bottom: 20px;
}

.welcome-text {
    font-size: 15px;
    font-weight: 500;
    margin: 16px 0 20px;
    color: #cddcff;
}

.features {
    margin: 24px 0 28px;
    text-align: left;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 24px;
    padding: 8px 16px;
}

.feature {
    font-size: 13px;
    padding: 10px 0;
    color: #b4c4f0;
    border-bottom: 1px solid rgba(72, 85, 106, 0.3);
    display: flex;
    align-items: center;
    gap: 10px;
}

.feature:last-child {
    border-bottom: none;
}

.icon-logo {
    font-size: 52px;
    margin-bottom: 8px;
}

/* Кнопки */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 14px 20px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 48px;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    letter-spacing: 0.3px;
    gap: 8px;
}

.btn-primary {
    background: linear-gradient(105deg, #2563eb, #1e40af);
    color: white;
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.25);
}

.btn-primary:hover {
    transform: translateY(-2px);
    background: linear-gradient(105deg, #3b82f6, #1e3a8a);
    box-shadow: 0 12px 28px rgba(37, 99, 235, 0.35);
}

.btn-secondary {
    background: rgba(30, 41, 59, 0.9);
    color: white;
    border: 1px solid rgba(71, 85, 105, 0.6);
    margin-top: 12px;
}

.btn-secondary:hover {
    background: rgba(51, 65, 85, 0.95);
    transform: translateY(-1px);
}

/* Поля ввода */
.phone-input-group {
    display: flex;
    gap: 14px;
    margin: 24px 0 12px;
}

.input-field {
    text-align: left;
    width: 100%;
}

.input-field label {
    display: block;
    font-size: 12px;
    font-weight: 500;
    color: #9aa9c7;
    margin-bottom: 6px;
}

.input {
    width: 100%;
    padding: 14px 18px;
    font-size: 16px;
    background: rgba(10, 14, 23, 0.7);
    border: 1px solid rgba(75, 85, 99, 0.5);
    border-radius: 28px;
    color: white;
    transition: all 0.2s;
}

.input:focus {
    outline: none;
    border-color: #3b82f6;
    background: rgba(15, 22, 36, 0.9);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

.input::placeholder {
    color: #5e6a85;
}

.hint {
    font-size: 11px;
    color: #7a88aa;
    margin: 16px 0 20px;
}

/* Код подтверждения - ВАЖНО: сохранены классы для app.js */
.code-display {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin: 28px 0 32px;
    padding: 20px;
    background: rgba(10, 14, 23, 0.5);
    border-radius: 28px;
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.code-char {
    width: 54px;
    height: 68px;
    background: rgba(10, 14, 23, 0.7);
    border-radius: 20px;
    border: 1px solid rgba(59, 130, 246, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    font-weight: 600;
    color: white;
    backdrop-filter: blur(8px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Компактная клавиатура - ВАЖНО: сохранены классы "key" для app.js */
.keypad-compact {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin: 20px 0 18px;
}

.key {
    background: rgba(30, 36, 50, 0.85);
    border: 1px solid rgba(71, 85, 105, 0.5);
    border-radius: 48px;
    padding: 11px 0;
    font-size: 24px;
    font-weight: 500;
    color: #eef2ff;
    cursor: pointer;
    transition: 0.08s linear;
    backdrop-filter: blur(4px);
}

.key:active {
    transform: scale(0.95);
    background: rgba(59, 130, 246, 0.35);
}

.backspace {
    background: rgba(239, 68, 68, 0.18);
    font-size: 26px;
    color: #ffbbbb;
}

.phone-display {
    font-size: 17px;
    font-weight: 500;
    background: rgba(0, 0, 0, 0.35);
    padding: 8px 20px;
    border-radius: 60px;
    display: inline-block;
    margin: 8px auto 12px;
    letter-spacing: 0.3px;
    color: #bdd4ff;
}

.timer {
    font-size: 13px;
    color: #8d9bc0;
    margin: 8px 0 12px;
    font-weight: 400;
}

.tg-icon {
    font-size: 18px;
}

/* Экран успеха - ВАЖНО: сохранены классы для app.js */
.success-icon {
    font-size: 64px;
    color: #22c55e;
    margin-bottom: 20px;
}

.access-granted {
    color: #86efac;
    font-weight: 500;
    margin-top: 16px;
    font-size: 15px;
}

/* Спиннер загрузки */
.loading-spinner {
    width: 52px;
    height: 52px;
    border: 4px solid rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    border-top-color: #3b82f6;
    animation: spin 0.8s linear infinite;
    margin: 20px auto;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Адаптив */
@media (max-width: 520px) {
    .container {
        max-width: 98%;
    }
    .screen {
        padding: 28px 20px;
    }
    .code-char {
        width: 48px;
        height: 60px;
        font-size: 28px;
        border-radius: 18px;
    }
    .code-display {
        gap: 12px;
        padding: 16px;
    }
    .keypad-compact {
        gap: 10px;
    }
    .key {
        padding: 9px 0;
        font-size: 22px;
    }
    .phone-input-group {
        flex-direction: column;
        gap: 12px;
    }
    h1 {
        font-size: 24px;
    }
    .features {
        margin: 20px 0;
    }
}

#confirmBtn, #continueBtn, #telegramBtn {
    width: 100%;
}