:root {
    --bg-color: #0b0b0e;
    --text-white: #ffffff;
    --text-gray: #a8a8b8;
    --btn-bg: #1c1065;
    --btn-hover: #291a85;
    --gradient-start: #4facfe;
    --gradient-end: #9f3fed;
}

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

html, body {
    width: 100%;
    min-height: 100vh;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-white);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

/* ===== ФОНОВЫЕ СВЕЧЕНИЯ ===== */
.glow-bg {
    position: fixed;
    border-radius: 50%;
    filter: blur(120px);
    z-index: 0;
    pointer-events: none;
    animation: pulseGlow 8s infinite alternate;
}

.glow-1 {
    top: -150px;
    right: -150px;
    width: 500px;
    height: 500px;
    background: rgba(79, 172, 254, 0.3);
}

.glow-2 {
    bottom: -150px;
    left: 10%;
    width: 400px;
    height: 400px;
    background: rgba(159, 63, 237, 0.25);
    animation-delay: -4s;
}

@keyframes pulseGlow {
    0%   { transform: scale(1);   opacity: 0.3; }
    100% { transform: scale(1.1); opacity: 0.5; }
}

/* ===== ШАПКА ===== */
.header {
    width: 100%;
    padding: 1.5rem 3rem;
    position: relative;
    z-index: 10;
    text-align: center;
}

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    background: linear-gradient(90deg, var(--gradient-start), var(--gradient-end));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ===== КОНТЕЙНЕР ===== */
.container {
    width: 100%;
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 3rem 3rem;
    position: relative;
    z-index: 1;
}

/* ===== HERO СЕКЦИЯ ===== */
.hero-section {
    display: flex;
    align-items: center;
    gap: 4rem;
}

.hero-content {
    flex: 1 1 55%;
    min-width: 0;
}

.hero-image-wrapper {
    flex: 1 1 45%;
    min-width: 0;
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-image {
    width: 100%;
    max-width: 500px;
    height: auto;
    border-radius: 24px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5), 0 0 60px rgba(79,172,254,0.1);
    animation: float 6s ease-in-out infinite;
}

/* ===== ТИПОГРАФИКА ===== */
.hero-title {
    font-size: clamp(2.2rem, 5vw, 4.5rem);
    line-height: 1.1;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 1.2rem;
}

.gradient-text {
    background: linear-gradient(90deg, var(--gradient-start), var(--gradient-end));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: clamp(1rem, 2vw, 1.4rem);
    color: var(--text-gray);
    line-height: 1.5;
    margin-bottom: 2.5rem;
}

/* ===== КНОПКИ ===== */
.download-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.button-row {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    padding: 0.9rem 1.6rem;
    border-radius: 14px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    color: var(--text-white);
    background-color: var(--btn-bg);
    border: 1px solid rgba(255,255,255,0.06);
    cursor: pointer;
    transition: all 0.25s ease;
    will-change: transform;
}

.btn:hover {
    background-color: var(--btn-hover);
    border-color: rgba(255,255,255,0.15);
    box-shadow: 0 8px 24px rgba(28,16,101,0.5);
}

.btn i {
    font-size: 1.1rem;
}

/* Кнопка авторизации — яркий градиент */
.btn-login-primary {
    background: linear-gradient(90deg, var(--gradient-start), var(--gradient-end));
    border: none;
    width: 100%;
    font-size: 1.1rem;
    padding: 1rem 2rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-login-primary:hover {
    background: linear-gradient(90deg, #5fb4ff, #b05bff);
    box-shadow: 0 8px 28px rgba(159,63,237,0.4);
}

.btn-icon {
    padding: 0.9rem;
    aspect-ratio: 1;
    width: auto;
}

/* ===== АНИМАЦИИ ===== */
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-12px); }
}

.animate-slide-up {
    opacity: 0;
    animation: fadeInUp 0.7s ease-out forwards;
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ===== АДАПТИВНОСТЬ ===== */

/* Планшеты */
@media (max-width: 1024px) {
    .hero-section {
        gap: 2rem;
    }
}

/* Маленькие планшеты / большие телефоны */
@media (max-width: 768px) {
    .header {
        padding: 1.2rem 1.5rem;
    }

    .container {
        padding: 0 1.5rem 2rem;
    }

    .hero-section {
        flex-direction: column;
        gap: 2rem;
    }

    .hero-content {
        flex: none;
        width: 100%;
    }

    .hero-image-wrapper {
        flex: none;
        width: 100%;
    }

    .hero-image {
        max-width: 350px;
    }
}

/* Телефоны */
@media (max-width: 480px) {
    .header {
        padding: 1rem;
    }

    .container {
        padding: 0 1rem 1.5rem;
    }

    .hero-subtitle br {
        display: none;
    }

    .button-row {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }

    .btn-icon {
        display: none;
    }

    .hero-image {
        max-width: 280px;
    }
}

/* ===== МОДАЛЬНОЕ ОКНО ===== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.35s ease, visibility 0.35s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-card {
    position: relative;
    width: 100%;
    max-width: 420px;
    background: rgba(20, 15, 40, 0.85);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    padding: 2.5rem 2rem;
    box-shadow:
        0 24px 80px rgba(0, 0, 0, 0.5),
        0 0 60px rgba(79, 172, 254, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.06);
    transform: translateY(30px) scale(0.95);
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal-overlay.active .modal-card {
    transform: translateY(0) scale(1);
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--text-gray);
    font-size: 1.4rem;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    line-height: 1;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.12);
    color: var(--text-white);
}

/* Шаги модального окна */
.modal-step {
    display: none;
    flex-direction: column;
    align-items: center;
    text-align: center;
    animation: modalStepIn 0.4s ease-out;
}

.modal-step.active {
    display: flex;
}

@keyframes modalStepIn {
    from { opacity: 0; transform: translateX(20px); }
    to   { opacity: 1; transform: translateX(0); }
}

.modal-icon {
    width: 64px;
    height: 64px;
    border-radius: 18px;
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: #fff;
    margin-bottom: 1.5rem;
    box-shadow: 0 8px 24px rgba(79, 172, 254, 0.3);
}

.modal-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-white);
    margin-bottom: 0.5rem;
}

.modal-desc {
    font-size: 0.95rem;
    color: var(--text-gray);
    line-height: 1.5;
    margin-bottom: 1.5rem;
    max-width: 320px;
}

.modal-desc span {
    color: var(--text-white);
    font-weight: 600;
}

/* Поле ввода номера */
.input-wrapper {
    position: relative;
    width: 100%;
    margin-bottom: 0.25rem;
}

.input-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-gray);
    font-size: 0.95rem;
    pointer-events: none;
    transition: color 0.2s ease;
}

.modal-input {
    width: 100%;
    padding: 1rem 1rem 1rem 2.8rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    color: var(--text-white);
    font-family: 'Inter', sans-serif;
    font-size: 1.1rem;
    font-weight: 500;
    letter-spacing: 0.5px;
    outline: none;
    transition: all 0.25s ease;
}

.modal-input::placeholder {
    color: rgba(168, 168, 184, 0.5);
}

.modal-input:focus {
    border-color: var(--gradient-start);
    background: rgba(79, 172, 254, 0.06);
    box-shadow: 0 0 0 3px rgba(79, 172, 254, 0.15);
}

.modal-input:focus ~ .input-icon {
    color: var(--gradient-start);
}

/* Ошибка */
.modal-error {
    color: #ff5c5c;
    font-size: 0.85rem;
    min-height: 1.4rem;
    margin-bottom: 0.5rem;
    transition: opacity 0.2s ease;
}

/* Ячейки кода */
.code-inputs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.25rem;
    justify-content: center;
}

.code-cell {
    width: 48px;
    height: 56px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: var(--text-white);
    font-family: 'Inter', sans-serif;
    font-size: 1.4rem;
    font-weight: 700;
    text-align: center;
    outline: none;
    transition: all 0.25s ease;
    caret-color: var(--gradient-start);
}

.code-cell:focus {
    border-color: var(--gradient-start);
    background: rgba(79, 172, 254, 0.06);
    box-shadow: 0 0 0 3px rgba(79, 172, 254, 0.15);
    transform: translateY(-2px);
}

.code-cell.filled {
    border-color: rgba(79, 172, 254, 0.4);
    background: rgba(79, 172, 254, 0.08);
}

/* Кнопка модального окна */
.modal-btn {
    width: 100%;
    padding: 1rem 1.5rem;
    background: linear-gradient(90deg, var(--gradient-start), var(--gradient-end));
    border: none;
    border-radius: 14px;
    color: var(--text-white);
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.modal-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(255,255,255,0.15), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-btn:hover:not(:disabled)::before {
    opacity: 1;
}

.modal-btn:hover:not(:disabled) {
    box-shadow: 0 8px 28px rgba(159, 63, 237, 0.4);
    transform: translateY(-1px);
}

.modal-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.modal-btn:active:not(:disabled) {
    transform: translateY(0) scale(0.98);
}

/* Ссылка "Изменить номер" */
.modal-link {
    background: none;
    border: none;
    color: var(--text-gray);
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    cursor: pointer;
    margin-top: 1rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    transition: color 0.2s ease;
}

.modal-link:hover {
    color: var(--gradient-start);
}

/* Спиннер загрузки */
.modal-btn.loading .modal-btn-text {
    opacity: 0;
}

.modal-btn.loading::after {
    content: '';
    position: absolute;
    width: 22px;
    height: 22px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

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

/* ===== МОДАЛЬНОЕ ОКНО — АДАПТИВНОСТЬ ===== */
@media (max-width: 480px) {
    .modal-card {
        padding: 2rem 1.5rem;
        border-radius: 20px;
    }

    .code-cell {
        width: 42px;
        height: 50px;
        font-size: 1.2rem;
    }

    .code-inputs {
        gap: 0.35rem;
    }

    .modal-title {
        font-size: 1.3rem;
    }
}

/* ===== УТИЛИТЫ ===== */
.hidden {
    display: none !important;
}

/* ===== ТЕРМИНАЛ — ПОЛНОЭКРАННАЯ СИМУЛЯЦИЯ ===== */
.terminal-fullscreen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: #020711;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    box-sizing: border-box;
}

.hack-wrapper {
    width: 100%;
    max-width: 900px;
    height: 80vh;
    display: flex;
    flex-direction: column;
    background: #050b14;
    border: 1px solid #1e293b;
    border-radius: 12px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    font-family: 'Courier New', Courier, monospace;
    overflow: hidden;
}

#hack-header {
    background: #0f172a;
    padding: 12px 20px;
    color: #94a3b8;
    font-size: 14px;
    border-bottom: 1px solid #1e293b;
    display: flex;
    align-items: center;
    gap: 10px;
}

.pulse-dot {
    width: 8px;
    height: 8px;
    background: #ff4d4d;
    border-radius: 50%;
    animation: termPulse 1s infinite;
}

@keyframes termPulse {
    0%   { transform: scale(1);   opacity: 1; }
    50%  { transform: scale(1.2); opacity: 0.5; }
    100% { transform: scale(1);   opacity: 1; }
}

#code-area {
    flex-grow: 1;
    padding: 20px;
    overflow-y: auto;
    font-size: 14px;
    line-height: 1.6;
    color: #c9d1d9;
    text-align: left;
}

.log-system  { color: #7ef5c7; }
.log-process { color: #a5b4fc; }
.log-success { color: #4ade80; }
.log-detail  { color: #10b981; padding-left: 15px; }
.log-done    { color: #34d399; font-weight: bold; }

/* ===== ПОЛНОЭКРАННОЕ ПРЕДУПРЕЖДЕНИЕ ===== */
.warning-fullscreen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: #0b0f19;
    z-index: 10001;
    overflow-y: auto;
    padding: 24px 16px;
    box-sizing: border-box;
    color: #f8fafc;
    display: flex;
    align-items: center;
    justify-content: center;
}

.warning-card {
    background: #111827;
    border: 2px solid #ef4444;
    border-radius: 24px;
    padding: 48px 40px;
    max-width: 650px;
    width: 100%;
    box-shadow: 0 0 50px rgba(239, 68, 68, 0.15);
    text-align: center;
    box-sizing: border-box;
}

.warning-icon-wrap {
    width: 80px;
    height: 80px;
    background: rgba(239, 68, 68, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
}

.warning-icon-wrap svg {
    width: 40px;
    height: 40px;
    stroke: #ef4444;
}

.warning-title {
    color: #ef4444;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 20px;
}

.warning-message {
    background: rgba(239, 68, 68, 0.1);
    border: 1.5px solid rgba(239, 68, 68, 0.3);
    border-radius: 16px;
    padding: 20px;
    text-align: center;
    color: #fca5a5;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.5;
    text-transform: uppercase;
}

@media (max-width: 640px) {
    .warning-card {
        padding: 32px 18px;
        border-radius: 16px;
    }
}
