/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --dprimary: #FFFFFF;
    --dtitle: #FFFFFF;
    --dfield_bg: rgba(255, 255, 255, 0.08);
    --daccent: #ff6318;
    --dform_bg: transparent;
    --dbutton_text: #FFFFFF;
    --dark_bg: #263851;
}

body {
    font-family: 'Vazir', 'IRANSans', 'Tahoma', Arial, sans-serif;
    background: var(--dark_bg);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    direction: rtl;
}

.auth-container {
    width: 100%;
    max-width: 450px;
    margin: 0 auto;
}

.auth-box {
    background: transparent;
    border-radius: 0;
    box-shadow: none;
    overflow: visible;
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

.auth-header {
    text-align: center;
    padding: 0 0 40px 0;
    background: transparent;
    color: var(--dtitle);
}

.auth-header .logo { display: none; }

.auth-header h1 {
    font-size: 22px;
    font-weight: 500;
    margin: 0;
    color: var(--dtitle);
}

.auth-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
}

.tab-btn {
    flex: 1;
    padding: 12px;
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    font-size: 15px;
    font-weight: 500;
    transition: all 0.2s ease;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    font-family: inherit;
}

.tab-btn.active {
    color: var(--daccent);
    border-bottom-color: var(--daccent);
}

.auth-step {
    display: none;
    animation: fadeIn 0.3s ease-out;
    max-width: 350px;
    margin: 0 auto;
}

.auth-step.active { display: block; }

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.step-info {
    margin-bottom: 25px;
    text-align: center;
    color: var(--dprimary);
}

.step-info p {
    margin: 0 0 10px 0;
    font-size: 14px;
    line-height: 1.6;
}

.step-info strong {
    color: var(--daccent);
    font-weight: 600;
}

.auth-form {
    display: none;
    padding: 0;
    animation: fadeIn 0.3s ease-out;
    max-width: 350px;
    margin: 0 auto;
}

.auth-form.active { display: block; }

.input-method-selector {
    margin-bottom: 20px;
    display: flex;
    gap: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.radio-option {
    flex: 1;
    padding: 12px;
    cursor: pointer;
    text-align: center;
    color: rgba(255, 255, 255, 0.6);
    transition: all 0.2s ease;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
}

.radio-option input[type="radio"] { display: none; }

.radio-option:has(input[type="radio"]:checked) {
    color: var(--daccent);
    border-bottom-color: var(--daccent);
}

.form-group { margin-bottom: 20px; }

.form-text {
    display: block;
    margin-top: 5px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
    line-height: 1.4;
}

.form-control {
    width: 100%;
    padding: 15px 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 25px;
    font-size: 14px;
    transition: all 0.2s ease;
    font-family: inherit;
    background: var(--dfield_bg);
    color: rgba(255, 255, 255, 0.9);
}

.form-control:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.12);
}

.form-control::placeholder { color: rgba(255, 255, 255, 0.4); }

.btn-primary {
    width: 100%;
    padding: 15px;
    background: var(--daccent);
    border: none;
    border-radius: 25px;
    color: var(--dbutton_text);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
    margin-bottom: 10px;
}

.btn-primary:hover:not(:disabled) {
    /* background: #8de4f0; */
    background-color: #ffa075;
    color: #3d4755;
    transform: translateY(-1px);
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-loading { display: none; }

.btn-secondary {
    width: 100%;
    padding: 14px;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    color: var(--dprimary);
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 10px;
    font-family: inherit;
}

.btn-secondary:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.3);
}

.btn-secondary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.link-btn {
    background: none;
    border: none;
    color: var(--daccent);
    cursor: pointer;
    font-size: 13px;
    text-decoration: underline;
    padding: 0;
    font-family: inherit;
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    font-size: 13px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    color: rgba(255, 255, 255, 0.8);
}

.checkbox-label input[type="checkbox"] {
    margin-left: 8px;
}

.forgot-password {
    color: var(--daccent);
    text-decoration: none;
    font-size: 13px;
}

.alert {
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 20px;
    font-size: 14px;
    display: none;
}

.alert-success {
    background: rgba(76, 175, 80, 0.2);
    color: #81c784;
    border: 1px solid rgba(76, 175, 80, 0.3);
}

.alert-error {
    background: rgba(244, 67, 54, 0.2);
    color: #e57373;
    border: 1px solid rgba(244, 67, 54, 0.3);
}

.alert-info {
    background: rgba(33, 150, 243, 0.2);
    color: #64b5f6;
    border: 1px solid rgba(33, 150, 243, 0.3);
}

.otp-input {
    text-align: center;
    font-size: 24px;
    letter-spacing: 8px;
    font-weight: 600;
}

.otp-timer {
    text-align: center;
    margin: 15px 0;
    color: var(--daccent);
    font-size: 14px;
    font-weight: 500;
    min-height: 20px;
}

#resend-timer {
    font-size: 12px;
    opacity: 0.7;
}

.bottom-logo {
    margin-top: 50px;
    text-align: right;
    opacity: 0.3;
}

.bottom-logo img {
    max-width: 120px;
    height: auto;
}

@media (max-width: 768px) {
    .auth-header h1 { font-size: 20px; }
    .form-control { padding: 13px 14px; }
    .otp-input { font-size: 20px; letter-spacing: 6px; }
    .bottom-logo img { max-width: 100px; }
}
