/* ============================================
   ابزارشیر - استایل کامل با رنگ‌های آبی و نارنجی
   ============================================ */

/* ===== تعریف فونت وزیرمتن ===== */
@font-face {
    font-family: 'Vazirmatn';
    src: url('../fonts/Vazirmatn.woff2') format('woff2');
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}

:root {
    --primary: #2563EB;
    --primary-dark: #1D4ED8;
    --primary-light: #60A5FA;
    --primary-gradient: linear-gradient(135deg, #2563EB, #3B82F6);
    --secondary: #F97316;
    --secondary-light: #FB923C;
    --secondary-gradient: linear-gradient(135deg, #F97316, #FB923C);
    --success: #22C55E;
    --warning: #F59E0B;
    --danger: #EF4444;
    --gray-50: #F8FAFC;
    --gray-100: #F1F5F9;
    --gray-200: #E2E8F0;
    --gray-300: #94A3B8;
    --gray-400: #64748B;
    --gray-500: #1E293B;
    --radius: 12px;
    --radius-sm: 8px;
    --radius-full: 9999px;
    --shadow: 0 4px 24px rgba(37, 99, 235, 0.08);
    --shadow-hover: 0 8px 40px rgba(37, 99, 235, 0.15);
    --shadow-lg: 0 20px 60px rgba(0,0,0,0.08);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --font: 'Vazirmatn', 'Tahoma', 'Arial', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    text-decoration: none !important;
}

a {
    text-decoration: none !important;
    color: inherit;
}

a:hover {
    text-decoration: none !important;
}

body {
    background: #F0F4F8;
    color: var(--gray-500);
    direction: rtl;
    min-height: 100vh;
    line-height: 1.6;
    font-family: var(--font);
    padding-bottom: 80px;
    overflow-x: hidden;
}

.app-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px;
}

/* ===== اسکرول ===== */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--gray-100); }
::-webkit-scrollbar-thumb { background: var(--primary-light); border-radius: var(--radius-full); }
::-webkit-scrollbar-thumb:hover { background: var(--primary); }

/* ============================================
   هدر
   ============================================ */
.header {
    background: var(--primary-gradient);
    padding: 12px 16px;
    padding-top: calc(12px + var(--safe-top, 0px));
    color: white;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 4px 30px rgba(37, 99, 235, 0.3);
}
.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}
.logo {
    font-size: 20px;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 6px;
    color: white;
    flex-shrink: 0;
}
.logo i { font-size: 24px; }
.logo span { color: var(--secondary); }

/* ===== دکمه‌ها ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    font-family: var(--font);
}
.btn-primary {
    background: var(--primary-gradient);
    color: white;
    box-shadow: 0 4px 20px rgba(37, 99, 235, 0.3);
}
.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(37, 99, 235, 0.4);
}
.btn-secondary {
    background: var(--secondary-gradient);
    color: white;
    box-shadow: 0 4px 20px rgba(249, 115, 22, 0.3);
}
.btn-secondary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(249, 115, 22, 0.4);
}
.btn-success {
    background: var(--success);
    color: white;
}
.btn-success:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 20px rgba(34, 197, 94, 0.3);
}
.btn-danger {
    background: var(--danger);
    color: white;
}
.btn-danger:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 20px rgba(239, 68, 68, 0.3);
}
.btn-outline {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
}
.btn-outline:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-3px);
}

/* ============================================
   مودال (پاپ‌آپ)
   ============================================ */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(8px);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.modal-overlay.active {
    display: flex;
    animation: modalFadeIn 0.3s ease;
}
@keyframes modalFadeIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

.modal-content {
    background: white;
    border-radius: var(--radius);
    max-width: 520px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    padding: 28px 24px;
    box-shadow: var(--shadow-lg);
    position: relative;
}
.modal-content .modal-close {
    position: absolute;
    top: 12px;
    left: 12px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: var(--gray-100);
    cursor: pointer;
    font-size: 16px;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}
.modal-content .modal-close:hover {
    background: var(--gray-200);
    transform: rotate(90deg);
}
.modal-content .modal-icon {
    font-size: 48px;
    display: block;
    text-align: center;
    margin-bottom: 12px;
}
.modal-content .modal-title {
    font-size: 20px;
    font-weight: 700;
    text-align: center;
    color: var(--gray-500);
    margin-bottom: 8px;
}
.modal-content .modal-text {
    font-size: 14px;
    color: var(--gray-400);
    text-align: center;
    line-height: 1.8;
    margin-bottom: 20px;
}
.modal-content .modal-text ul {
    text-align: right;
    padding-right: 20px;
    margin: 8px 0;
}
.modal-content .modal-text ul li {
    margin-bottom: 4px;
}
.modal-content .modal-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}
.modal-content .modal-actions .btn {
    min-width: 100px;
    padding: 10px 24px;
}

/* ============================================
   ریسپانسیو
   ============================================ */
@media (max-width: 768px) {
    .app-container { padding: 0 12px; }
    .logo { font-size: 17px; }
    .logo i { font-size: 20px; }
    .modal-content { padding: 20px 16px; margin: 10px; }
}
@media (max-width: 480px) {
    .app-container { padding: 0 8px; }
    .logo { font-size: 15px; }
    .logo i { font-size: 17px; }
    .modal-content { padding: 16px 12px; }
    .modal-content .modal-title { font-size: 17px; }
    .modal-content .modal-text { font-size: 13px; }
}
