:root {
    --ios-bg: #f2f2f7; /* خاکستری بسیار روشن آیفونی */
    --ios-card: rgba(255, 255, 255, 0.8);
    --ios-text: #000000;
    --ios-input-bg: rgba(120, 120, 128, 0.12);
    --ios-primary: #007aff; /* آبی رسمی اپل */
    --ios-error: #ff3b30;  /* قرمز رسمی اپل */
    --blur: 25px;
}

.dark-mode {
    --ios-bg: #000000;
    --ios-card: rgba(28, 28, 30, 0.7);
    --ios-text: #ffffff;
    --ios-input-bg: rgba(120, 120, 128, 0.24);
}

body.auth-page {
    margin: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Helvetica Neue", Arial, sans-serif;
    background-color: var(--ios-bg);
    transition: background-color 0.4s ease;
}

/* کارت شیشه‌ای با لبه‌های نرم آیفون */
.auth-card {
    background: var(--ios-card);
    backdrop-filter: blur(var(--blur)) saturate(180%);
    -webkit-backdrop-filter: blur(var(--blur)) saturate(180%);
    border-radius: 40px; /* لبه‌های خیلی نرم آیفون */
    padding: 50px 35px;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

/* استایل لوگو شبیه آیکون اپ */
.auth-logo {
    width: 90px;
    height: 90px;
    border-radius: 20px;
    margin-bottom: 25px;
    object-fit: cover;
}

h1 {
    font-size: 26px;
    font-weight: 700;
    letter-spacing: -0.5px;
    color: var(--ios-text);
    margin-bottom: 35px;
}

/* فیلدهای ورودی مینیمال */
.form-group {
    margin-bottom: 12px;
}

.form-group input {
    width: 100%;
    padding: 18px;
    border-radius: 14px;
    border: none;
    background: var(--ios-input-bg);
    font-size: 17px;
    color: var(--ios-text);
    outline: none;
    box-sizing: border-box;
    transition: all 0.2s ease;
}

/* دکمه آبی آیفونی */
.btn-submit {
    width: 100%;
    padding: 16px;
    background: var(--ios-primary);
    color: white;
    border: none;
    border-radius: 14px;
    font-size: 17px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 20px;
    transition: transform 0.1s ease, opacity 0.2s ease;
}

.btn-submit:active {
    transform: scale(0.97); /* حس کلیک شدن در آیفون */
    opacity: 0.8;
}

/* لینک‌های آبی */
.auth-links {
    margin-top: 25px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.auth-links a {
    color: var(--ios-primary);
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
}

/* توست پیغام خطا به رنگ قرمز آیفونی */
.ios-toast {
    position: fixed;
    top: 30px;
    background: var(--ios-error);
    color: white;
    padding: 15px 30px;
    border-radius: 25px;
    backdrop-filter: blur(10px);
    box-shadow: 0 10px 20px rgba(255, 59, 48, 0.3);
    z-index: 9999;
    font-weight: 500;
    transform: translateY(-100px);
    transition: transform 0.5s cubic-bezier(0.23, 1, 0.32, 1);
}

.ios-toast.show {
    transform: translateY(0);
}

/* سوئیچ حالت شب */
.theme-switch-wrapper {
    margin-top: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: var(--ios-text);
    font-size: 14px;
    opacity: 0.8;
}

.switch {
    width: 51px;
    height: 31px;
    position: relative;
    display: inline-block;
}

.switch input { opacity: 0; width: 0; height: 0; }

.slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: #e9e9eb;
    transition: .3s;
    border-radius: 34px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 27px; width: 27px;
    left: 2px; bottom: 2px;
    background-color: white;
    box-shadow: 0 3px 8px rgba(0,0,0,0.15);
    transition: .3s;
    border-radius: 50%;
}

input:checked + .slider { background-color: #34c759; }
input:checked + .slider:before { transform: translateX(20px); }

/* انیمیشن لرزش برای خطا */
.ios-shake {
    animation: shake 0.4s ease-in-out;
}
@keyframes shake {
    0%, 100% {transform: translateX(0);}
    25% {transform: translateX(-8px);}
    75% {transform: translateX(8px);}
}