* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
    ::-webkit-scrollbar {
        width: 7px;
    }

    ::-webkit-scrollbar-track {
        background: #e0f2f1;
        margin: 16px;
    }

    ::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #4FD1C5, #38B2AC, #319795);
        border-radius: 10px;

    }

body {
    font-family: 'Vazir', 'Segoe UI', Tahoma, sans-serif;
    background: linear-gradient(135deg, #e0f2f1 0%, #b2dfdb 25%, #80cbc4 50%, #4db6ac 75%, #26a69a 100%);
    min-height: 100vh;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
    overflow: hidden;
}

body::before {
    content: '';
    position: fixed;
    top: 50%;
    left: 50%;
    width: 100vw;
    height: 100vh;
    transform: translate(-50%, -50%);
    background: radial-gradient(circle, rgba(79, 209, 197, 0.1) 0%, transparent 70%);
    animation: rotate 30s linear infinite;
    pointer-events: none;
}

@keyframes rotate {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

.auth-container {
    position: relative;
    width: 100%;
    max-width: 480px;
    z-index: 1;
}

.islamic-pattern-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        repeating-linear-gradient(45deg, transparent, transparent 35px, rgba(56, 178, 172, 0.03) 35px, rgba(56, 178, 172, 0.03) 70px),
        repeating-linear-gradient(-45deg, transparent, transparent 35px, rgba(79, 209, 197, 0.03) 35px, rgba(79, 209, 197, 0.03) 70px);
    pointer-events: none;
    z-index: 0;
}

.auth-box {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    box-shadow: 
        0 20px 60px rgba(38, 166, 154, 0.15),
        0 8px 16px rgba(79, 209, 197, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    padding: 48px 40px;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(79, 209, 197, 0.2);
    max-height: calc(100vh - 40px);
    overflow-y: auto;
}

.auth-box::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(135deg, #4FD1C5, #38B2AC, #319795);
    border-radius: 24px;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.auth-box:hover::before {
    opacity: 0.1;
}

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

.logo-section {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 12px;
}

.logo-icon {
    width: 56px;
    height: 56px;
    filter: drop-shadow(0 4px 12px rgba(79, 209, 197, 0.3));
    animation: pulse 3s ease-in-out infinite;
}

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

.auth-header h1 {
    font-size: 36px;
    font-weight: 700;
    background: linear-gradient(135deg, #319795, #38B2AC, #4FD1C5);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.auth-subtitle {
    color: #2c7a7b;
    font-size: 15px;
    font-weight: 500;
    margin-top: 8px;
}

.auth-form {
    display: none;
    animation: fadeInUp 0.5s ease;
}

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

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

.form-ornament {
    height: 3px;
    background: linear-gradient(90deg, transparent, #4FD1C5, #38B2AC, #4FD1C5, transparent);
    border-radius: 2px;
    margin: 24px 0;
}

.form-title {
    font-size: 24px;
    color: #234e52;
    font-weight: 700;
    text-align: center;
    margin-bottom: 32px;
}

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

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

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    right: 16px;
    font-size: 20px;
    z-index: 1;
}

.input-wrapper input {
    width: 100%;
    padding: 14px 48px 14px 16px;
    border: 2px solid #b2dfdb;
    border-radius: 12px;
    font-size: 15px;
    font-family: inherit;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.9);
}

.input-wrapper input:focus {
    outline: none;
    border-color: #4FD1C5;
    background: white;
    box-shadow: 0 4px 16px rgba(79, 209, 197, 0.15);
}

.input-wrapper input::placeholder {
    color: #81a9a6;
}

.toggle-password {
    position: absolute;
    left: 16px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 18px;
    padding: 4px;
    opacity: 0.6;
    transition: opacity 0.2s;
}

.toggle-password:hover {
    opacity: 1;
}

.password-strength {
    height: 4px;
    background: #e0f2f1;
    border-radius: 2px;
    margin-top: 8px;
    overflow: hidden;
}

.strength-bar {
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, #ef5350, #ffa726, #4FD1C5);
    transition: width 0.3s ease;
    border-radius: 2px;
}

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

.checkbox-container {
    display: flex;
    align-items: center;
    cursor: pointer;
    color: #2c7a7b;
    gap: 8px;
}

.checkbox-container input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.checkmark {
    width: 20px;
    height: 20px;
    border: 2px solid #4FD1C5;
    border-radius: 6px;
    display: inline-block;
    position: relative;
    transition: all 0.2s ease;
}

.checkbox-container input:checked ~ .checkmark {
    background: linear-gradient(135deg, #4FD1C5, #38B2AC);
    border-color: #38B2AC;
}

.checkbox-container input:checked ~ .checkmark::after {
    content: '✓';
    position: absolute;
    color: white;
    font-size: 14px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.forgot-link, .terms-link {
    color: #319795;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s;
}

.forgot-link:hover, .terms-link:hover {
    color: #2c7a7b;
}

.btn-submit {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #4FD1C5, #38B2AC);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 8px 24px rgba(79, 209, 197, 0.3);
}

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

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

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(79, 209, 197, 0.4);
}

.btn-submit:active {
    transform: translateY(0);
}

.btn-resend {
    width: 100%;
    padding: 14px;
    background: transparent;
    color: #38B2AC;
    border: 2px solid #b2dfdb;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 12px;
    transition: all 0.3s ease;
}

.btn-resend:hover:not(:disabled) {
    background: rgba(79, 209, 197, 0.1);
    border-color: #4FD1C5;
}

.btn-resend:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.form-footer {
    text-align: center;
    margin-top: 24px;
    color: #4a7c7a;
    font-size: 14px;
}

.form-footer a {
    color: #319795;
    text-decoration: none;
    font-weight: 700;
    transition: color 0.2s;
}

.form-footer a:hover {
    color: #2c7a7b;
}

.otp-description {
    text-align: center;
    color: #4a7c7a;
    margin-bottom: 32px;
    font-size: 15px;
}

#otp-phone-display {
    font-weight: 700;
    color: #319795;
    direction: ltr;
    display: inline-block;
}

.otp-inputs {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 24px;
    direction: ltr;
}

.otp-input {
    width: 52px;
    height: 58px;
    text-align: center;
    font-size: 24px;
    font-weight: 700;
    border: 2px solid #b2dfdb;
    border-radius: 12px;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.9);
}

.otp-input:focus {
    outline: none;
    border-color: #4FD1C5;
    background: white;
    box-shadow: 0 4px 16px rgba(79, 209, 197, 0.15);
    transform: scale(1.05);
}

.otp-timer {
    text-align: center;
    color: #4a7c7a;
    font-size: 14px;
    margin-bottom: 24px;
}

#timer {
    font-weight: 700;
    color: #319795;
}

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

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

    .otp-input {
        width: 44px;
        height: 50px;
        font-size: 20px;
    }

    .otp-inputs {
        gap: 8px;
    }
}

@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
