/* ===== VARIABLES — همسو با داشبورد ===== */
:root {
    --p: #00ffff;
    --bg: #07090f;
    --bg2: #0d1220;
    --active: #ff00ff;
    --card: #111827;
    --card2: #161e30;
    --border: rgba(0,255,255,0.2);
    --border-hover: rgba(0,255,255,0.7);
    --glow: rgba(0,255,255,0.15);
    --text: #e2e8f0;
    --text-muted: #94a3b8;
    --radius: 16px;
    --radius-sm: 10px;
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --s: #00c851;
    --d: #e91e63;
    --w: #ff8800;
    /* auth-specific */
    --cyan: #00ffff;
    --purple: #c77dff;
    --glass: rgba(13, 18, 32, 0.97);
}

/* ===== RESET ===== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Vazirmatn', sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow-x: hidden;
    overflow-y: auto;
    touch-action: manipulation;
    position: relative;
    padding: env(safe-area-inset-top, 20px) 16px env(safe-area-inset-bottom, 20px);
}

/* Grid background — همسو با داشبورد */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background-image:
        linear-gradient(rgba(0,255,255,0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0,255,255,0.03) 1px, transparent 1px);
    background-size: 40px 40px;
    pointer-events: none;
    z-index: 0;
}

/* Ambient glow — همسو با داشبورد */
body::after {
    content: '';
    position: fixed;
    top: -20%;
    right: -10%;
    width: 50vw;
    height: 50vh;
    background: radial-gradient(ellipse, rgba(0,255,255,0.04) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

/* ===== AUTH CONTAINER ===== */
.auth-container {
    position: relative;
    z-index: 1;
    background: var(--glass);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    width: 100%;
    max-width: 460px;
    padding: clamp(20px, 5vw, 36px) clamp(16px, 4vw, 32px) clamp(24px, 5vw, 40px);
    box-shadow:
        0 0 60px rgba(0,255,255,0.12),
        0 4px 30px rgba(0,0,0,0.5);
}

/* ===== LOGO ===== */
.logo {
    font-size: clamp(32px, 9vw, 48px);
    font-weight: 900;
    text-align: center;
    background: linear-gradient(90deg, var(--p), var(--active), var(--p));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: clamp(16px, 4vw, 28px);
    letter-spacing: 2px;
}

/* ===== TABS ===== */
.tabs {
    display: flex;
    background: rgba(0,0,0,0.5);
    border-radius: 50px;
    overflow: hidden;
    border: 1px solid var(--border);
    margin-bottom: clamp(16px, 4vw, 28px);
}

.tab {
    flex: 1;
    padding: clamp(12px, 3vw, 16px);
    text-align: center;
    font-size: clamp(15px, 3.5vw, 19px);
    font-weight: 900;
    cursor: pointer;
    color: var(--text);
    transition: var(--transition);
    font-family: 'Vazirmatn', sans-serif;
}

.tab.active {
    background: linear-gradient(135deg, #00ffff 0%, #00d4ff 55%, #0099ff 100%);
    color: #001a26;
    box-shadow: 0 4px 18px rgba(0,212,255,0.5), inset 0 2px 8px rgba(255,255,255,0.22);
    text-shadow: 0 1px 6px rgba(255,255,255,0.18);
}

/* ===== SECTION TITLE & DESC ===== */
.section-title {
    font-size: clamp(18px, 4.5vw, 26px);
    font-weight: 900;
    text-align: center;
    margin: clamp(12px, 3vw, 20px) 0 8px;
    color: var(--text);
}

.section-desc {
    text-align: center;
    color: var(--text-muted);
    font-size: clamp(13px, 3vw, 16px);
    margin-bottom: clamp(14px, 3.5vw, 20px);
    line-height: 1.6;
}

/* ===== CODE DISPLAY ===== */
.code-mobile-display {
    background: rgba(0,255,255,0.1);
    border: 1px solid var(--border-hover);
    border-radius: var(--radius);
    padding: clamp(12px, 3vw, 16px);
    font-size: clamp(22px, 6vw, 29px);
    font-weight: 900;
    color: var(--p);
    letter-spacing: 4px;
    text-align: center;
    margin: clamp(16px, 4vw, 25px) auto;
    max-width: 340px;
    box-shadow: 0 0 25px rgba(0,255,255,0.2);
}

/* ===== INPUT ===== */
.input-wrapper {
    position: relative;
    margin-bottom: clamp(12px, 3vw, 20px);
}

.input-field {
    width: 100%;
    padding: clamp(14px, 3.5vw, 20px) 16px;
    background: rgba(10, 20, 50, 0.92);
    border: 1px solid var(--border-hover);
    border-radius: 28px;
    color: var(--text);
    font-size: clamp(22px, 6vw, 29px);
    font-weight: 900;
    text-align: center;
    letter-spacing: 8px;
    outline: none;
    box-shadow: 0 8px 30px rgba(0,0,0,0.4);
    backdrop-filter: blur(15px);
    caret-color: transparent;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    transition: var(--transition);
    font-family: 'Vazirmatn', sans-serif;
}

.input-field.active,
.input-field:focus {
    border-color: var(--cyan) !important;
    box-shadow: 0 0 35px rgba(0,255,255,0.6), inset 0 0 20px rgba(0,255,255,0.1) !important;
    background: rgba(10, 20, 50, 0.98) !important;
    transform: scale(1.02);
}

.input-field::placeholder {
    color: rgba(255,255,255,0.35);
    font-size: clamp(18px, 5vw, 26px);
    letter-spacing: 5px;
}

/* ===== BUTTONS — هر دکمه رنگ مخصوص خود را دارد ===== */
/* پایه: ورود به حساب (loginBtn) — فیروزه‌ای کلاسیک */
.btn-neon {
    width: 100%;
    padding: clamp(14px, 3.5vw, 18px);
    background: linear-gradient(135deg, #00ffff 0%, #00d4ff 55%, #0099ff 100%);
    background-size: 200% 200%;
    background-position: 0% 50%;
    border: none;
    border-radius: 50px;
    color: #001a26;
    font-size: clamp(16px, 4vw, 20px);
    font-weight: 900;
    cursor: pointer;
    transition: var(--transition), background-position 0.6s ease;
    margin-top: clamp(10px, 2.5vw, 15px);
    box-shadow:
        0 8px 25px rgba(0,212,255,0.45),
        0 0 35px rgba(0,255,255,0.25),
        inset 0 2px 8px rgba(255,255,255,0.25);
    text-shadow: 0 1px 6px rgba(255,255,255,0.18);
    font-family: 'Vazirmatn', sans-serif;
    letter-spacing: 0.3px;
}

.btn-neon:hover {
    transform: none;
    background-position: 100% 50%;
    box-shadow:
        0 14px 40px rgba(0,212,255,0.65),
        0 0 55px rgba(0,255,255,0.45),
        inset 0 2px 8px rgba(255,255,255,0.3);
}

.btn-neon:active {
    transform: none;
    box-shadow:
        0 6px 18px rgba(0,212,255,0.5),
        0 0 25px rgba(0,255,255,0.3),
        inset 0 2px 8px rgba(255,255,255,0.2);
}

.btn-neon:focus-visible {
    outline: 2px solid #00d4ff;
    outline-offset: 3px;
}

.btn-neon:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    transform: none;
}

/* ── دکمه «رمز عبور را فراموش کرده‌اید؟» — نارنجی → قرمز (hint) ── */
.btn-neon[onclick*='forgot_password'] {
    background: linear-gradient(135deg, #ff9500 0%, #ff6b35 55%, #ff5252 100%);
    background-size: 200% 200%;
    color: #fff;
    box-shadow:
        0 8px 25px rgba(255,107,53,0.45),
        0 0 35px rgba(255,82,82,0.28),
        inset 0 2px 8px rgba(255,255,255,0.18);
    text-shadow: 0 1px 8px rgba(0,0,0,0.4);
}
.btn-neon[onclick*='forgot_password']:hover {
    background-position: 100% 50%;
    box-shadow:
        0 14px 40px rgba(255,107,53,0.65),
        0 0 55px rgba(255,82,82,0.5),
        inset 0 2px 8px rgba(255,255,255,0.22);
}
.btn-neon[onclick*='forgot_password']:focus-visible {
    outline-color: #ff6b35;
}

/* ── #sendCodeBtn «دریافت کد تأیید» — بنفش → مجنتا (شروع ثبت‌نام) ── */
#sendCodeBtn.btn-neon {
    background: linear-gradient(135deg, #9d4edd 0%, #ff2d95 55%, #ff00ff 100%);
    background-size: 200% 200%;
    color: #fff;
    box-shadow:
        0 8px 25px rgba(199,77,221,0.5),
        0 0 35px rgba(255,45,149,0.3),
        inset 0 2px 8px rgba(255,255,255,0.18);
    text-shadow: 0 1px 8px rgba(0,0,0,0.35);
}
#sendCodeBtn.btn-neon:hover {
    background-position: 100% 50%;
    box-shadow:
        0 14px 40px rgba(199,77,221,0.7),
        0 0 55px rgba(255,45,149,0.5),
        inset 0 2px 8px rgba(255,255,255,0.22);
}
/* ── چک‌باکس «پذیرش قوانین و مقررات» — بخش ثبت‌نام ── */
.terms-check {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    width: 100%;
    margin-top: clamp(10px, 2.5vw, 14px);
    margin-bottom: clamp(6px, 2vw, 10px);
    cursor: pointer;
    user-select: none;
}
.terms-check input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}
.terms-box {
    flex-shrink: 0;
    width: 19px;
    height: 19px;
    margin-top: 1px;
    border: 2px solid var(--cyan, #00d4ff);
    border-radius: 5px;
    background: transparent;
    position: relative;
    transition: background .2s ease, box-shadow .2s ease;
}
.terms-check input[type="checkbox"]:checked + .terms-box {
    background: var(--cyan, #00d4ff);
    box-shadow: 0 0 8px var(--cyan, #00d4ff);
}
.terms-check input[type="checkbox"]:checked + .terms-box::after {
    content: '';
    position: absolute;
    left: 5px;
    top: 1px;
    width: 5px;
    height: 10px;
    border: solid #0a0a1f;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}
.terms-check input[type="checkbox"]:focus-visible + .terms-box {
    outline: 2px solid var(--cyan, #00d4ff);
    outline-offset: 2px;
}
.terms-text {
    font-size: clamp(12.5px, 3vw, 14px);
    color: var(--text-secondary, #9ca3af);
    line-height: 1.6;
}
.terms-text a {
    color: var(--cyan, #00d4ff);
    text-decoration: none;
}
.terms-text a:hover,
.terms-text a:focus-visible {
    text-decoration: underline;
}

#sendCodeBtn.btn-neon:focus-visible {
    outline-color: #ff2d95;
}

/* ── #verifyCodeBtn «تأیید کد» — سبز فسفری (confirm) ── */
#verifyCodeBtn.btn-neon {
    background: linear-gradient(135deg, #00ff88 0%, #00d4aa 55%, #00b894 100%);
    background-size: 200% 200%;
    color: #001a0d;
    box-shadow:
        0 8px 25px rgba(0,255,136,0.5),
        0 0 35px rgba(0,212,170,0.3),
        inset 0 2px 8px rgba(255,255,255,0.28);
    text-shadow: 0 1px 6px rgba(255,255,255,0.18);
}
#verifyCodeBtn.btn-neon:hover {
    background-position: 100% 50%;
    box-shadow:
        0 14px 40px rgba(0,255,136,0.7),
        0 0 55px rgba(0,212,170,0.5),
        inset 0 2px 8px rgba(255,255,255,0.32);
}
#verifyCodeBtn.btn-neon:focus-visible {
    outline-color: #00ff88;
}

/* ── #completeRegisterBtn «ثبت‌نام و ورود» — طلایی → نارنجی (celebrate) ── */
#completeRegisterBtn.btn-neon {
    background: linear-gradient(135deg, #ffd700 0%, #ffa500 55%, #ff8c00 100%);
    background-size: 200% 200%;
    color: #2a1500;
    box-shadow:
        0 8px 25px rgba(255,165,0,0.55),
        0 0 35px rgba(255,215,0,0.4),
        inset 0 2px 8px rgba(255,255,255,0.32);
    text-shadow: 0 1px 6px rgba(255,255,255,0.28);
}
#completeRegisterBtn.btn-neon:hover {
    background-position: 100% 50%;
    box-shadow:
        0 14px 40px rgba(255,165,0,0.75),
        0 0 55px rgba(255,215,0,0.6),
        inset 0 2px 8px rgba(255,255,255,0.38);
}
#completeRegisterBtn.btn-neon:focus-visible {
    outline-color: #ffa500;
}

/* ===== GLOBAL MESSAGE ===== */
.global-message {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    min-width: 280px;
    max-width: 90%;
    padding: clamp(12px, 3vw, 16px) clamp(20px, 5vw, 32px);
    border-radius: 50px;
    font-size: clamp(14px, 3.5vw, 18px);
    font-weight: bold;
    text-align: center;
    z-index: 9999;
    opacity: 0;
    transition: all 0.5s ease;
    box-shadow: 0 10px 40px rgba(0,0,0,0.6);
    pointer-events: none;
    font-family: 'Vazirmatn', sans-serif;
}

.global-message.show {
    opacity: 1;
    transform: translateX(-50%);
}

.global-message.success {
    background: linear-gradient(90deg, #00ff9d, #00c48c);
    color: #000;
    border: 1px solid #00ff9d;
}

.global-message.error {
    background: linear-gradient(90deg, #ff6b6b, #ff8c8c);
    color: #fff;
    border: 1px solid #ff6b6b;
}

/* ===== VIRTUAL KEYBOARD ===== */
.virtual-keyboard {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: clamp(10px, 3vw, 18px);
    max-width: 380px;
    margin: clamp(20px, 5vw, 35px) auto clamp(16px, 4vw, 28px);
    padding: clamp(16px, 4vw, 32px) clamp(12px, 3vw, 20px);
    background: rgba(10, 15, 40, 0.94);
    border-radius: 32px;
    border: 1px solid var(--border-hover);
    box-shadow: 0 0 50px rgba(0,255,255,0.15);
}

.key {
    aspect-ratio: 1;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(0,255,255,0.5);
    border-radius: clamp(14px, 3.5vw, 24px);
    color: var(--text);
    font-size: clamp(24px, 7vw, 36px);
    font-weight: 900;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    font-family: 'Vazirmatn', sans-serif;
}

.key::before {
    content: '';
    position: absolute;
    top: 50%;
    left: -100%;
    width: 35%;
    height: 220%;
    background: linear-gradient(90deg, transparent, rgba(0,255,255,0.95), transparent);
    transform: translateY(-50%) rotate(12deg);
    opacity: 0;
    pointer-events: none;
    z-index: 2;
}

.key::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: radial-gradient(circle at 40% 50%, rgba(0,255,255,0.7), transparent 60%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: 1;
}

.key.pressed {
    background: var(--cyan);
    color: #000;
    transform: scale(0.90);
    box-shadow: 0 0 40px #00ffff, inset 0 0 20px rgba(0,0,0,0.4);
    border-color: #00ffff;
}

.key.pressed::before { animation: neonStrike 0.65s cubic-bezier(0.25,0.7,0.4,1) forwards; }
.key.pressed::after { opacity: 1; }

@keyframes neonStrike {
    0%   { left: -100%; opacity: 0; }
    50%  { opacity: 1; }
    100% { left: 120%; opacity: 0; }
}

.backspace {
    border-color: rgba(255, 107, 107, 0.6);
    background: rgba(255,80,80,0.15);
    color: #ffaaaa;
    font-size: clamp(18px, 5vw, 28px);
}

.clear {
    border-color: rgba(255,204,0,0.5);
    background: rgba(255,180,0,0.15);
    color: #ffeeaa;
    font-size: clamp(11px, 3vw, 18px);
}

/* ===== TIMER ===== */
.timer-container {
    text-align: center;
    margin: clamp(16px, 4vw, 28px) 0 clamp(10px, 2.5vw, 15px);
}

.timer-label {
    color: var(--text-muted);
    font-size: clamp(13px, 3vw, 17px);
    margin-bottom: 8px;
}

.timer-text {
    font-family: 'Courier New', monospace;
    font-size: clamp(22px, 6vw, 28px);
    font-weight: bold;
    color: var(--p);
    letter-spacing: 5px;
}

/* ===== RESEND & CHANGE MOBILE ===== */
/* ── ارسال مجدد کد — آبی info ── */
.resend-btn {
    display: none;
    width: 100%;
    padding: clamp(13px, 3.5vw, 16px);
    background: linear-gradient(135deg, #4dabf7 0%, #339af0 55%, #1c7ed6 100%);
    background-size: 200% 200%;
    background-position: 0% 50%;
    border: none;
    border-radius: 50px;
    color: #fff;
    font-size: clamp(15px, 4vw, 18px);
    font-weight: 900;
    cursor: pointer;
    margin-top: 20px;
    box-shadow:
        0 8px 25px rgba(77,171,247,0.5),
        0 0 32px rgba(28,126,214,0.32),
        inset 0 2px 8px rgba(255,255,255,0.2);
    text-shadow: 0 1px 6px rgba(0,0,0,0.35);
    font-family: 'Vazirmatn', sans-serif;
    transition: var(--transition), background-position 0.6s ease;
}

.resend-btn:hover {
    transform: none;
    background-position: 100% 50%;
    box-shadow:
        0 14px 38px rgba(77,171,247,0.65),
        0 0 50px rgba(28,126,214,0.5),
        inset 0 2px 8px rgba(255,255,255,0.25);
}

.resend-btn:focus-visible {
    outline: 2px solid #339af0;
    outline-offset: 3px;
}

.resend-btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    transform: none;
}

/* ── تغییر شماره موبایل — outline صورتی-قرمز (هشدار ملایم) ── */
.change-mobile-btn {
    width: 100%;
    padding: clamp(13px, 3.5vw, 16px);
    background: rgba(255,107,107,0.08);
    border: 1.5px solid rgba(255,107,107,0.45);
    border-radius: 50px;
    color: #ff8a8a;
    font-size: clamp(15px, 4vw, 18px);
    font-weight: bold;
    text-align: center;
    margin-top: clamp(16px, 4vw, 30px);
    cursor: pointer;
    font-family: 'Vazirmatn', sans-serif;
    transition: var(--transition);
}

.change-mobile-btn:hover {
    background: rgba(255,107,107,0.18);
    border-color: #ff6b6b;
    color: #ff6b6b;
    box-shadow: 0 0 28px rgba(255,107,107,0.4);
    transform: none;
}

.change-mobile-btn:focus-visible {
    outline: 2px solid #ff6b6b;
    outline-offset: 3px;
}

/* ── لینک «رمز فراموش‌شده» داخل متن (در صورت وجود) ── */
.forgot-link {
    display: block;
    text-align: center;
    margin-top: clamp(14px, 3.5vw, 22px);
    color: #ff9500;
    font-size: clamp(14px, 3.5vw, 17px);
    font-weight: bold;
    text-decoration: none;
    transition: var(--transition);
}

.forgot-link:hover {
    text-decoration: underline;
    color: #ff5252;
}

/* ===== SCROLLBAR — همسو با داشبورد ===== */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: rgba(0,255,255,0.3); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(0,255,255,0.6); }

/* ════════════════════════════════════════════════════════
   RESPONSIVE BREAKPOINTS — کامل برای همه دستگاه‌ها
   ════════════════════════════════════════════════════════ */

/* ── موبایل بسیار کوچک ≤360px (مثلاً Galaxy Fold بسته، iPhone SE قدیمی) ── */
@media (max-width: 360px) {
    body {
        padding: 12px 8px;
        align-items: flex-start;
        padding-top: 20px;
    }
    .auth-container {
        padding: 16px 12px 20px;
        border-radius: var(--radius-sm);
        max-width: 100%;
    }
    .logo {
        font-size: 26px;
        margin-bottom: 14px;
        letter-spacing: 1px;
    }
    .tabs {
        margin-bottom: 14px;
    }
    .tab {
        padding: 10px;
        font-size: 14px;
    }
    .section-title {
        font-size: 16px;
        margin: 10px 0 6px;
    }
    .section-desc {
        font-size: 12px;
        margin-bottom: 12px;
    }
    .input-field {
        padding: 12px 14px;
        font-size: 19px;
        letter-spacing: 5px;
        border-radius: 22px;
    }
    .input-field::placeholder {
        font-size: 15px;
        letter-spacing: 3px;
    }
    .btn-neon, .resend-btn, .change-mobile-btn {
        padding: 12px;
        font-size: 14px;
    }
    .virtual-keyboard {
        gap: 7px;
        padding: 10px 8px;
        margin: 16px auto 12px;
        border-radius: 22px;
    }
    .key {
        font-size: 20px;
        border-radius: 12px;
    }
    .backspace { font-size: 16px; }
    .clear { font-size: 10px; }
    .code-mobile-display {
        font-size: 19px;
        letter-spacing: 2px;
        padding: 10px;
    }
    .timer-text { font-size: 20px; letter-spacing: 3px; }
}

/* ── موبایل کوچک 361–480px (iPhone 13 mini و …) ── */
@media (min-width: 361px) and (max-width: 480px) {
    body {
        align-items: center;
        padding-bottom: env(safe-area-inset-bottom, 16px);
    }
    .auth-container {
        max-width: 100%;
        padding: 22px 18px 26px;
        border-radius: 22px;
    }
    .virtual-keyboard {
        max-width: 100%;
    }
}

/* ── موبایل بزرگ / تبلت کوچک 481–640px (iPhone Pro Max، Pixel و …) ── */
@media (min-width: 481px) and (max-width: 640px) {
    body {
        align-items: center;
    }
    .auth-container {
        max-width: 440px;
        padding: 26px 22px 30px;
    }
    .virtual-keyboard {
        max-width: 360px;
    }
}

/* ── تبلت 641–900px (iPad mini، Surface Go و …) ── */
@media (min-width: 641px) and (max-width: 900px) {
    body {
        align-items: center;
        padding: 32px 20px;
    }
    .auth-container {
        max-width: 480px;
        padding: 32px 28px 36px;
    }
    .logo {
        font-size: 44px;
    }
    .virtual-keyboard {
        max-width: 400px;
        gap: 14px;
        padding: 24px 18px;
    }
    .input-field {
        font-size: 26px;
    }
    .section-title {
        font-size: 22px;
    }
    .section-desc {
        font-size: 15px;
    }
}

/* ── تبلت بزرگ / لپ‌تاپ 901–1199px (iPad Pro، MacBook Air و …) ── */
@media (min-width: 901px) and (max-width: 1199px) {
    body {
        align-items: center;
        padding: 40px 24px;
    }
    .auth-container {
        max-width: 500px;
        padding: 36px 32px 40px;
    }
    .logo {
        font-size: 46px;
    }
    .virtual-keyboard {
        max-width: 420px;
    }
}

/* ── دسکتاپ 1200–1399px ── */
@media (min-width: 1200px) and (max-width: 1399px) {
    .auth-container {
        max-width: 520px;
        padding: 38px 34px 42px;
    }
    .logo {
        font-size: 48px;
    }
    .virtual-keyboard {
        max-width: 440px;
    }
}

/* ── دسکتاپ بزرگ ≥1400px (4K، iMac و …) ── */
@media (min-width: 1400px) {
    .auth-container {
        max-width: 540px;
        padding: 40px 36px 44px;
    }
    .logo {
        font-size: 52px;
        letter-spacing: 3px;
    }
    .virtual-keyboard {
        max-width: 460px;
        gap: 16px;
    }
}

/* ── ارتفاع کم (موبایل افقی / لپ‌تاپ نازک) ── */
@media (max-height: 720px) and (min-width: 480px) {
    body {
        align-items: flex-start;
        padding-top: 16px;
    }
    .logo {
        margin-bottom: 12px;
    }
    .virtual-keyboard {
        margin-top: 14px;
        padding-top: 14px;
        padding-bottom: 14px;
    }
}

/* ── ارتفاع بسیار کم (مثلاً تلفن چرخیده افقی) ── */
@media (max-height: 500px) and (orientation: landscape) {
    body {
        align-items: flex-start;
        padding: 12px 16px;
    }
    .auth-container {
        max-width: 90%;
        padding: 16px 20px 20px;
    }
    .logo {
        font-size: 26px;
        margin-bottom: 10px;
    }
    .tabs {
        margin-bottom: 10px;
    }
    .section-title {
        font-size: 16px;
        margin: 6px 0 4px;
    }
    .section-desc {
        font-size: 12px;
        margin-bottom: 8px;
    }
    .virtual-keyboard {
        margin: 12px auto 10px;
        padding: 10px;
        gap: 6px;
    }
    .key {
        font-size: 18px;
    }
}

/* ── دستگاه‌های با امکان hover (دسکتاپ/لپ‌تاپ): hover effects کیبرد ── */
@media (hover: hover) {
    .key:hover {
        background: rgba(0,255,255,0.18);
        border-color: rgba(0,255,255,0.8);
        transform: none;
    }
}

/* ── احترام به prefers-reduced-motion ── */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}


/* بدون پرش/زوم هنگام هاور روی دکمه‌ها و لینک‌های عملیاتی */
a.button:hover, button:hover, .btn:hover, .btn-buy:hover, .btn-outline:hover,
.guest-btn:hover, .success-btn:hover, .back-btn:hover, .footer-link-btn:hover,
.login-prompt-btn:hover, .artist-cta-btn:hover, .new-ticket-btn:hover,
button[type="submit"]:hover, .filter-btn:hover, .nav-chip:hover {
    transform: none !important;
}

/* بهبود اضافی ریسپانسیو برای صفحه‌های ورود/ثبت‌نام — همسو با سایر صفحات */
@media (max-width: 480px) {
    .auth-container {
        margin: 0 auto;
        width: 100%;
        box-sizing: border-box;
    }
    .virtual-keyboard {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }
    .key {
        min-height: 44px; /* touch target بهتر */
        touch-action: manipulation;
    }
    body {
        padding-left: max(8px, env(safe-area-inset-left));
        padding-right: max(8px, env(safe-area-inset-right));
        padding-bottom: max(12px, env(safe-area-inset-bottom));
    }
}
