
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Vazirmatn', sans-serif;
}

:root {
    --bg: #0a0a0a;
    --card: #121212;
    --red: #c1121f;
    --red-glow: rgba(193, 18, 31, .4);
    --text: #ffffff;
    --muted: #999999;
}

body {
    min-height: 100dvh;
    display: flex;
    justify-content: center;
    align-items: center;
    background: var(--bg);
    position: relative;
    padding: 20px;
}


.orb {
    position: fixed;
    border-radius: 50%;
    filter: blur(90px);
    opacity: .18;
    animation: float 20s ease-in-out infinite alternate;
    pointer-events: none;
    z-index: 0;
}

.orb:nth-child(1) {
    width: 600px;
    height: 600px;
    background: #c1121f;
    top: -10%;
    right: -10%;
}

.orb:nth-child(2) {
    width: 350px;
    height: 350px;
    background: #8b0000;
    bottom: -10%;
    left: -10%;
    animation-delay: -5s;
}

.orb:nth-child(3) {
    width: 250px;
    height: 250px;
    background: #ff4444;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation-delay: -10s;
}

@keyframes float {
    0% {
        transform: translate(0, 0) scale(1);
    }
    50% {
        transform: translate(100px, -50px) scale(1.1);
    }
    100% {
        transform: translate(-50px, 80px) scale(.9);
    }
}


.auth-card {
    width: 100%;
    max-width: 440px;
    background: rgba(18, 18, 18, .92);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(193, 18, 31, .25);
    border-radius: 24px;
    padding: 34px 34px;
    position: relative;
    z-index: 2;
    box-shadow: 0 0 40px rgba(0, 0, 0, .5), 0 0 30px rgba(193, 18, 31, .08);
    transition: border-color .4s ease;
}

.auth-card:hover {
    border-color: rgba(193, 18, 31, .5);
}


.logo {
    display: flex;
    justify-content: center;
    margin-bottom: 18px;
}

.logo img {
    height: 60px;
    object-fit: contain;
}


.auth-title {
    text-align: center;
    color: white;
    font-size: 26px;
    font-weight: 900;
    margin-bottom: 4px;
}

.auth-subtitle {
    text-align: center;
    color: var(--muted);
    margin-bottom: 24px;
    font-size: 13px;
}


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

.form-group label {
    display: block;
    color: #ddd;
    margin-bottom: 5px;
    font-size: 13px;
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    border-radius: 11px;
    border: 1px solid rgba(255, 255, 255, .08);
    background: #1a1a1a;
    color: white;
    font-size: 14px;
    transition: border-color .3s ease, box-shadow .3s ease;
    -webkit-appearance: none;
    appearance: none;
}

.form-control:focus {
    outline: none;
    border-color: var(--red);
    box-shadow: 0 0 0 4px rgba(193, 18, 31, .15);
    background: #1e1e1e;
}

.form-control::placeholder {
    color: #666;
}


.auth-btn {
    width: 100%;
    border: none;
    padding: 13px;
    margin-top: 4px;
    border-radius: 11px;
    background: var(--red);
    color: white;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: transform .3s ease, box-shadow .3s ease, background .3s ease;
}

.auth-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px var(--red-glow);
    background: #d41a2a;
}

.auth-btn:active {
    transform: scale(.97);
}


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

.auth-footer a {
    color: var(--red);
    text-decoration: none;
    font-weight: 700;
    transition: color .3s ease;
}

.auth-footer a:hover {
    color: white;
}


.forgot-password {
    display: block;
    text-align: left;
    margin-top: 4px;
    color: #999;
    text-decoration: none;
    font-size: 12px;
    transition: color .3s ease;
}

.forgot-password:hover {
    color: var(--red);
}


.back-link {
    position: fixed;
    top: 20px;
    right: 24px;
    color: var(--muted);
    text-decoration: none;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    backdrop-filter: blur(12px);
    background: rgba(255, 255, 255, .04);
    transition: all .3s ease;
    z-index: 9999;
}

.back-link:hover {
    color: white;
    border-color: var(--red);
    background: rgba(193, 18, 31, .1);
    transform: translateX(-3px);
}


.form-errors {
    background: rgba(193, 18, 31, 0.12);
    border: 1px solid rgba(193, 18, 31, 0.5);
    border-radius: 11px;
    padding: 10px 14px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.form-errors::before {
    content: '⚠️';
    font-size: 14px;
    flex-shrink: 0;
}

.error-msg {
    color: #ff6b6b;
    font-size: 12px;
    margin-top: 4px;
    padding-right: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.error-msg::before {
    content: '✕';
    color: var(--red);
    font-size: 10px;
    font-weight: bold;
    flex-shrink: 0;
}

.field-error {
    color: #ff6b6b;
    font-size: 12px;
    margin-top: 4px;
    padding: 4px 10px;
    background: rgba(193, 18, 31, 0.08);
    border-radius: 7px;
    border-right: 3px solid var(--red);
    display: flex;
    align-items: center;
    gap: 5px;
}

.field-error::before {
    content: '!';
    background: var(--red);
    color: white;
    width: 15px;
    height: 15px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: bold;
    flex-shrink: 0;
}


.register .auth-card {
    padding: 28px 30px 32px;
}

.register .logo img {
    height: 52px;
}

.register .auth-title {
    font-size: 24px;
}

.register .form-group {
    margin-bottom: 14px;
}

.register .form-control {
    padding: 11px 15px;
    font-size: 14px;
}

.register .auth-btn {
    padding: 12px;
    font-size: 15px;
    margin-top: 4px;
}


@media (max-width: 820px) {
    .auth-card {
        max-width: 400px;
        padding: 30px 28px;
    }
    
    .auth-title {
        font-size: 24px;
    }
    
    .logo img {
        height: 55px;
    }
}

@media (max-width: 768px) {
    body {
        padding: 14px;
        min-height: 100dvh;
        display: flex;
        justify-content: center;
        align-items: center;
    }

    .auth-card {
        max-width: 100%;
        padding: 24px 20px;
        border-radius: 18px;
    }

    .logo {
        margin-bottom: 14px;
    }

    .logo img {
        height: 46px;
    }

    .auth-title {
        font-size: 22px;
        margin-bottom: 2px;
    }

    .auth-subtitle {
        font-size: 12px;
        margin-bottom: 20px;
    }

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

    .form-group label {
        font-size: 12px;
        margin-bottom: 4px;
    }

    .form-control {
        height: 44px;
        padding: 0 14px;
        font-size: 14px;
        border-radius: 9px;
    }

    .auth-btn {
        height: 44px;
        padding: 0;
        margin-top: 2px;
        font-size: 14px;
        border-radius: 9px;
    }

    .auth-footer {
        margin-top: 16px;
        font-size: 12px;
    }

    .back-link {
        top: 12px;
        right: 12px;
        padding: 5px 12px;
        font-size: 11px;
        border-radius: 14px;
    }
    
    .form-errors {
        padding: 8px 12px;
        font-size: 12px;
        border-radius: 9px;
        margin-bottom: 14px;
    }
    
    .register .auth-card {
        padding: 20px 18px 24px;
        border-radius: 16px;
    }
    
    .register .logo img {
        height: 40px;
    }
    
    .register .auth-title {
        font-size: 20px;
    }
    
    .register .form-group {
        margin-bottom: 12px;
    }
    
    .register .form-control {
        height: 42px;
        padding: 0 12px;
        font-size: 13px;
        border-radius: 8px;
    }
    
    .register .auth-btn {
        height: 42px;
        font-size: 14px;
        border-radius: 8px;
    }
}

@media (max-width: 480px) {
    body {
        padding: 10px;
    }

    .auth-card {
        padding: 20px 16px;
        border-radius: 16px;
    }

    .logo img {
        height: 40px;
        margin-bottom: 6px;
    }

    .auth-title {
        font-size: 20px;
    }

    .auth-subtitle {
        font-size: 11px;
        margin-bottom: 16px;
    }

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

    .form-group label {
        font-size: 12px;
    }

    .form-control {
        height: 42px;
        font-size: 13px;
        padding: 0 12px;
        border-radius: 8px;
    }

    .auth-btn {
        height: 42px;
        font-size: 13px;
        border-radius: 8px;
    }

    .auth-footer {
        font-size: 12px;
        margin-top: 14px;
    }

    .back-link {
        top: 10px;
        right: 10px;
        padding: 4px 10px;
        font-size: 10px;
        border-radius: 12px;
    }

    .back-link span {
        display: none;
    }
    
    .register .auth-card {
        padding: 16px 14px 20px;
        border-radius: 14px;
    }
    
    .register .logo img {
        height: 36px;
        margin-bottom: 4px;
    }
    
    .register .auth-title {
        font-size: 18px;
    }
    
    .register .auth-subtitle {
        font-size: 11px;
        margin-bottom: 14px;
    }
    
    .register .form-group {
        margin-bottom: 10px;
    }
    
    .register .form-control {
        height: 40px;
        font-size: 13px;
        padding: 0 10px;
        border-radius: 7px;
    }
    
    .register .auth-btn {
        height: 40px;
        font-size: 13px;
        border-radius: 7px;
    }
}

@media (max-width: 360px) {
    body {
        padding: 8px;
    }

    .auth-card {
        padding: 16px 12px;
        border-radius: 14px;
    }

    .logo img {
        height: 36px;
    }

    .auth-title {
        font-size: 18px;
    }

    .auth-subtitle {
        font-size: 10px;
        margin-bottom: 14px;
    }

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

    .form-control {
        height: 38px;
        font-size: 12px;
        padding: 0 10px;
        border-radius: 7px;
    }

    .auth-btn {
        height: 38px;
        font-size: 12px;
        border-radius: 7px;
    }

    .auth-footer {
        font-size: 11px;
        margin-top: 12px;
    }

    .back-link {
        top: 8px;
        right: 8px;
        padding: 4px 8px;
        font-size: 10px;
        border-radius: 10px;
    }
    
    .register .auth-card {
        padding: 14px 12px 18px;
    }
    
    .register .logo img {
        height: 32px;
    }
    
    .register .auth-title {
        font-size: 16px;
    }
    
    .register .form-control {
        height: 36px;
        font-size: 12px;
        padding: 0 8px;
    }
    
    .register .auth-btn {
        height: 36px;
        font-size: 12px;
    }
}