/* =========================
   تم استراتژیک حرفه‌ای (بهبود یافته)
   ========================= */
:root {
    --bg-color: #0b1220;
    --bg-soft: #0f172a;
    --card-bg: #111827;
    --card-bg-2: #0f1b2d;
    --primary: #3b82f6;
    --secondary: #475569;
    --accent: #0ea5e9;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --border: #263247;
    --glow: rgba(59, 130, 246, 0.4);
}

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

body {
    background:
        radial-gradient(1200px 500px at 10% 0%, rgba(59,130,246,0.10), transparent 60%),
        radial-gradient(900px 500px at 90% 10%, rgba(16,185,129,0.08), transparent 65%),
        linear-gradient(180deg, #0b1220, #0f172a);
    background-attachment: fixed;
    color: var(--text-main);
    direction: rtl;
    line-height: 1.75;
    font-size: clamp(14px, 1.1vw, 16px);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;

    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

/* ساختار کلی */
.wrapper { display: flex; flex-direction: column; min-height: 100vh; }
.main-content { flex: 1; width: 100%; }

/* ===== Navbar ===== */
.navbar {
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(14px);
    padding: 16px 24px;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border);
    box-shadow: 0 8px 30px rgba(0,0,0,0.25);
    position: sticky;
    top: 0;
    z-index: 100;
    gap: 16px;
    flex-wrap: wrap;
}
.navbar > span {
    font-weight: 800;
    font-size: 1.05em;
    color: var(--accent);
    text-shadow: 0 0 10px var(--glow);
}
.navbar a { text-decoration: none; font-weight: bold; transition: all 0.25s ease; }
.navbar .nav-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-start;
}
.navbar .nav-buttons a {
    padding: 10px 16px;
    border-radius: 10px;
    font-size: 13px;
    line-height: 1.2;
    text-align: center;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.05);
}

/* ===== Layout ===== */
.container { max-width: 1280px; margin: 28px auto; padding: 0 18px; }
.grid { display: grid; gap: 22px; }
.grid-2 { grid-template-columns: 1fr 2fr; }

/* ===== Cards ===== */
.card {
    background: linear-gradient(180deg, rgba(255,255,255,0.03), rgba(0,0,0,0.12)), var(--card-bg);
    border-radius: 14px;
    box-shadow: 0 12px 30px rgba(0,0,0,0.35);
    border: 1px solid var(--border);
    overflow: hidden;
    margin-bottom: 22px;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}
@media (hover: hover) and (pointer: fine) {
    .card:hover {
        transform: translateY(-4px);
        box-shadow: 0 16px 36px rgba(0,0,0,0.45);
        border-color: #334155;
    }
}
.card-header {
    background: linear-gradient(90deg, rgba(71,85,105,0.8), transparent);
    color: white;
    padding: 14px 18px;
    font-weight: 800;
    font-size: 15px;
    border-bottom: 1px solid var(--border);
}
.card-body { padding: 18px; }

/* ===== Finance Box ===== */
.finance-box {
    background: linear-gradient(135deg, rgba(16,185,129,0.14), rgba(16,185,129,0.05));
    border: 1px solid rgba(16,185,129,0.35);
    border-radius: 12px;
    padding: 18px;
    text-align: center;
    margin-bottom: 18px;
    box-shadow: inset 0 0 18px rgba(16,185,129,0.07);
}
.finance-box h3 {
    color: var(--success);
    font-size: 26px;
    margin-bottom: 6px;
    text-shadow: 0 0 12px rgba(16,185,129,0.25);
    word-break: break-all;
}
.finance-box p {
    color: #a7f3d0;
    font-size: 13px;
    font-weight: bold;
}

/* ===== Buttons ===== */
.btn {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    padding: 11px 18px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    text-decoration: none;
    text-align: center;
    font-weight: bold;
    transition: all 0.25s ease;
    font-size: 13.5px;
    min-height: 42px;
    gap: 6px;
}
.btn:active { transform: scale(0.97); }
.btn-primary { background: linear-gradient(135deg, var(--primary), var(--accent)); color: white; box-shadow: 0 6px 16px rgba(59,130,246,0.35); }
.btn-primary:hover { background: linear-gradient(135deg, #2563eb, #0284c7); box-shadow: 0 8px 20px rgba(59,130,246,0.5); }
.btn-success { background: linear-gradient(135deg, var(--success), #059669); color: white; box-shadow: 0 6px 16px rgba(16,185,129,0.35); }
.btn-success:hover { background: linear-gradient(135deg, #059669, #047857); }
.btn-danger { background: linear-gradient(135deg, var(--danger), #dc2626); color: white; box-shadow: 0 6px 16px rgba(239,68,68,0.35); }
.btn-danger:hover { background: linear-gradient(135deg, #dc2626, #b91c1c); }
.btn-warning { background: linear-gradient(135deg, var(--warning), #d97706); color: white; box-shadow: 0 6px 16px rgba(245,158,11,0.35); }
.btn-warning:hover { background: linear-gradient(135deg, #d97706, #b45309); }
.btn-block { display: flex; width: 100%; margin-top: 12px; justify-content: center; }

/* ===== Forms ===== */
.form-group { margin-bottom: 14px; text-align: right; }
.form-group label { display: block; margin-bottom: 8px; color: var(--text-muted); font-size: 0.92em; font-weight: 800; }
.form-control {
    width: 100%;
    padding: 13px 14px;
    margin-bottom: 12px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: #0b1424;
    color: var(--text-main);
    font-family: inherit;
    transition: all 0.25s ease;
    box-shadow: inset 0 2px 6px rgba(0,0,0,0.25);
}
.form-control::placeholder { color: #64748b; }
.form-control:focus {
    outline: none;
    border-color: var(--accent);
    background: #0f172a;
    box-shadow: 0 0 0 3px rgba(14,165,233,0.2);
}
textarea.form-control { resize: vertical; min-height: 110px; }

/* ===== Lists & badges ===== */
.list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 14px;
    border-bottom: 1px solid var(--border);
    background: rgba(255,255,255,0.02);
    transition: background 0.25s;
}
.list-item:hover { background: rgba(255,255,255,0.05); }
.list-item:last-child { border-bottom: none; }

.badge {
    background: linear-gradient(135deg, #334155, #1f2937);
    color: #e2e8f0;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: bold;
    box-shadow: 0 2px 6px rgba(0,0,0,0.25);
}

/* ===== Alerts ===== */
.alert {
    padding: 14px 16px;
    margin-bottom: 18px;
    border-radius: 10px;
    text-align: center;
    font-weight: bold;
    border-right: 5px solid;
    width: 100%;
    backdrop-filter: blur(4px);
}
.alert-success { background: rgba(16,185,129,0.12); color: var(--success); border-color: var(--success); }
.alert-danger { background: rgba(239,68,68,0.12); color: var(--danger); border-color: var(--danger); }

/* ===== Modal ===== */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0; top: 0;
    width: 100%; height: 100%;
    background-color: rgba(11,18,32,0.8);
    backdrop-filter: blur(6px);
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.3s ease;
}
.modal-content {
    background: linear-gradient(180deg, rgba(255,255,255,0.03), rgba(0,0,0,0.15)), var(--card-bg);
    padding: 26px 20px;
    border-radius: 14px;
    width: 92%;
    max-width: 460px;
    border: 1px solid var(--border);
    position: relative;
    box-shadow: 0 18px 38px rgba(0,0,0,0.55);
}
.close-btn {
    position: absolute;
    top: 10px; right: 16px;
    color: var(--text-muted);
    font-size: 28px;
    cursor: pointer;
    transition: color 0.3s;
    line-height: 1;
}
.close-btn:hover { color: var(--danger); }

/* ===== Footer ===== */
.site-footer {
    background: var(--card-bg);
    border-top: 1px solid var(--border);
    padding: 22px 18px;
    text-align: center;
    color: var(--text-muted);
    font-size: 13.5px;
    margin-top: auto;
    width: 100%;
}
.site-footer p { margin-bottom: 5px; }
.site-footer a { color: var(--warning); text-decoration: none; font-weight: bold; transition: color 0.3s; }
.site-footer a:hover { color: #fcd34d; text-shadow: 0 0 6px rgba(245,158,11,0.5); }
.footer-copy { font-size: 0.85em; opacity: 0.7; margin-top: 10px !important; }

/* ===== Animations ===== */
@keyframes fadeIn { from { opacity: 0; transform: scale(0.96); } to { opacity: 1; transform: scale(1); } }

/* ===== Scrollbar ===== */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: #0b1220; }
::-webkit-scrollbar-thumb {
    background: #1f2a3a;
    border-radius: 10px;
    border: 2px solid #0b1220;
}
::-webkit-scrollbar-thumb:hover { background: #2b3a52; }

/* =====================
   Responsive (Mobile/Tablet)
   ===================== */
@media (max-width: 1200px) {
    .grid-2 { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 992px) {
    .grid-2 { grid-template-columns: 1fr; }
    .navbar { position: sticky; }
    .navbar .nav-buttons a { flex: 1 1 auto; }
}

@media (max-width: 768px) {
    .navbar { flex-direction: column; align-items: stretch; text-align: center; gap: 12px; padding: 14px; }
    .navbar .nav-buttons { width: 100%; justify-content: center; }
    .navbar .nav-buttons a { flex: 1 1 48%; }

    .container { margin: 16px auto; padding: 0 14px; }
    .card { margin-bottom: 16px; }
    .card-header { padding: 12px 14px; font-size: 14px; }
    .card-body { padding: 14px; }
    .finance-box h3 { font-size: 22px; }
    .btn { padding: 10px 14px; font-size: 13px; }
    .list-item { font-size: 13.5px; padding: 10px 12px; }
}

@media (max-width: 520px) {
    body { font-size: 13.5px; }
    .navbar > span { font-size: 0.95rem; }
    .navbar .nav-buttons a { flex: 1 1 100%; }
    .modal-content { padding: 22px 14px; }
}

/* کاهش حرکت برای کاربران حساس */
@media (prefers-reduced-motion: reduce) {
    * { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}
/* ===== Index Page Enhancements (Only Visual) ===== */
.top-nav{
    position: fixed;
    top: 16px;
    right: 20px;
    left: 20px;
    display: flex;
    justify-content: flex-end;
    z-index: 200;
    pointer-events: none;
}
.top-nav .btn{ pointer-events: auto; }

.center-content{
    min-height: 100vh;
    justify-content: center;
    padding: 90px 20px 60px;
}

.animated-logo-container{
    width: 260px;
    height: 260px;
    margin: 0 auto 28px;
    filter: drop-shadow(0 0 18px rgba(0,191,255,0.25));
}

.fighter-jet-img{
    width: 84px;
}

h1{
    letter-spacing: -0.5px;
}

.site-footer{
    margin-top: 0;
    padding-top: 28px;
}

.site-footer img{
    max-width: 160px;
    height: auto;
    margin-top: 10px;
}

@media (max-width: 768px){
    .top-nav{
        position: sticky;
        top: 0;
        padding: 10px 12px;
        background: rgba(11,18,32,0.6);
        backdrop-filter: blur(6px);
        border-bottom: 1px solid var(--border);
    }
    .center-content{
        padding: 60px 16px 40px;
    }
    .animated-logo-container{
        width: 210px;
        height: 210px;
    }
    .fighter-jet-img{ width: 70px; }
}

@media (max-width: 480px){
    .top-nav{ justify-content: center; }
    .site-footer img{ max-width: 130px; }
}
