:root {
    --primary-blue: #3e69fe;
    --text-light: #f0f0f0;
    --text-muted: #a0a3b1;
    --border-radius-lg: 16px;
}
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
body {
    font-family: 'Vazirmatn', sans-serif;
    background-color: #11131e;
    color: var(--text-light);
    overflow: hidden;
}
.animated-background {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: 0;
    display: flex; flex-direction: column; justify-content: space-around;
    transform: rotate(-20deg) scale(1.7); pointer-events: none;
}
.animated-background::after {
    content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: radial-gradient(ellipse at center, rgba(17, 19, 30, 0.1) 0%, rgba(17, 19, 30, 0.95) 100%);
}
.image-row { width: 100%; height: 100px; position: relative; overflow: hidden; }
.loop-image {
    height: 100px; width: auto; border-radius: 20px; opacity: 0.4;
    position: absolute; top: 0; user-select: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
}
main {
    position: relative; z-index: 1; display: flex; align-items: center;
    justify-content: center; min-height: 100vh; padding: 2rem;
}
.login-register-container {
    max-width: 420px; width: 100%; padding: 2.5rem;
    border-radius: var(--border-radius-lg);
    background-color: rgba(34, 38, 57, 0.75);
    backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}
.form-container.hidden { display: none; }
.auth-form h2 { font-size: 1.8rem; font-weight: 700; text-align: center; margin-bottom: 1rem; }
.auth-form .form-description { text-align: center; color: var(--text-muted); margin-bottom: 2.5rem; line-height: 1.7; }
.form-description strong { color: #8ab4f8; font-weight: 700; }
.form-group { margin-bottom: 1.5rem; }
.form-group label { display: block; margin-bottom: 0.5rem; font-size: 0.9rem; color: var(--text-muted); }
.form-group input {
    width: 100%; height: 50px; padding: 0 1rem; border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1); background-color: rgba(13, 13, 18, 0.5);
    color: var(--text-light); font-family: inherit; font-size: 1rem;
}
.form-group input:focus {
    outline: none; border-color: var(--primary-blue);
    box-shadow: 0 0 0 2px rgba(62, 105, 254, 0.4);
}
.auth-btn {
    width: 100%; padding: 0.9rem; background-color: var(--primary-blue);
    color: white; border: none; border-radius: 8px; font-size: 1.1rem;
    font-weight: 700; cursor: pointer; transition: background-color 0.3s ease;
}
.auth-btn:hover { background-color: #2e5ae6; }
.resend-container { text-align: center; margin-top: 1.5rem; }
.resend-container a { color: var(--primary-blue); text-decoration: none; }
.resend-container a.disabled { color: var(--text-muted); pointer-events: none; }
.resend-container span { margin-right: 0.5rem; }
.error-summary, .success-message {
    padding: 1rem; margin-bottom: 1.5rem; border-radius: 8px; font-size: 0.9rem; border: 1px solid;
}
.error-summary { background-color: rgba(230, 57, 70, 0.25); color: #ffcdd2; border-color: rgba(230, 57, 70, 0.5); }
.success-message { background-color: rgba(76, 175, 80, 0.25); color: #c8e6c9; border-color: rgba(76, 175, 80, 0.5); }

/* ================================================== */
/*          استایل‌های جدید برای باکس‌های OTP         */
/* ================================================== */

.otp-input-container {
    display: flex;
    justify-content: space-between; /* توزیع با فاصله یکسان */
    gap: 10px;
    direction: ltr; /* مهم برای ترتیب چپ به راست اعداد */
}

.otp-box {
    width: 50px;
    height: 55px;
    text-align: center;
    font-size: 1.5rem;
    font-weight: 700;
    border-radius: 12px; /* گردی بیشتر مثل تصویر */
    border: 1px solid #383d5a; /* رنگ border از تم اصلی */
    background-color: #1e2027; /* رنگ پس‌زمینه تیره‌تر */
    color: var(--text-light);
    transition: all 0.3s ease;
    outline: none;
    -moz-appearance: textfield;
}

.otp-box::-webkit-outer-spin-button,
.otp-box::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.otp-box:focus {
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 2px rgba(62, 105, 254, 0.3);
}

#otp-hidden-input {
    display: none;
}


/* ================================================== */
/*                 کدهای واکنش‌گرایی                 */
/* ================================================== */

@media (max-width: 480px) {
    .login-register-container { padding: 1.5rem; }
    .auth-form h2 { font-size: 1.5rem; }
    .loop-image { height: 80px; }
    .animated-background { transform: rotate(-20deg) scale(2.2); }
    
    .otp-box { width: 42px; height: 48px; font-size: 1.2rem; border-radius: 10px; }
    .otp-input-container { gap: 8px; }
}