:root {
    --primary: #2563EB; /* آبی روشن‌تر */
    --primary-dark: #1E40AF; /* آبی تیره‌تر */
    --secondary: #0EA5E9; /* آبی فیروزه‌ای */
    --accent: #F59E0B; /* کهربایی */
    --accent-light: #FBBF24; /* کهربایی روشن‌تر */
    --background: #F0F9FF; /* پس‌زمینه روشن‌تر */
    --card-bg: rgba(255, 255, 255, 0.95); /* افکت شیشه‌ای بهبود یافته */
    --text: #0F172A; /* خاکستری تیره‌تر */
    --text-light: #64748B; /* خاکستری روشن‌تر */
    --white: #FFFFFF;
    --error: #EF4444; /* قرمز برای خطاها */
    --success: #10B981; /* سبز برای پیام‌های موفقیت */
    --shadow-sm: 0 4px 6px rgba(0, 0, 0, 0.05);
    --shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 20px 40px rgba(0, 0, 0, 0.15);
    --gradient: linear-gradient(135deg, var(--primary), var(--secondary));
    --gradient-hover: linear-gradient(135deg, var(--primary-dark), var(--primary));
    --border-radius: 16px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@import url('https://fonts.googleapis.com/css2?family=Vazirmatn:wght@300;400;500;600;700;800;900&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Lalezar&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Markazi+Text:wght@400;500;600;700&display=swap');

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

body {
    font-family: 'Vazirmatn', sans-serif;
    background: var(--background);
    color: var(--text);
    line-height: 1.7;
    overflow-x: hidden;
    font-weight: 400;
    width: 100%;
    min-height: 100vh;
}

/* Login Container */
.login-container {
    width: 100%;
    max-width: 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--gradient);
    position: relative;
    overflow: hidden;
    padding: 2rem;
}

.login-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('https://images.unsplash.com/photo-1503676260728-1c00da094a0b?ixlib=rb-4.0.3&auto=format&fit=crop&w=1350&q=80') center/cover no-repeat;
    opacity: 0.1;
    z-index: 0;
}

.login-form-container {
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 3rem;
    animation: fadeInUp 1s ease;
    overflow: hidden;
    max-width: 500px;
    width: 100%;
    position: relative;
    z-index: 1;
}

.login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.login-logo {
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}

.login-logo img {
    height: 50px;
    margin-right: 0.5rem;
}

.login-title {
    font-family: 'Lalezar', cursive;
    font-size: 2.2rem;
    color: var(--primary);
    margin-bottom: 0.5rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
    letter-spacing: 0.5px;
    animation: fadeIn 1s ease;
}

.login-subtitle {
    font-family: 'Markazi Text', serif;
    font-size: 1.2rem;
    color: var(--text-light);
    font-weight: 500;
}

.login-steps {
    position: relative;
}

.login-step {
    display: none;
}

.login-step.active {
    display: block;
    animation: fadeIn 0.5s ease;
}

.login-form {
    width: 100%;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text);
}

.input-group {
    position: relative;
}

.input-icon {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
    transition: var(--transition);
}

.input-group input:focus + .input-icon {
    color: var(--primary);
}

.input-group input {
    width: 100%;
    padding: 1rem 2.5rem 1rem 1rem;
    border: 2px solid rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    font-family: 'Vazirmatn', sans-serif;
    font-size: 1rem;
    transition: var(--transition);
    background: rgba(255, 255, 255, 0.9);
}

.input-group input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
}

.form-error {
    color: var(--error);
    font-size: 0.9rem;
    margin-top: 0.5rem;
    min-height: 20px;
}

.verification-text {
    font-family: 'Markazi Text', serif;
    font-size: 1.2rem;
    color: var(--text-light);
    margin-bottom: 1rem;
    font-weight: 500;
    background: linear-gradient(to right, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    padding: 5px 0;
    border-radius: 4px;
    text-align: center;
}

.verification-code-container {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.verification-input {
    width: 50px;
    height: 60px;
    border: 2px solid rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    font-size: 1.5rem;
    text-align: center;
    transition: var(--transition);
    background: rgba(255, 255, 255, 0.9);
}

.verification-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
}

.timer-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 1rem;
    flex-wrap: wrap;
}

#timer {
    font-size: 1rem;
    font-weight: 700;
    color: var(--primary);
    background: rgba(37, 99, 235, 0.1);
    padding: 0.3rem 0.8rem;
    border-radius: 50px;
}

.resend-button {
    background: none;
    border: none;
    color: var(--primary);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    padding: 0.3rem 0.8rem;
    border-radius: 4px;
    position: relative;
    overflow: hidden;
}

.resend-button:hover:not(:disabled) {
    background: rgba(37, 99, 235, 0.1);
    transform: translateY(-2px);
}

.resend-button:disabled {
    color: var(--text-light);
    cursor: not-allowed;
}

.resend-count {
    font-size: 0.9rem;
    color: var(--text-light);
}

.submit-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 1rem;
    background: var(--primary);
    color: var(--white);
    border: none;
    border-radius: 8px;
    font-family: 'Vazirmatn', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    margin-bottom: 1rem;
    position: relative;
    overflow: hidden;
}

.submit-button:hover {
    background: var(--primary-dark);
    transform: translateY(-3px);
    box-shadow: var(--shadow);
}

.submit-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: 0.5s;
}

.submit-button:hover::before {
    left: 100%;
}

.button-text {
    margin-left: 0.5rem;
}

.back-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 1rem;
    background: transparent;
    color: var(--text);
    border: 2px solid rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    font-family: 'Vazirmatn', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.back-button:hover {
    background: rgba(0, 0, 0, 0.05);
    transform: translateY(-2px);
}

.form-footer {
    text-align: center;
    margin-top: 1.5rem;
    font-size: 0.95rem;
    color: var(--text-light);
}

.form-footer a {
    color: var(--primary);
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
    position: relative;
    padding-bottom: 2px;
}

.form-footer a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background: var(--gradient);
    transition: width 0.3s ease;
}

.form-footer a:hover {
    color: var(--primary-dark);
}

.form-footer a:hover::after {
    width: 100%;
}

.success-message {
    text-align: center;
    padding: 2rem 0;
}

.success-icon {
    font-size: 5rem;
    color: var(--success);
    margin-bottom: 1.5rem;
    animation: scaleIn 0.5s ease;
}

.success-message h2 {
    font-family: 'Lalezar', cursive;
    font-size: 2rem;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.success-message p {
    font-size: 1rem;
    color: var(--text-light);
    margin-bottom: 2rem;
}

.home-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 2rem;
    background: var(--primary);
    color: var(--white);
    border: none;
    border-radius: 8px;
    font-family: 'Vazirmatn', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.home-button:hover {
    background: var(--primary-dark);
    transform: translateY(-3px);
    box-shadow: var(--shadow);
}

.home-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: 0.5s;
}

.home-button:hover::before {
    left: 100%;
}

/* دکمه بازگشت به صفحه اصلی */
.back-to-home {
    position: absolute;
    top: 2rem;
    right: 2rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.8rem 1.5rem;
    background: var(--white);
    color: var(--primary);
    border-radius: 50px;
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 2px solid var(--primary);
    z-index: 10;
    overflow: hidden;
}

.back-to-home i {
    margin-left: 0.5rem;
    font-size: 1.1rem;
    transition: transform 0.3s ease;
}

.back-to-home:hover {
    background: var(--primary);
    color: var(--white);
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.back-to-home:hover i {
    transform: translateX(-3px);
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.5);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

@keyframes shimmer {
    0% {
        background-position: -100% 0;
    }
    100% {
        background-position: 100% 0;
    }
}

@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }
    10%, 30%, 50%, 70%, 90% {
        transform: translateX(-5px);
    }
    20%, 40%, 60%, 80% {
        transform: translateX(5px);
    }
}

.pulse-animation {
    animation: pulse 1.5s infinite;
}

.success-animation {
    animation: scaleIn 0.5s ease;
}

.link-animation {
    position: relative;
    transition: all 0.3s ease;
}

.link-animation:hover {
    transform: translateY(-2px);
}

.input-focus .input-icon {
    color: var(--primary);
}

.ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    transform: scale(0);
    animation: ripple 0.6s linear;
    pointer-events: none;
    width: 100px;
    height: 100px;
    margin-top: -50px;
    margin-left: -50px;
}

@keyframes ripple {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .login-form-container {
        padding: 2rem;
        max-width: 95%;
    }
    
    .login-title {
        font-size: 1.8rem;
    }
    
    .verification-input {
        width: 40px;
        height: 50px;
        font-size: 1.2rem;
    }
    
    .back-to-home {
        top: 1rem;
        right: 1rem;
        padding: 0.6rem 1.2rem;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .login-form-container {
        padding: 1.5rem;
        max-width: 100%;
    }
    
    .login-logo {
        font-size: 1.5rem;
    }
    
    .login-logo img {
        height: 40px;
    }
    
    .verification-input {
        width: 35px;
        height: 45px;
        font-size: 1rem;
    }
    
    .timer-container {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .resend-button {
        margin: 0.5rem 0;
    }
    
    .back-to-home {
        padding: 0.5rem 1rem;
        font-size: 0.8rem;
    }
}

/* Tablet Specific Adjustments */
@media (min-width: 481px) and (max-width: 991px) {
    .login-form-container {
        max-width: 90%;
    }
}

/* Large Desktop Adjustments */
@media (min-width: 1400px) {
    .login-form-container {
        max-width: 550px;
    }
}

/* Print Styles */
@media print {
    .login-container {
        background: white;
        color: black;
    }
    
    .login-container::before {
        display: none;
    }
    
    .login-form-container {
        box-shadow: none;
        border: 1px solid #ddd;
    }
}

/* Registration Styles */
.registration-container {
    width: 100%;
    max-width: 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--gradient);
    position: relative;
    overflow: hidden;
    padding: 2rem;
}

.registration-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('https://images.unsplash.com/photo-1503676260728-1c00da094a0b?ixlib=rb-4.0.3&auto=format&fit=crop&w=1350&q=80') center/cover no-repeat;
    opacity: 0.1;
    z-index: 0;
}

.registration-form-container {
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 3rem;
    animation: fadeInUp 1s ease;
    overflow: hidden;
    max-width: 500px;
    width: 100%;
    position: relative;
    z-index: 1;
}

.registration-header {
    text-align: center;
    margin-bottom: 2rem;
}

.registration-logo {
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}

.registration-logo img {
    height: 50px;
    margin-right: 0.5rem;
}

.registration-title {
    font-family: 'Lalezar', cursive;
    font-size: 2.2rem;
    color: var(--primary);
    margin-bottom: 0.5rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.registration-subtitle {
    font-family: 'Markazi Text', serif;
    font-size: 1.2rem;
    color: var(--text-light);
    font-weight: 500;
}

.registration-steps {
    position: relative;
}

.registration-step {
    display: none;
}

.registration-step.active {
    display: block;
    animation: fadeIn 0.5s ease;
}

.registration-form {
    width: 100%;
}
