/* basic.css - FINAL CORE VERSION (Global Reset, Body, Modal Only) */

/* =========================================
   1. Tokens & Variables
   ========================================= */
:root {
    color-scheme: light dark;
    --font-sans: "IRANYekan", "Vazirmatn", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

    /* Layout Dimensions */
    --container-max: 1240px;
    --container-padding: 24px;

    /* Colors - Light Mode */
    --bg-body: #f5f5f7;
    --bg-header: rgba(255, 255, 255, 0.95);
    --text-primary: #1d1d1f;
    --text-secondary: #6e6e73;
    --border-subtle: rgba(0, 0, 0, 0.08);
    --input-bg: rgba(118, 118, 128, 0.12);

    /* Accent Colors */
    --accent: #182B5B;
    /* Apple Blue */
    --btn-text: #ffffff;
    --danger: #ef4444;

    /* Visual Effects */
    --blur: blur(20px) saturate(180%);
    --transition: 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

[data-theme="dark"] {
    color-scheme: dark;
    --bg-body: #000000;
    --bg-header: rgba(30, 30, 30, 0.9);
    --text-primary: #f5f5f7;
    --text-secondary: #86868b;
    --border-subtle: rgba(255, 255, 255, 0.12);
    --input-bg: rgba(255, 255, 255, 0.12);
    --accent: #E8457A;
}

/* =========================================
   2. Reset & Sticky Footer Layout
   ========================================= */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    height: 100%;
    margin: 0;
    padding: 0;
}

body {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    width: 100%;
    display: flex;
    flex-direction: column;
    direction: rtl;
    font-family: var(--font-sans);
    background-color: var(--bg-body);
    color: var(--text-primary);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    /* فضای خالی بالای صفحه برای هدر ثابت */
    padding-top: 130px;
}

@media (max-width: 768px) {
    body {
        padding-top: 110px;
    }

    :root {
        --container-padding: 16px;
    }
}

main {
    flex: 1 0 auto;
    width: 100%;
    display: block;
}

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

button {
    border: none;
    background: none;
    font-family: inherit;
    cursor: pointer;
    padding: 0;
}

ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

input {
    font-family: inherit;
}

.ltr-text {
    direction: ltr;
    display: inline-block;
    font-family: sans-serif;
}


/* =========================================
   3. Modal System (General)
   ========================================= */
.modal-overlay {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-container {
    background: var(--bg-header);
    width: 100%;
    max-width: 480px;
    border-radius: 24px;
    padding: 2rem;
    transform: scale(0.95);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    max-height: 90vh;
    overflow-y: auto;
    border: 1px solid var(--border-subtle);
    position: relative;
}

.modal-overlay.active .modal-container {
    transform: scale(1);
    opacity: 1;
}

.close-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--input-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: 1rem;
    left: 1rem;
    cursor: pointer;
    transition: 0.2s;
    color: var(--text-secondary);
}

.close-btn:hover {
    background-color: rgba(239, 68, 68, 0.1);
    color: var(--danger);
}

.icon-box {
    width: 36px;
    height: 36px;
    background: var(--bg-header);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-subtle);
}

.action-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.official-btn {
    width: 100%;
    background: rgba(239, 68, 68, 0.08);
    color: var(--danger);
    padding: 1rem;
    border-radius: 12px;
    font-weight: 600;
    text-align: center;
    border: 1px dashed var(--danger);
    transition: 0.2s;
    cursor: pointer;
}

.official-info {
    margin-top: 10px;
    padding: 15px;
    background: var(--bg-body);
    border-radius: 12px;
    border: 1px solid var(--border-subtle);
    display: none;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.divider {
    height: 1px;
    background: var(--border-subtle);
    margin: 1.5rem 0;
    position: relative;
}