:root {
    --text: #e5edf7;
    --muted: #8da0b8;
    --line: rgba(148, 163, 184, 0.16);
    --line-strong: rgba(148, 163, 184, 0.24);
    --accent: #4fd1c5;
    --accent-2: #4f8cff;
    --danger: #ef4444;
}

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

body {
    font-family: 'Vazir', sans-serif;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background:
        radial-gradient(circle at top left, rgba(79, 140, 255, 0.16), transparent 34%),
        radial-gradient(circle at bottom right, rgba(79, 209, 197, 0.12), transparent 24%),
        linear-gradient(145deg, #040913 0%, #07111f 48%, #0a1628 100%);
    position: relative;
    overflow: hidden;
    color: var(--text);
}

body::before,
body::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    filter: blur(20px);
}

body::before {
    width: 520px;
    height: 520px;
    background: radial-gradient(circle, rgba(79, 140, 255, 0.14) 0%, transparent 70%);
    top: -200px;
    right: -180px;
}

body::after {
    width: 420px;
    height: 420px;
    background: radial-gradient(circle, rgba(79, 209, 197, 0.12) 0%, transparent 70%);
    bottom: -140px;
    left: -120px;
}

.login-container,
.auth-container {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 520px;
    padding: 20px;
}

.login-card,
.auth-card {
    background: rgba(10, 19, 34, 0.78);
    backdrop-filter: blur(20px);
    border: 1px solid var(--line);
    border-radius: 28px;
    padding: 48px 40px;
    box-shadow: 0 28px 80px rgba(0, 0, 0, 0.35);
}

.logo-section,
.auth-header {
    text-align: center;
    margin-bottom: 40px;
}

.logo-icon,
.auth-header .auth-logo {
    width: min(100%, 290px);
    height: auto;
    margin: 0 auto 10px;
    display: grid;
    justify-items: center;
    gap: 4px;
}

.logo-icon-image {
    width: clamp(72px, 22vw, 116px);
    height: auto;
    display: block;
}

.logo-full-image {
    width: 100%;
    height: auto;
    display: block;
}

.logo-section h1,
.auth-header h1 {
    font-size: 32px;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 8px;
}

.logo-section p,
.auth-header p {
    font-size: 14px;
    color: var(--muted);
}

.tab-switcher {
    display: flex;
    gap: 12px;
    margin-bottom: 32px;
    background: rgba(255, 255, 255, 0.03);
    padding: 6px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.tab-btn {
    flex: 1;
    padding: 12px 24px;
    border: none;
    background: transparent;
    color: var(--muted);
    font-size: 15px;
    font-weight: 600;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Vazir', sans-serif;
}

.tab-btn.active,
.submit-btn,
.auth-btn {
    background: linear-gradient(135deg, var(--accent-2) 0%, var(--accent) 100%);
    color: #04111f;
}

.tab-btn:hover:not(.active) {
    background: rgba(255, 255, 255, 0.05);
    color: #ffffff;
}

.auth-error {
    background: rgba(239, 68, 68, 0.14);
    border: 1px solid rgba(239, 68, 68, 0.22);
    color: #ffb4b4;
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 14px;
    margin-bottom: 20px;
    text-align: center;
}

.form-section {
    display: none;
}

.form-section.active {
    display: block;
}

.form-group {
    margin-bottom: 22px;
}

.register-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px 16px;
}

.form-group-wide {
    grid-column: 1 / -1;
}

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #d6e2ee;
    margin-bottom: 8px;
}

.form-group input {
    width: 100%;
    padding: 14px 16px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: #ffffff;
    font-size: 15px;
    font-family: 'Vazir', sans-serif;
    transition: all 0.3s ease;
}

.form-group input::placeholder {
    color: rgba(255, 255, 255, 0.35);
}

.form-group input:focus {
    outline: none;
    border-color: rgba(79, 140, 255, 0.6);
    background: rgba(255, 255, 255, 0.06);
    box-shadow: 0 0 0 3px rgba(79, 140, 255, 0.1);
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    font-size: 14px;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--muted);
    cursor: pointer;
}

.remember-me input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--accent-2);
}

.forgot-password,
.footer-text a {
    color: #8bf3ff;
    text-decoration: none;
    font-weight: 500;
}

.submit-btn,
.auth-btn {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Vazir', sans-serif;
    box-shadow: 0 10px 24px rgba(79, 140, 255, 0.22);
}

.submit-btn:hover,
.auth-btn:hover {
    transform: translateY(-2px);
}

.footer-text {
    text-align: center;
    margin-top: 32px;
    font-size: 13px;
    color: var(--muted);
}

@media (max-width: 640px) {
    .login-card,
    .auth-card {
        padding: 32px 24px;
    }

    .register-grid {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .form-group-wide {
        grid-column: auto;
    }

    .logo-section h1,
    .auth-header h1 {
        font-size: 28px;
    }
}
