/* ============================================
   BASE STYLES - Novix Website
   مینیمال، حرفه‌ای، سریع
   ============================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ===== متغیرهای رنگ (تم تیره پیش‌فرض) ===== */
:root {
    --bg-primary: #0D0D1A;
    --bg-secondary: #131425;
    --bg-card: #181A2B;
    --bg-card-hover: #1E2035;
    --bg-input: #1A1C2E;
    
    --text-primary: #E8EAF0;
    --text-secondary: #8E9099;
    --text-muted: #5A5C6A;
    
    --border-color: #2A2C3E;
    --border-light: #35384A;
    
    --accent: #6C3CE1;
    --accent-light: #8B5CF6;
    --accent-dark: #4F2BA8;
    --accent-glow: rgba(108, 60, 225, 0.15);
    
    --success: #10B981;
    --warning: #F59E0B;
    --danger: #EF4444;
    --info: #06B6D4;
    
    --radius: 12px;
    --radius-lg: 20px;
    --radius-xl: 28px;
    
    --shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
    --shadow-hover: 0 8px 50px rgba(0, 0, 0, 0.4);
    
    --transition: 0.25s cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* ===== تم روشن ===== */
[data-theme="light"] {
    --bg-primary: #F0F0F5;
    --bg-secondary: #E8E8F0;
    --bg-card: #FFFFFF;
    --bg-card-hover: #F5F5FA;
    --bg-input: #EDEDF5;
    
    --text-primary: #1A1A2E;
    --text-secondary: #4A4A6A;
    --text-muted: #8A8AA0;
    
    --border-color: #D8D8E0;
    --border-light: #C8C8D0;
    
    --shadow: 0 4px 30px rgba(0, 0, 0, 0.06);
    --shadow-hover: 0 8px 50px rgba(0, 0, 0, 0.1);
}

/* ===== ریسپانسیو: تنظیمات پایه ===== */
html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: 'Vazirmatn', 'Inter', system-ui, -apple-system, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    min-height: 100dvh;
    line-height: 1.7;
    transition: background var(--transition), color var(--transition);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ===== کانتینر اصلی ===== */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 1rem 1.5rem 2rem;
    width: 100%;
}

/* ===== اسکرول بار ===== */
::-webkit-scrollbar {
    width: 4px;
    height: 4px;
}
::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}
::-webkit-scrollbar-thumb {
    background: var(--accent);
    border-radius: 10px;
}

/* ===== انتخاب متن ===== */
::selection {
    background: var(--accent);
    color: white;
}

/* ============================================
   HEADINGS & TYPOGRAPHY
   ============================================ */

.section-title {
    text-align: center;
    margin-bottom: 2.5rem;
}

.section-title .label {
    display: inline-block;
    font-size: 0.6rem;
    font-weight: 700;
    color: var(--accent-light);
    letter-spacing: 2px;
    text-transform: uppercase;
    background: var(--accent-glow);
    padding: 0.2rem 1rem;
    border-radius: 50px;
    border: 1px solid rgba(108, 60, 225, 0.08);
    margin-bottom: 0.5rem;
}

.section-title h2 {
    font-size: clamp(1.6rem, 4vw, 2.4rem);
    font-weight: 800;
    line-height: 1.2;
}

.section-title h2 span {
    background: linear-gradient(135deg, var(--accent-light), var(--info));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-title p {
    color: var(--text-secondary);
    font-size: clamp(0.85rem, 1.2vw, 1rem);
    margin-top: 0.4rem;
}

.section-title .line {
    width: 50px;
    height: 2.5px;
    background: linear-gradient(90deg, var(--accent), var(--accent-light));
    border-radius: 10px;
    margin: 0.8rem auto 0;
}

/* ============================================
   REVEAL ANIMATION (سبک و سریع)
   ============================================ */

.reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ============================================
   BUTTONS
   ============================================ */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    padding: 0.7rem 2rem;
    border-radius: 50px;
    font-weight: 700;
    font-size: clamp(0.8rem, 1vw, 0.9rem);
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all var(--transition);
    font-family: 'Vazirmatn', sans-serif;
    position: relative;
    overflow: hidden;
    min-height: 44px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent), var(--accent-dark));
    color: white;
    box-shadow: 0 4px 25px var(--accent-glow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 40px rgba(108, 60, 225, 0.25);
}

.btn-primary:active {
    transform: scale(0.97);
}

.btn-secondary {
    background: var(--bg-card);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-light);
    transform: translateY(-2px);
}

.btn-secondary:active {
    transform: scale(0.97);
}

.btn-success {
    background: linear-gradient(135deg, var(--success), #059669);
    color: white;
    box-shadow: 0 4px 20px rgba(16, 185, 129, 0.15);
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(16, 185, 129, 0.25);
}

.btn-danger {
    background: linear-gradient(135deg, var(--danger), #DC2626);
    color: white;
    box-shadow: 0 4px 20px rgba(239, 68, 68, 0.15);
}

.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(239, 68, 68, 0.25);
}

.btn-warning {
    background: linear-gradient(135deg, var(--warning), #D97706);
    color: white;
    box-shadow: 0 4px 20px rgba(245, 158, 11, 0.15);
}

.btn-warning:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(245, 158, 11, 0.25);
}

.btn-info {
    background: linear-gradient(135deg, var(--info), #0891B2);
    color: white;
    box-shadow: 0 4px 20px rgba(6, 182, 212, 0.15);
}

.btn-info:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(6, 182, 212, 0.25);
}

.btn-sm {
    padding: 0.4rem 1.2rem;
    font-size: 0.75rem;
    min-height: 34px;
}

.btn-lg {
    padding: 0.9rem 2.5rem;
    font-size: 1rem;
    min-height: 52px;
}

.btn-outline-secondary {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

.btn-outline-secondary:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-light);
    color: var(--text-primary);
}

/* ============================================
   ALERTS
   ============================================ */

.alert {
    padding: 0.8rem 1.2rem;
    border-radius: var(--radius);
    margin-bottom: 1rem;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    border: 1px solid transparent;
}

.alert-success {
    background: rgba(16, 185, 129, 0.08);
    color: var(--success);
    border-color: rgba(16, 185, 129, 0.1);
}

.alert-error {
    background: rgba(239, 68, 68, 0.08);
    color: var(--danger);
    border-color: rgba(239, 68, 68, 0.1);
}

.alert-warning {
    background: rgba(245, 158, 11, 0.08);
    color: var(--warning);
    border-color: rgba(245, 158, 11, 0.1);
}

.alert-info {
    background: rgba(6, 182, 212, 0.08);
    color: var(--info);
    border-color: rgba(6, 182, 212, 0.1);
}

.alert .close {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    color: inherit;
    opacity: 0.6;
    transition: opacity var(--transition);
    padding: 0 0.3rem;
}

.alert .close:hover {
    opacity: 1;
}

.alert-dismissible {
    padding-left: 2.5rem;
}

.alert-dismissible .close {
    position: relative;
}

/* ============================================
   TOAST
   ============================================ */

.toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(80px);
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 0.6rem 1.8rem;
    border-radius: 50px;
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    z-index: 1000;
    transition: all 0.5s cubic-bezier(0.22, 0.61, 0.36, 1);
    opacity: 0;
    pointer-events: none;
    box-shadow: var(--shadow);
    white-space: nowrap;
}

[data-theme="light"] .toast {
    background: rgba(255, 255, 255, 0.95);
}

.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.toast i {
    color: var(--success);
}

/* ============================================
   BACK TO TOP
   ============================================ */

.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    cursor: pointer;
    font-size: 1.1rem;
    z-index: 999;
    opacity: 0;
    transform: translateY(20px) scale(0.8);
    transition: all var(--transition);
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    justify-content: center;
}

.back-to-top.visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.back-to-top:hover {
    background: var(--bg-card-hover);
    border-color: var(--accent);
    transform: translateY(-3px) scale(1.05);
}

.back-to-top i {
    background: linear-gradient(135deg, var(--accent-light), var(--info));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ============================================
   PROGRESS BAR
   ============================================ */

.progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 2.5px;
    background: linear-gradient(90deg, var(--accent), var(--accent-light), var(--info));
    z-index: 9998;
    transition: width 0.1s;
    box-shadow: 0 0 20px var(--accent-glow);
}

/* ============================================
   CARDS
   ============================================ */

.card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    transition: all var(--transition);
}

.card:hover {
    border-color: var(--border-light);
    box-shadow: var(--shadow-hover);
}

[data-theme="light"] .card:hover {
    box-shadow: var(--shadow-hover);
}

/* ============================================
   WELCOME TOAST - پیام خوش‌آمدگویی
   ============================================ */

.welcome-toast {
    position: fixed;
    bottom: 25px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: linear-gradient(135deg, rgba(108, 60, 225, 0.15), rgba(6, 182, 212, 0.10));
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1.5px solid rgba(108, 60, 225, 0.25);
    border-radius: 50px;
    padding: 0.5rem 1.5rem 0.5rem 1.2rem;
    box-shadow: 0 8px 35px rgba(108, 60, 225, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.05);
    z-index: 9997;
    opacity: 0;
    transition: all 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
    pointer-events: none;
    max-width: 90%;
    animation: rgbGlow 3s ease-in-out infinite;
}

[data-theme="light"] .welcome-toast {
    background: linear-gradient(135deg, rgba(108, 60, 225, 0.08), rgba(6, 182, 212, 0.05));
    border-color: rgba(108, 60, 225, 0.15);
    box-shadow: 0 8px 35px rgba(108, 60, 225, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

@keyframes rgbGlow {
    0% { border-color: rgba(108, 60, 225, 0.25); box-shadow: 0 8px 35px rgba(108, 60, 225, 0.15); }
    33% { border-color: rgba(236, 72, 153, 0.25); box-shadow: 0 8px 35px rgba(236, 72, 153, 0.15); }
    66% { border-color: rgba(6, 182, 212, 0.25); box-shadow: 0 8px 35px rgba(6, 182, 212, 0.15); }
    100% { border-color: rgba(108, 60, 225, 0.25); box-shadow: 0 8px 35px rgba(108, 60, 225, 0.15); }
}

.welcome-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.welcome-toast .welcome-content {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.welcome-toast .welcome-icon {
    font-size: 1.5rem;
    animation: welcomeWave 2s ease-in-out infinite;
    flex-shrink: 0;
}

@keyframes welcomeWave {
    0%, 100% { transform: rotate(0deg) scale(1); }
    25% { transform: rotate(-8deg) scale(1.05); }
    75% { transform: rotate(8deg) scale(1.05); }
}

.welcome-toast .welcome-text h4 {
    font-size: 0.5rem;
    color: rgba(139, 92, 246, 0.8);
    font-weight: 600;
    margin: 0;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.welcome-toast .welcome-text h3 {
    font-size: 0.85rem;
    font-weight: 800;
    margin: 0;
    line-height: 1.2;
    background: linear-gradient(135deg, #6C3CE1, #EC4899, #06B6D4);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: rgbText 4s ease-in-out infinite;
}

@keyframes rgbText {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.welcome-toast .welcome-text p {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.6);
    margin: 0;
    font-weight: 500;
}

[data-theme="light"] .welcome-toast .welcome-text p {
    color: rgba(0, 0, 0, 0.5);
}

/* ============================================
   RESPONSIVE - WELCOME TOAST
   ============================================ */

@media (max-width: 360px) {
    .welcome-toast {
        padding: 0.4rem 1rem 0.4rem 0.8rem;
        bottom: 15px;
        border-radius: 40px;
        background: rgba(20, 20, 40, 0.92) !important;
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
        border-color: rgba(108, 60, 225, 0.4) !important;
        animation: none !important;
        box-shadow: 0 8px 35px rgba(0, 0, 0, 0.4) !important;
    }
    
    [data-theme="light"] .welcome-toast {
        background: rgba(255, 255, 255, 0.92) !important;
        border-color: rgba(108, 60, 225, 0.2) !important;
        box-shadow: 0 8px 35px rgba(0, 0, 0, 0.1) !important;
    }
    
    .welcome-toast .welcome-icon { font-size: 1.2rem; }
    .welcome-toast .welcome-text h3 { font-size: 0.7rem; }
    .welcome-toast .welcome-text h4 { font-size: 0.4rem; }
    .welcome-toast .welcome-text p { font-size: 0.6rem; color: rgba(255, 255, 255, 0.7) !important; }
    [data-theme="light"] .welcome-toast .welcome-text p { color: rgba(0, 0, 0, 0.6) !important; }
}

@media (min-width: 361px) and (max-width: 480px) {
    .welcome-toast {
        padding: 0.45rem 1.2rem 0.45rem 1rem;
        bottom: 20px;
        border-radius: 45px;
        background: rgba(20, 20, 40, 0.90) !important;
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
        border-color: rgba(108, 60, 225, 0.35) !important;
        animation: none !important;
        box-shadow: 0 8px 35px rgba(0, 0, 0, 0.35) !important;
    }
    
    [data-theme="light"] .welcome-toast {
        background: rgba(255, 255, 255, 0.90) !important;
        border-color: rgba(108, 60, 225, 0.2) !important;
        box-shadow: 0 8px 35px rgba(0, 0, 0, 0.08) !important;
    }
    
    .welcome-toast .welcome-icon { font-size: 1.3rem; }
    .welcome-toast .welcome-text h3 { font-size: 0.75rem; }
    .welcome-toast .welcome-text p { color: rgba(255, 255, 255, 0.7) !important; }
    [data-theme="light"] .welcome-toast .welcome-text p { color: rgba(0, 0, 0, 0.6) !important; }
}

@media (min-width: 481px) and (max-width: 768px) {
    .welcome-toast {
        padding: 0.5rem 1.3rem 0.5rem 1rem;
        bottom: 25px;
        border-radius: 50px;
        background: rgba(20, 20, 40, 0.85) !important;
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
        border-color: rgba(108, 60, 225, 0.3) !important;
        animation: none !important;
        box-shadow: 0 8px 35px rgba(0, 0, 0, 0.3) !important;
    }
    
    [data-theme="light"] .welcome-toast {
        background: rgba(255, 255, 255, 0.85) !important;
        border-color: rgba(108, 60, 225, 0.15) !important;
        box-shadow: 0 8px 35px rgba(0, 0, 0, 0.06) !important;
    }
    
    .welcome-toast .welcome-text p { color: rgba(255, 255, 255, 0.7) !important; }
    [data-theme="light"] .welcome-toast .welcome-text p { color: rgba(0, 0, 0, 0.5) !important; }
}

@media (min-width: 769px) {
    .welcome-toast {
        padding: 0.6rem 1.8rem 0.6rem 1.5rem;
        bottom: 30px;
        border-radius: 50px;
    }
    .welcome-toast .welcome-icon { font-size: 1.6rem; }
    .welcome-toast .welcome-text h3 { font-size: 0.9rem; }
}

/* ============================================
   RESPONSIVE - BASE
   ============================================ */

@media (max-width: 360px) {
    .container { padding: 0.5rem 0.8rem 1.5rem; }
    .section-title h2 { font-size: 1.3rem; }
    .btn { padding: 0.5rem 1.2rem; font-size: 0.75rem; min-height: 38px; }
    .back-to-top { width: 40px; height: 40px; bottom: 20px; right: 20px; font-size: 0.9rem; }
    .toast { font-size: 0.7rem; padding: 0.4rem 1.2rem; bottom: 20px; }
}

@media (max-width: 480px) {
    .container { padding: 0.5rem 1rem 1.5rem; }
    .section-title { margin-bottom: 1.8rem; }
    .section-title h2 { font-size: 1.5rem; }
    .section-title .label { font-size: 0.5rem; padding: 0.15rem 0.8rem; }
    .btn { padding: 0.6rem 1.5rem; font-size: 0.8rem; min-height: 40px; }
    .back-to-top { width: 44px; height: 44px; bottom: 20px; right: 20px; font-size: 1rem; }
    .toast { font-size: 0.75rem; padding: 0.5rem 1.4rem; bottom: 20px; }
    .alert { font-size: 0.8rem; padding: 0.6rem 1rem; }
}

@media (min-width: 481px) and (max-width: 768px) {
    .container { padding: 0.8rem 1.5rem 2rem; }
    .section-title h2 { font-size: 1.8rem; }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .container { padding: 1rem 2rem 2.5rem; max-width: 95%; }
}

@media (min-width: 1025px) {
    .container { padding: 1.5rem 2.5rem 3rem; }
}

@media (max-width: 768px) {
    * { backdrop-filter: none !important; -webkit-backdrop-filter: none !important; }
    .reveal { transition: opacity 0.4s ease, transform 0.4s ease; }
    .alert { flex-wrap: wrap; }
    .alert .close { align-self: center; }
}

/* ============================================
   UTILITY CLASSES
   ============================================ */

.text-center { text-align: center; }
.text-right { text-align: right; }
.text-left { text-align: left; }

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.d-flex { display: flex; }
.d-inline { display: inline; }
.d-block { display: block; }
.d-none { display: none; }

.flex-wrap { flex-wrap: wrap; }
.align-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.gap-3 { gap: 1.5rem; }

.w-100 { width: 100%; }
.h-100 { height: 100%; }

.rounded { border-radius: var(--radius); }
.rounded-lg { border-radius: var(--radius-lg); }
.rounded-xl { border-radius: var(--radius-xl); }
.rounded-full { border-radius: 50%; }

.shadow { box-shadow: var(--shadow); }
.shadow-hover { box-shadow: var(--shadow-hover); }

.text-muted { color: var(--text-muted); }
.text-secondary { color: var(--text-secondary); }
.text-primary { color: var(--text-primary); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.text-warning { color: var(--warning); }
.text-info { color: var(--info); }

.bg-card { background: var(--bg-card); }
.bg-secondary { background: var(--bg-secondary); }
.bg-primary { background: var(--bg-primary); }

.border { border: 1px solid var(--border-color); }
.border-light { border-color: var(--border-light); }

.overflow-hidden { overflow: hidden; }
.overflow-auto { overflow: auto; }

.position-relative { position: relative; }
.position-absolute { position: absolute; }
.position-fixed { position: fixed; }
.position-sticky { position: sticky; }