:root {
    --brand-accent: #ffcc00;
    --brand-accent-hover: #e6b800;

    --glass-bg: rgba(20, 20, 25, 0.45);
    --glass-border: rgba(255, 255, 255, 0.12);

    --text-main: #ffffff;
    --text-sec: #a0a0a5;

    --input-bg: rgba(0, 0, 0, 0.25);
    --error-bg: rgba(255, 59, 48, 0.2);
}

html {
    min-height: 100%;
    background: linear-gradient(
        135deg,
        #121212 0%,
        #291a40 45%,
        #603bb0 70%,
        #d86c12 100%
    );
    background-size: 200% 200%;
    animation: gradientBG 15s ease infinite;
    overflow-x: hidden;
}

body {
    margin: 0;
    min-height: 100vh;

    font-family:
        -apple-system,
        BlinkMacSystemFont,
        "SF Pro Display",
        "Segoe UI",
        Roboto,
        Helvetica,
        Arial,
        sans-serif;

    display: flex;
    justify-content: center;
    align-items: center;

    background: transparent;

    padding: 20px;
    box-sizing: border-box;
    overflow-x: hidden;
}

@keyframes gradientBG {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

.glass-panel {
    width: 100%;
    max-width: 320px;

    background: var(--glass-bg);

    backdrop-filter: blur(40px) saturate(180%);
    -webkit-backdrop-filter: blur(40px) saturate(180%);

    border: 1px solid var(--glass-border);
    border-radius: 28px;

    padding: 48px 40px;

    box-shadow:
        0 30px 60px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);

    text-align: center;

    box-sizing: border-box;
}

.logo {
    width: 140px;
    height: auto;

    margin: 0 auto 24px;

    display: block;

    filter: drop-shadow(0 4px 12px rgba(255, 204, 0, 0.25));
}

.glass-panel h2 {
    margin: 0 0 8px;

    color: var(--text-main);

    font-size: 24px;
    font-weight: 600;

    letter-spacing: -0.5px;
}

.subtitle {
    margin-bottom: 30px;

    color: var(--text-sec);

    font-size: 14px;
    line-height: 1.5;
}

.error-message {
    display: none;

    margin-bottom: 20px;
    padding: 12px;

    border-radius: 12px;
    border: 1px solid rgba(255, 69, 58, 0.3);

    background: var(--error-bg);
    color: #ff453a;

    font-size: 13px;
    font-weight: 500;
}

.error-message.show {
    display: block;
    animation: shake 0.4s ease-in-out;
}

@keyframes shake {
    0%,
    100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-4px);
    }

    75% {
        transform: translateX(4px);
    }
}

.input-group {
    margin-bottom: 16px;
}

.input-group input {
    width: 100%;

    padding: 14px 16px;

    box-sizing: border-box;

    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;

    background: var(--input-bg);

    color: var(--text-main);

    font-size: 15px;
    font-family: inherit;

    outline: none;

    transition: all 0.25s ease;

    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.input-group input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.input-group input:focus {
    background: rgba(0, 0, 0, 0.4);

    border-color: var(--brand-accent);

    box-shadow: 0 0 0 3px rgba(255, 204, 0, 0.2);
}

.options-group {
    display: flex;
    justify-content: space-between;
    align-items: center;

    margin-bottom: 24px;

    font-size: 13px;
}

.checkbox-container {
    display: flex;
    align-items: center;

    color: var(--text-sec);

    cursor: pointer;
}

.checkbox-container input {
    width: 16px;
    height: 16px;

    margin-right: 8px;

    accent-color: var(--brand-accent);
}

.link {
    color: var(--text-sec);

    text-decoration: none;

    font-weight: 500;

    transition: color 0.2s ease;
}

.link:hover {
    color: var(--brand-accent);
}

.action-btn {
    width: 100%;
    height: 48px;

    border: none;
    border-radius: 14px;

    background: var(--brand-accent);
    color: #111111;

    font-size: 16px;
    font-weight: 600;

    cursor: pointer;

    transition: all 0.2s ease;

    display: flex;
    justify-content: center;
    align-items: center;

    box-shadow: 0 4px 15px rgba(255, 204, 0, 0.3);
}

.action-btn:hover:not(:disabled) {
    background: var(--brand-accent-hover);

    box-shadow: 0 6px 20px rgba(255, 204, 0, 0.4);
}

.action-btn:active:not(:disabled) {
    transform: scale(0.98);
}

.action-btn:disabled {
    cursor: not-allowed;
    opacity: 0.8;
}

.loader {
    display: none;

    width: 20px;
    height: 20px;

    border: 3px solid rgba(17, 17, 17, 0.2);
    border-top-color: #111111;
    border-radius: 50%;

    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.loading .btn-text {
    display: none;
}

.loading .loader {
    display: block;
}

.back-link-container {
    margin-top: 20px;
    text-align: center;
}

@media (max-width: 480px) {
    .glass-panel {
        padding: 36px 24px;
        border-radius: 22px;
    }

    .logo {
        width: 120px;
    }

    .glass-panel h2 {
        font-size: 22px;
    }
}