/* ============================= */
/* THEME VARIABLES */
/* ============================= */

:root {
    --bg: #0b0f0d;
    --card: #111714;
    --text: #f5f5f5;
    --green: #22c55e;
    --green-dark: #15803d;
    --border: #1f2a25;
}

/* ============================= */
/* LAYOUT */
/* ============================= */

body {
    background: var(--bg);
    color: var(--text);
    font-family: 'Segoe UI', sans-serif;
    transition: background 0.3s ease, color 0.3s ease;
}

.iron-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 20px;
}

.iron-card {
    width: 100%;
    max-width: 420px;
    background: var(--card);
    padding: 40px;
    border-radius: 16px;
    border: 1px solid var(--border);
    box-shadow: 0 0 40px rgba(34, 197, 94, 0.08);

    transition:
        max-height 0.35s ease,
        box-shadow 0.3s ease,
        transform 0.3s ease;
}

/* ============================= */
/* LOGO */
/* ============================= */

.iron-logo {
    text-align: center;
    margin-bottom: 30px;
}

.iron-title {
    font-size: 32px;
    font-weight: 700;
    letter-spacing: 4px;
}

.iron-sub {
    display: block;
    font-size: 14px;
    letter-spacing: 6px;
    color: var(--green);
    margin-top: 4px;
}

/* ============================= */
/* FIELDS */
/* ============================= */

.iron-field {
    margin-bottom: 18px;
}

.iron-field label {
    display: block;
    font-size: 13px;
    margin-bottom: 6px;
    opacity: 0.8;
}

.iron-field p {
    display: block;
    font-size: 13px;
    margin-bottom: 6px;
    opacity: 0.8;
}

.iron-field input {
    width: 100%;
    padding: 12px 14px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--text);
    transition: all 0.2s ease;
}

.iron-field input:focus {
    outline: none;
    border-color: var(--green);
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.2);
}

/* ============================= */
/* BUTTONS */
/* ============================= */

.iron-btn {
    width: 100%;
    padding: 12px;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s ease;
    margin-top: 10px;

    display: flex;
    align-items: center;
    justify-content: center;
}

.iron-btn.primary {
    background: var(--green);
    color: white;
}

.iron-btn.primary:hover {
    background: var(--green-dark);
    box-shadow: 0 0 20px rgba(34, 197, 94, 0.4);
}

.iron-btn.secondary {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text);
}

.iron-btn.secondary:hover {
    border-color: var(--green);
    color: var(--green);
}

/* ============================= */
/* ALERT */
/* ============================= */

.iron-alert {
    margin-top: 20px;
    padding: 12px;
    border-radius: 10px;
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid var(--green);
    color: var(--green);
    text-align: center;
}

/* Красная рамка для поля с ошибкой */
input.error {
    border-color: #ef4444;
    box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.2);
}

/* Красный текст ошибки */
.iron-alert.error {
    color: #ef4444;
    border-color: #ef4444;
    background: rgba(239, 68, 68, 0.1);
}

/* LOGO */

.iron-logo {
    text-align: center;
    margin-bottom: 25px;
}

.iron-logo img {
    width: 120px;
    max-width: 100%;
    filter: drop-shadow(0 0 20px rgba(34, 197, 94, 0.4));
}

/* LANGUAGE SWITCH */

.iron-lang {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 25px;
}

.iron-lang button {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text);
    padding: 6px 14px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.2s ease;
}

.iron-lang button.active {
    border-color: var(--green);
    color: var(--green);
    box-shadow: 0 0 10px rgba(34, 197, 94, 0.4);
}

.iron-lang button:hover {
    border-color: var(--green);
}

/* ============================= */
/* FORM ANIMATION (REAL FADE) */
/* ============================= */

.iron-form-container {
    position: relative;
}

/* базовые стили */
.iron-form {
    opacity: 0;
    transform: translateY(-10px);
    height: 0;
    overflow: hidden;
    pointer-events: none;

    transition:
        opacity .35s ease,
        transform .35s ease,
        height .35s ease;
}

.iron-form-container.reset .reset-form {
    opacity: 1;
    transform: translateY(0);
    height: auto;
    overflow: visible;
    pointer-events: auto;
}

.iron-form-container.reset .login-form,
.iron-form-container.reset .register-form {
    opacity: 0;
    transform: translateY(-10px);
    height: 0;
    overflow: hidden;
    pointer-events: none;
}

/* LOGIN ACTIVE */

.iron-form-container.login .login-form {
    opacity: 1;
    transform: translateY(0);
    height: auto;
    overflow: visible;
    pointer-events: auto;
}

.iron-form-container.login .register-form {
    opacity: 0;
    transform: translateY(-10px);
    height: 0;
    overflow: hidden;
    pointer-events: none;
}

/* REGISTER ACTIVE */

.iron-form-container.register .register-form {
    opacity: 1;
    transform: translateY(0);
    height: auto;
    overflow: visible;
    pointer-events: auto;
}

.iron-form-container.register .login-form {
    opacity: 0;
    transform: translateY(-10px);
    height: 0;
    overflow: hidden;
    pointer-events: none;
}

/* ============================= */
/* LOADING PAGE */
/* ============================= */

.iron-loading {
    text-align: center;
}

.loading-logo {
    width: 120px;
    margin-bottom: 40px;
    animation: pulse 2s infinite ease-in-out;
}

.iron-spinner {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 4px solid rgba(34, 197, 94, 0.2);
    border-top: 4px solid var(--green);
    margin: 0 auto 20px auto;
    animation: spin 1s linear infinite;
}

.loading-text {
    font-size: 14px;
    opacity: 0.7;
}

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

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.05);
        opacity: 0.8;
    }
}

/* ============================= */
/* 404 PAGE */
/* ============================= */

.iron-404 {
    text-align: center;
    max-width: 500px;
}

.iron-404 h1 {
    font-size: 120px;
    margin: 0;
    color: var(--green);
    text-shadow: 0 0 40px rgba(34, 197, 94, 0.4);
}

.iron-404-title {
    font-size: 24px;
    margin-bottom: 15px;
}

.iron-404-desc {
    opacity: 0.7;
    margin-bottom: 30px;
}

/* AGREEMENT */

.iron-agreement {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 13px;
    margin-top: 10px;
    line-height: 1.4;
}

.iron-agreement input {
    margin-top: 3px;
}

.iron-agreement a {
    color: var(--green);
    text-decoration: none;
}

.iron-agreement a:hover {
    text-decoration: underline;
}

.password-field {
    position: relative;
}

.password-field input {
    padding-right: 40px;
    /* оставляем место для кнопки глазика */
}

.password-field .toggle-password {
    position: absolute;
    top: 53%;
    right: 12px;
    /* отступ от края input */
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    cursor: pointer;
    color: #ffffff;
    /* глазик белый */
    padding: 0;
}

.password-field .toggle-password svg {
    display: block;
    /* убираем лишние отступы */
    width: 20px;
    height: 20px;
    pointer-events: none;
}

/* для Edge / IE */
input::-ms-reveal {
    display: none;
    /* скрываем нативный глазик */
}

.btn-spinner {
    width: 18px;
    height: 18px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top: 3px solid white;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}

.icon-btn {
    height: 39.97px;
    width: 39.97px;

    border: none;
    border-radius: 6px;

    background: transparent;

    cursor: pointer;
}

/* ============================= */
/* ICON BUTTONS */
/* ============================= */

.icon-btn {
    display: flex;
    align-items: center;
    justify-content: center;

    transition: background .15s ease;
}

.icon-btn:hover {
    background: #e9ecef22;
}

.icon {
    width: 20px;
    height: 20px;
    fill: #bbb;
}

.icon-btn:hover .icon {
    fill: #22c55e;
}

.vpn-buy-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ================================= */
/* MOBILE ADAPTATION */
/* ================================= */

@media (max-width: 768px) {

    /* контейнер */
    .iron-wrapper {
        padding: 20px 14px;
        align-items: flex-start;
        padding-top: 40px;
    }

    /* карточка */
    .iron-card {
        max-width: 100%;
        padding: 24px 18px;
        border-radius: 14px;
    }

    /* логотип */
    .iron-logo img {
        width: 90px;
    }

    .iron-logo {
        margin-bottom: 18px;
    }

    /* переключатель языка */
    .iron-lang {
        margin-bottom: 18px;
        gap: 6px;
    }

    .iron-lang button {
        font-size: 12px;
        padding: 6px 10px;
    }

    /* поля */
    .iron-field {
        margin-bottom: 14px;
    }

    .iron-field input {
        padding: 14px 14px;
        font-size: 16px;
        /* важно для iOS чтобы не было zoom */
    }

    /* кнопки */
    .iron-btn {
        padding: 14px;
        font-size: 15px;
        margin-top: 8px;
    }

    /* чекбокс */
    .iron-agreement {
        font-size: 12px;
        gap: 6px;
    }

    /* текст reset */
    .iron-field p {
        font-size: 12px;
    }

    .iron-404 {
        max-width: 100%;
    }

    .iron-404 h1 {
        font-size: 72px;
    }

    .iron-404-title {
        font-size: 20px;
    }

    .iron-404-desc {
        font-size: 14px;
    }
}

@media (max-width: 420px) {

    .iron-404 h1 {
        font-size: 60px;
    }

}