/* =========================================================
   World War Portal — Professional Light/Dark Design System
   ========================================================= */

/* فونت فارسی آنلاین؛ در صورت نیاز می‌توانی حذفش کنی */

/* =========================
   Dark Theme — Default
   ========================= */

:root,
html[data-theme="dark"] {
    color-scheme: dark;

    --bg: #060b14;
    --bg-secondary: #09111f;
    --surface: rgba(14, 24, 41, 0.88);
    --surface-solid: #0e1829;
    --surface-secondary: #131f33;
    --surface-hover: #18263c;
    --surface-soft: rgba(255, 255, 255, 0.035);

    --primary: #3b82f6;
    --primary-hover: #2563eb;
    --primary-light: #60a5fa;
    --primary-soft: rgba(59, 130, 246, 0.14);

    --accent: #06b6d4;
    --accent-soft: rgba(6, 182, 212, 0.14);

    --success: #10b981;
    --success-soft: rgba(16, 185, 129, 0.13);

    --warning: #f59e0b;
    --warning-hover: #d97706;
    --warning-soft: rgba(245, 158, 11, 0.14);

    --danger: #ef4444;
    --danger-hover: #dc2626;
    --danger-soft: rgba(239, 68, 68, 0.13);

    --text-main: #f4f7fb;
    --text-secondary: #c6d1df;
    --text-muted: #8998ab;
    --text-inverse: #ffffff;

    --border: rgba(148, 163, 184, 0.15);
    --border-strong: rgba(148, 163, 184, 0.27);
    --input-bg: rgba(5, 12, 23, 0.76);

    --header-bg: rgba(6, 11, 20, 0.78);
    --modal-overlay: rgba(1, 5, 12, 0.82);

    --shadow-sm: 0 8px 24px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 20px 55px rgba(0, 0, 0, 0.35);
    --shadow-lg: 0 35px 100px rgba(0, 0, 0, 0.58);

    --page-gradient:
        radial-gradient(circle at 13% 5%, rgba(37, 99, 235, 0.16), transparent 34%),
        radial-gradient(circle at 88% 18%, rgba(6, 182, 212, 0.1), transparent 31%),
        radial-gradient(circle at 50% 100%, rgba(16, 185, 129, 0.06), transparent 35%),
        linear-gradient(145deg, #060b14 0%, #09111f 46%, #07101d 100%);

    --grid-color: rgba(148, 163, 184, 0.035);
    --scroll-track: #070d17;
    --scroll-thumb: #24344d;
}

/* =========================
   Light Theme
   ========================= */

html[data-theme="light"] {
    color-scheme: light;

    --bg: #f2f6fc;
    --bg-secondary: #e9f0f9;
    --surface: rgba(255, 255, 255, 0.88);
    --surface-solid: #ffffff;
    --surface-secondary: #f7f9fc;
    --surface-hover: #edf3fa;
    --surface-soft: rgba(15, 23, 42, 0.035);

    --primary: #2563eb;
    --primary-hover: #1d4ed8;
    --primary-light: #3b82f6;
    --primary-soft: rgba(37, 99, 235, 0.1);

    --accent: #0284c7;
    --accent-soft: rgba(2, 132, 199, 0.1);

    --success: #059669;
    --success-soft: rgba(5, 150, 105, 0.1);

    --warning: #d97706;
    --warning-hover: #b45309;
    --warning-soft: rgba(217, 119, 6, 0.1);

    --danger: #dc2626;
    --danger-hover: #b91c1c;
    --danger-soft: rgba(220, 38, 38, 0.09);

    --text-main: #172033;
    --text-secondary: #36445a;
    --text-muted: #64748b;
    --text-inverse: #ffffff;

    --border: rgba(51, 65, 85, 0.12);
    --border-strong: rgba(51, 65, 85, 0.22);
    --input-bg: rgba(248, 250, 252, 0.94);

    --header-bg: rgba(242, 246, 252, 0.8);
    --modal-overlay: rgba(15, 23, 42, 0.46);

    --shadow-sm: 0 8px 24px rgba(30, 64, 115, 0.08);
    --shadow-md: 0 20px 55px rgba(30, 64, 115, 0.13);
    --shadow-lg: 0 35px 90px rgba(30, 64, 115, 0.19);

    --page-gradient:
        radial-gradient(circle at 10% 3%, rgba(59, 130, 246, 0.12), transparent 32%),
        radial-gradient(circle at 90% 14%, rgba(6, 182, 212, 0.09), transparent 30%),
        linear-gradient(145deg, #f8fbff 0%, #edf4fc 48%, #f5f8fc 100%);

    --grid-color: rgba(51, 65, 85, 0.04);
    --scroll-track: #edf2f8;
    --scroll-thumb: #a8b7c9;
}

/* =========================
   Reset
   ========================= */

*,
*::before,
*::after {
    box-sizing: border-box;
}

* {
    margin: 0;
    padding: 0;
    font-family: "Vazirmatn", Tahoma, "Segoe UI", Arial, sans-serif;
}

html {
    min-height: 100%;
    scroll-behavior: smooth;
    background: var(--bg);
}

body {
    min-height: 100vh;
    min-height: 100dvh;
    overflow-x: hidden;
    position: relative;
    direction: rtl;
    color: var(--text-main);
    background: var(--page-gradient);
    background-attachment: fixed;
    line-height: 1.8;
    font-size: clamp(14px, 1vw, 16px);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    transition:
        color 0.3s ease,
        background-color 0.3s ease;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -2;
    pointer-events: none;
    opacity: 0.75;
    background-image:
        linear-gradient(var(--grid-color) 1px, transparent 1px),
        linear-gradient(90deg, var(--grid-color) 1px, transparent 1px);
    background-size: 44px 44px;
    mask-image: linear-gradient(to bottom, black, transparent 92%);
    -webkit-mask-image: linear-gradient(to bottom, black, transparent 92%);
}

button,
input,
textarea,
select {
    font: inherit;
}

button,
a {
    -webkit-tap-highlight-color: transparent;
}

img {
    max-width: 100%;
}

a {
    color: var(--primary);
}

::selection {
    color: white;
    background: var(--primary);
}

/* =========================
   Page Structure
   ========================= */

.wrapper {
    width: 100%;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    position: relative;
}

.main-content {
    width: 100%;
    flex: 1;
}

.container {
    width: min(100% - 32px, 1280px);
    margin: 30px auto;
}

.grid {
    display: grid;
    gap: 22px;
}

.grid-2 {
    grid-template-columns: minmax(280px, 1fr) minmax(0, 2fr);
}

/* =========================
   Header / Navbar
   ========================= */

.navbar {
    min-height: 74px;
    padding: 14px clamp(16px, 4vw, 34px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    flex-wrap: wrap;
    position: sticky;
    top: 0;
    z-index: 500;

    color: var(--text-main);
    background: var(--header-bg);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
    backdrop-filter: blur(18px) saturate(140%);
    -webkit-backdrop-filter: blur(18px) saturate(140%);
}

.navbar > span {
    font-size: 1.05rem;
    font-weight: 900;
    color: var(--primary);
}

.navbar a {
    text-decoration: none;
}

.nav-buttons {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 10px;
}

/* نوار بالای صفحه ورود */
.top-nav {
    width: 100%;
    min-height: 76px;
    padding: 14px clamp(15px, 4vw, 34px);
    position: fixed;
    top: 0;
    right: 0;
    left: 0;
    z-index: 500;

    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    pointer-events: none;

    background: linear-gradient(
        to bottom,
        var(--header-bg),
        transparent
    );
}

.top-nav > * {
    pointer-events: auto;
}

/* =========================
   Index Hero Section
   ========================= */

.center-content {
    width: min(100%, 1150px);
    min-height: 100vh;
    min-height: 100dvh;
    margin-inline: auto;
    padding:
        115px
        clamp(16px, 5vw, 64px)
        clamp(60px, 8vw, 100px);

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    text-align: center;
}

.center-content::before {
    content: "";
    width: min(650px, 90vw);
    aspect-ratio: 1;
    position: absolute;
    top: 10%;
    left: 50%;
    z-index: -1;
    transform: translateX(-50%);
    border-radius: 50%;
    pointer-events: none;
    background: radial-gradient(
        circle,
        var(--primary-soft),
        transparent 68%
    );
    filter: blur(20px);
}

.center-content > h1 {
    max-width: 950px;
    margin: 0 auto 18px !important;
    color: var(--text-main) !important;
    font-size: clamp(2rem, 6vw, 4.3rem) !important;
    font-weight: 900;
    line-height: 1.4 !important;
    letter-spacing: -1.6px;
    text-wrap: balance;
    text-shadow: 0 8px 30px rgba(0, 0, 0, 0.13) !important;
}

.center-content > h1 span {
    display: inline-block;
    color: transparent !important;
    background: linear-gradient(
        110deg,
        var(--primary),
        var(--accent),
        var(--primary-light),
        var(--primary)
    );
    background-size: 220% auto;
    background-clip: text;
    -webkit-background-clip: text;
    filter: drop-shadow(0 5px 18px var(--primary-soft));
    animation: titleFlow 7s linear infinite;
}

.center-content > p {
    max-width: 700px !important;
    margin: 0 auto 40px !important;
    color: var(--text-muted) !important;
    font-size: clamp(0.95rem, 2vw, 1.18rem) !important;
    font-weight: 500;
    line-height: 2;
    text-wrap: balance;
}

/* کادر دکمه عضویت */
.center-content > div[style*="display: flex"] {
    width: min(100%, 660px);
    padding: 17px;
    border: 1px solid var(--border);
    border-radius: 22px;
    background: var(--surface);
    box-shadow: var(--shadow-md);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

/* لینک روبیکا */
.center-content a[href*="rubika.ir/worldwarmarkazii"] {
    width: 62px;
    height: 62px;
    flex: 0 0 62px;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: var(--surface-secondary);
    box-shadow: var(--shadow-sm);
    transition:
        transform 0.25s ease,
        border-color 0.25s ease,
        box-shadow 0.25s ease;
}

.center-content a[href*="rubika.ir/worldwarmarkazii"] img {
    width: 45px !important;
    height: 45px !important;
    object-fit: contain;
    border-radius: 12px;
}

.center-content a[href*="rubika.ir/worldwarmarkazii"]:hover {
    transform: translateY(-4px);
    border-color: var(--primary);
    box-shadow: 0 15px 35px var(--primary-soft);
}

/* =========================
   Fighter Animation
   ========================= */

.animated-logo-container {
    width: clamp(210px, 27vw, 285px) !important;
    height: clamp(210px, 27vw, 285px) !important;
    margin: 0 auto clamp(26px, 4vw, 38px) !important;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    isolation: isolate;
}

.animated-logo-container::before {
    content: "";
    position: absolute;
    inset: 19%;
    z-index: -1;
    border-radius: 50%;
    background: radial-gradient(
        circle,
        var(--primary-soft),
        transparent 70%
    );
    box-shadow:
        0 0 70px var(--primary-soft),
        inset 0 0 30px var(--accent-soft);
    animation: centerPulse 4s ease-in-out infinite;
}

.animated-logo-container::after {
    content: "";
    position: absolute;
    inset: 3%;
    z-index: -2;
    border: 1px dashed var(--border-strong);
    border-radius: 50%;
    animation: rotate 55s linear infinite reverse;
}

.fighter-jet-img {
    width: clamp(73px, 9vw, 95px) !important;
    height: auto;
    position: relative;
    z-index: 10;
    user-select: none;
    -webkit-user-drag: none;
    filter:
        drop-shadow(0 9px 12px rgba(0, 0, 0, 0.3))
        drop-shadow(0 0 17px var(--primary));
    animation: fighterFloat 4s ease-in-out infinite;
}

.orbit-circle {
    position: absolute;
    border: 1px solid var(--border-strong) !important;
    border-radius: 50%;
    box-shadow:
        0 0 25px var(--primary-soft),
        inset 0 0 24px var(--accent-soft) !important;
}

.orbit-circle-1 {
    width: 65% !important;
    height: 65% !important;
    border-style: dashed !important;
    animation: rotate 25s linear infinite reverse;
}

.orbit-circle-2 {
    width: 89% !important;
    height: 89% !important;
    animation: rotate 35s linear infinite;
}

.dot-orbit-path {
    width: 76% !important;
    height: 76% !important;
    position: absolute;
    border-radius: 50%;
}

.path-1 {
    animation: rotate 10s linear infinite;
}

.path-2 {
    animation: rotate 12s linear infinite reverse;
}

.orbit-dot {
    position: absolute;
    top: -5px;
    left: 50%;
    width: 10px;
    height: 10px;
    transform: translateX(-50%);
    border: 2px solid var(--surface-solid);
    border-radius: 50%;
    background: var(--accent);
    box-shadow:
        0 0 10px var(--accent),
        0 0 25px var(--accent);
}

/* =========================
   Cards
   ========================= */

.card {
    margin-bottom: 22px;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 20px;
    background: var(--surface);
    box-shadow: var(--shadow-sm);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    transition:
        transform 0.3s ease,
        border-color 0.3s ease,
        box-shadow 0.3s ease;
}

.card-header {
    padding: 15px 19px;
    color: var(--text-main);
    font-size: 0.95rem;
    font-weight: 800;
    border-bottom: 1px solid var(--border);
    background:
        linear-gradient(90deg, var(--primary-soft), transparent 80%);
}

.card-body {
    padding: 20px;
}

.finance-box {
    margin-bottom: 18px;
    padding: 20px;
    text-align: center;
    border: 1px solid rgba(16, 185, 129, 0.25);
    border-radius: 17px;
    background: var(--success-soft);
}

.finance-box h3 {
    margin-bottom: 5px;
    color: var(--success);
    font-size: clamp(1.35rem, 3vw, 1.8rem);
    font-weight: 900;
    overflow-wrap: anywhere;
}

.finance-box p {
    color: var(--text-secondary);
    font-size: 0.84rem;
    font-weight: 700;
}

/* =========================
   Buttons
   ========================= */

.btn {
    min-height: 46px;
    padding: 11px 19px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    position: relative;
    overflow: hidden;
    isolation: isolate;

    border: 1px solid transparent;
    border-radius: 13px;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 800;
    line-height: 1.4;

    transition:
        transform 0.22s ease,
        box-shadow 0.22s ease,
        background 0.22s ease,
        border-color 0.22s ease,
        opacity 0.22s ease;
}

.btn::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: -100%;
    z-index: -1;
    width: 55%;
    transform: skewX(-20deg);
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.2),
        transparent
    );
    transition: left 0.6s ease;
}

.btn:hover::after {
    left: 150%;
}

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

.btn:active {
    transform: scale(0.975);
}

.btn:disabled {
    opacity: 0.58;
    cursor: wait;
    transform: none;
}

.btn-primary {
    color: white;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    box-shadow: 0 9px 24px rgba(37, 99, 235, 0.23);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-hover), var(--primary));
    box-shadow: 0 13px 30px rgba(37, 99, 235, 0.3);
}

.btn-success {
    color: white;
    background: linear-gradient(135deg, var(--success), #047857);
    box-shadow: 0 9px 24px var(--success-soft);
}

.btn-warning {
    color: white;
    background: linear-gradient(135deg, var(--warning), #b45309);
    box-shadow: 0 9px 24px var(--warning-soft);
}

.btn-danger {
    color: white;
    background: linear-gradient(135deg, var(--danger), #b91c1c);
    box-shadow: 0 9px 24px var(--danger-soft);
}

.btn-block {
    width: 100%;
    display: flex;
    margin-top: 12px;
}

/* =========================
   Forms
   ========================= */

.form-group {
    margin-bottom: 17px;
    text-align: right;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-secondary);
    font-size: 0.88rem;
    font-weight: 700;
}

.form-control {
    width: 100%;
    min-height: 50px;
    margin: 0;
    padding: 13px 15px;

    color: var(--text-main);
    caret-color: var(--primary);
    border: 1px solid var(--border-strong);
    border-radius: 13px;
    outline: none;
    background: var(--input-bg);
    box-shadow: inset 0 2px 7px rgba(0, 0, 0, 0.07);

    transition:
        border-color 0.22s ease,
        background 0.22s ease,
        box-shadow 0.22s ease,
        transform 0.22s ease;
}

.form-control::placeholder {
    color: var(--text-muted);
    opacity: 0.7;
}

.form-control:hover {
    border-color: var(--primary-light);
}

.form-control:focus {
    border-color: var(--primary);
    background: var(--surface-solid);
    box-shadow:
        0 0 0 4px var(--primary-soft),
        0 10px 25px rgba(0, 0, 0, 0.06);
    transform: translateY(-1px);
}

textarea.form-control {
    min-height: 120px;
    resize: vertical;
}

input[type="tel"],
#verifyCode {
    direction: ltr;
}

#verifyCode {
    min-height: 62px;
    padding-inline: 15px;
    text-align: center;
    font-size: 1.5rem !important;
    font-weight: 900;
    letter-spacing: 0.55em !important;
    font-variant-numeric: tabular-nums;
}

.checkbox-group {
    min-height: 53px;
    margin-bottom: 12px;
    padding: 12px 14px;
    display: flex;
    align-items: center;
    gap: 11px;

    border: 1px solid var(--border);
    border-radius: 13px;
    background: var(--surface-soft);
    transition:
        border-color 0.2s ease,
        background 0.2s ease;
}

.checkbox-group:hover {
    border-color: var(--primary-light);
    background: var(--primary-soft);
}

.checkbox-group:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-soft);
}

.checkbox-group input[type="checkbox"] {
    width: 20px;
    height: 20px;
    flex: 0 0 20px;
    margin: 0;
    cursor: pointer;
    accent-color: var(--primary);
}

.checkbox-group label {
    flex: 1;
    cursor: pointer;
    color: var(--text-secondary);
    font-size: 0.86rem;
    line-height: 1.8;
}

/* =========================
   Lists and Badges
   ========================= */

.list-item {
    padding: 13px 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 13px;
    border-bottom: 1px solid var(--border);
    background: transparent;
    transition: background 0.2s ease;
}

.list-item:hover {
    background: var(--surface-soft);
}

.list-item:last-child {
    border-bottom: 0;
}

.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 5px 11px;
    border: 1px solid var(--border);
    border-radius: 999px;
    color: var(--text-secondary);
    background: var(--surface-secondary);
    font-size: 0.75rem;
    font-weight: 800;
}

/* =========================
   Alerts
   ========================= */

.alert {
    width: 100%;
    margin-bottom: 18px;
    padding: 14px 17px;
    text-align: center;
    border: 1px solid;
    border-right-width: 4px;
    border-radius: 14px;
    font-weight: 700;
    line-height: 1.8;
    box-shadow: var(--shadow-sm);
    animation: alertEnter 0.4s ease;
}

.alert-success {
    color: var(--success);
    border-color: rgba(16, 185, 129, 0.35);
    border-right-color: var(--success);
    background: var(--success-soft);
}

.alert-danger {
    color: var(--danger);
    border-color: rgba(239, 68, 68, 0.32);
    border-right-color: var(--danger);
    background: var(--danger-soft);
}

/* =========================
   Modal
   ========================= */

.modal {
    width: 100%;
    height: 100%;
    padding: 18px;
    display: none;
    align-items: center;
    justify-content: center;
    position: fixed;
    inset: 0;
    z-index: 2000;

    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;

    background: var(--modal-overlay);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

.modal-content {
    width: min(100%, 500px);
    max-height: calc(100vh - 36px);
    max-height: calc(100dvh - 36px);
    margin: auto;
    padding: clamp(24px, 4vw, 34px);
    overflow-y: auto;
    position: relative;

    border: 1px solid var(--border-strong);
    border-radius: 24px;
    color: var(--text-main);
    background: var(--surface-solid);
    box-shadow: var(--shadow-lg);

    animation: modalEnter 0.42s cubic-bezier(0.22, 1, 0.36, 1);
}

.modal-content::before {
    content: "";
    position: absolute;
    top: 0;
    right: 15%;
    left: 15%;
    height: 2px;
    background: linear-gradient(
        90deg,
        transparent,
        var(--primary),
        var(--accent),
        transparent
    );
}

.modal-content h2 {
    padding-inline: 35px;
    line-height: 1.6;
    text-wrap: balance;
}

.close-btn {
    width: 38px;
    height: 38px;
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 4;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    color: var(--text-muted);
    border: 1px solid var(--border);
    border-radius: 11px;
    background: var(--surface-secondary);
    cursor: pointer;
    font-size: 26px;
    line-height: 1;

    transition:
        color 0.2s ease,
        background 0.2s ease,
        transform 0.2s ease;
}

.close-btn:hover {
    color: var(--danger);
    background: var(--danger-soft);
    transform: rotate(5deg);
}

#registerMessage {
    color: var(--text-secondary);
    font-size: 0.88rem;
    font-weight: 700;
    line-height: 1.8;
}

#registerMessage:not(:empty) {
    min-height: 48px;
    padding: 11px 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid currentColor;
    border-radius: 12px;
    background: var(--surface-secondary);
}

#registerStep2 a {
    padding: 8px;
    border-radius: 9px;
    text-decoration: none;
}

#registerStep2 a:hover {
    background: var(--primary-soft);
}

/* =========================
   Footer
   ========================= */

.site-footer {
    width: 100%;
    margin-top: auto;
    padding: clamp(28px, 5vw, 46px) 18px;
    position: relative;
    text-align: center;

    color: var(--text-muted);
    border-top: 1px solid var(--border);
    background: var(--surface);
    box-shadow: 0 -18px 55px rgba(0, 0, 0, 0.05);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

.site-footer::before {
    content: "";
    height: 1px;
    position: absolute;
    top: -1px;
    right: 20%;
    left: 20%;
    background: linear-gradient(
        90deg,
        transparent,
        var(--primary),
        transparent
    );
}

.site-footer p {
    margin-bottom: 5px;
    line-height: 1.9;
}

.site-footer a {
    color: var(--warning);
    text-decoration: none;
    font-weight: 800;
}

.site-footer a:hover {
    color: var(--warning-hover);
}

.footer-copy {
    margin-top: 10px !important;
    font-size: 0.82rem;
    opacity: 0.75;
}

.site-footer > a[href*="enamad"] {
    display: inline-flex;
    margin-top: 15px;
    padding: 9px;
    border: 1px solid var(--border);
    border-radius: 15px;
    background: white;
    box-shadow: var(--shadow-sm);
    transition:
        transform 0.25s ease,
        box-shadow 0.25s ease;
}

.site-footer > a[href*="enamad"]:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.site-footer > a[href*="enamad"] img {
    display: block;
    max-width: 115px;
    max-height: 125px;
    margin: 0;
    object-fit: contain;
}

/* =========================
   Theme Toggle
   ========================= */

.theme-toggle {
    min-width: 48px;
    min-height: 48px;
    padding: 7px 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    position: relative;
    z-index: 900;

    color: var(--text-main);
    border: 1px solid var(--border-strong);
    border-radius: 14px;
    background: var(--surface);
    box-shadow: var(--shadow-sm);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    cursor: pointer;

    transition:
        transform 0.22s ease,
        color 0.22s ease,
        border-color 0.22s ease,
        background 0.22s ease,
        box-shadow 0.22s ease;
}

.theme-toggle:hover {
    color: var(--primary);
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 12px 28px var(--primary-soft);
}

.theme-toggle:active {
    transform: scale(0.96);
}

.theme-toggle__icon {
    width: 23px;
    height: 23px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 23px;
}

.theme-toggle__icon svg {
    width: 100%;
    height: 100%;
    display: block;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.theme-toggle__text {
    font-size: 0.82rem;
    font-weight: 800;
    white-space: nowrap;
}

/* در پوسته تاریک خورشید و در پوسته روشن ماه نمایش داده می‌شود */
.theme-icon-sun {
    display: block;
}

.theme-icon-moon {
    display: none;
}

html[data-theme="light"] .theme-icon-sun {
    display: none;
}

html[data-theme="light"] .theme-icon-moon {
    display: block;
}

/* دکمه ثابت، در صورتی که داخل top-nav یا navbar نباشد */
.theme-toggle.theme-toggle--floating {
    position: fixed;
    right: 20px;
    bottom: 20px;
    bottom: max(20px, env(safe-area-inset-bottom));
    z-index: 1500;
}

/* =========================
   Accessibility
   ========================= */

.btn:focus-visible,
.theme-toggle:focus-visible,
.close-btn:focus-visible,
.form-control:focus-visible,
a:focus-visible {
    outline: 3px solid var(--primary-soft);
    outline-offset: 3px;
}

/* =========================
   Animations
   ========================= */

@keyframes rotate {
    from {
        transform: rotate(0);
    }
    to {
        transform: rotate(360deg);
    }
}

@keyframes titleFlow {
    to {
        background-position: 220% center;
    }
}

@keyframes fighterFloat {
    0%,
    100% {
        transform: translateY(0) rotate(-1deg);
    }
    50% {
        transform: translateY(-9px) rotate(1deg);
    }
}

@keyframes centerPulse {
    0%,
    100% {
        opacity: 0.55;
        transform: scale(0.93);
    }
    50% {
        opacity: 1;
        transform: scale(1.08);
    }
}

@keyframes modalEnter {
    from {
        opacity: 0;
        transform: translateY(24px) scale(0.965);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes alertEnter {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* =========================
   Hover-enabled Devices
   ========================= */

@media (hover: hover) and (pointer: fine) {
    .card:hover {
        transform: translateY(-4px);
        border-color: var(--border-strong);
        box-shadow: var(--shadow-md);
    }
}

/* =========================
   Tablet
   ========================= */

@media (max-width: 992px) {
    .grid-2 {
        grid-template-columns: 1fr;
    }

    .navbar .nav-buttons a {
        flex: 1 1 auto;
    }
}

/* =========================
   Mobile
   ========================= */

@media (max-width: 700px) {
    body {
        font-size: 14px;
        background-attachment: scroll;
    }

    body::before {
        background-size: 32px 32px;
    }

    .container {
        width: min(100% - 24px, 1280px);
        margin: 18px auto;
    }

    .navbar {
        padding: 13px;
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }

    .navbar .nav-buttons {
        width: 100%;
    }

    .navbar .nav-buttons a {
        flex: 1 1 46%;
    }

    .top-nav {
        min-height: 70px;
        padding: 10px 12px;
        justify-content: center;
        gap: 8px;
        background: var(--header-bg);
        border-bottom: 1px solid var(--border);
        backdrop-filter: blur(16px);
        -webkit-backdrop-filter: blur(16px);
    }

    .top-nav .btn {
        flex: 1;
        min-height: 46px;
    }

    .center-content {
        min-height: auto;
        padding: 110px 14px 50px;
    }

    .animated-logo-container {
        width: 205px !important;
        height: 205px !important;
    }

    .fighter-jet-img {
        width: 68px !important;
    }

    .center-content > h1 {
        font-size: clamp(1.8rem, 9.5vw, 2.65rem) !important;
        line-height: 1.5 !important;
        letter-spacing: -0.8px;
    }

    .center-content > h1 span {
        display: block;
    }

    .center-content > p {
        margin-bottom: 28px !important;
        font-size: 0.93rem !important;
    }

    .center-content > div[style*="display: flex"] {
        padding: 12px;
        gap: 11px !important;
    }

    .center-content .btn-warning {
        flex: 1 1 100%;
        min-height: 55px;
        padding: 13px 15px !important;
    }

    .center-content a[href*="rubika.ir/worldwarmarkazii"] {
        width: 56px;
        height: 56px;
        flex-basis: 56px;
    }

    .card {
        margin-bottom: 16px;
        border-radius: 17px;
    }

    .card-header {
        padding: 13px 15px;
    }

    .card-body {
        padding: 15px;
    }

    .list-item {
        padding: 11px 12px;
    }

    /* تبدیل مودال به Bottom Sheet */
    .modal {
        padding: 0;
        align-items: flex-end;
    }

    .modal-content {
        width: 100%;
        max-width: none;
        max-height: 92vh;
        max-height: 92dvh;
        padding:
            30px
            16px
            max(24px, env(safe-area-inset-bottom));

        border-right: 0;
        border-bottom: 0;
        border-left: 0;
        border-radius: 25px 25px 0 0;
        animation-name: mobileModalEnter;
    }

    .modal-content::after {
        content: "";
        width: 42px;
        height: 4px;
        position: absolute;
        top: 9px;
        left: 50%;
        border-radius: 999px;
        background: var(--border-strong);
        transform: translateX(-50%);
    }

    .form-control {
        min-height: 52px;
        font-size: 16px;
    }

    .checkbox-group {
        align-items: flex-start;
    }

    .checkbox-group input[type="checkbox"] {
        margin-top: 3px;
    }

    #verifyCode {
        letter-spacing: 0.4em !important;
    }

    .theme-toggle__text {
        display: none;
    }

    .theme-toggle {
        padding: 10px;
    }

    .theme-toggle.theme-toggle--floating {
        right: 13px;
        bottom: 13px;
        bottom: max(13px, env(safe-area-inset-bottom));
    }
}

@keyframes mobileModalEnter {
    from {
        opacity: 0;
        transform: translateY(100%);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 400px) {
    .navbar .nav-buttons a {
        flex-basis: 100%;
    }

    .animated-logo-container {
        width: 180px !important;
        height: 180px !important;
    }

    .center-content > h1 {
        font-size: 1.75rem !important;
    }

    .center-content > div[style*="display: flex"] {
        flex-direction: column;
    }

    .center-content a[href*="rubika.ir/worldwarmarkazii"] {
        width: 100%;
        flex-basis: 52px;
    }
}

/* =========================
   Reduced Motion
   ========================= */

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* =========================
   Scrollbar
   ========================= */

::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: var(--scroll-track);
}

::-webkit-scrollbar-thumb {
    border: 2px solid var(--scroll-track);
    border-radius: 999px;
    background: var(--scroll-thumb);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}
