/* ===== VARIABLES ===== */
:root { 
    --primary: #00ffa3; 
    --secondary: #00d1ff; 
    --danger: #ff4d4d;
    --success: #00d4aa;
    --warning: #ffaa00;
    --info: #9d4edd;
    --bg: #050508; 
    --surface: #121216;
    --card: rgba(255, 255, 255, 0.03); 
    --border: rgba(255, 255, 255, 0.08);
    --font-main: 'Vazirmatn', sans-serif;
    --nav-height: 70px;
    --border-radius: 20px;
    --transition: all 0.3s ease;
    --shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
    --glass-bg: rgba(255, 255, 255, 0.03);
}

/* ===== RESET & BASE ===== */
* { 
    box-sizing: border-box; 
    -webkit-tap-highlight-color: transparent; 
    outline: none; 
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body { 
    background: var(--bg); 
    color: #eee; 
    font-family: var(--font-main); 
    overflow-x: hidden; 
    font-size: 14px;
    line-height: 1.6;
    min-height: 100vh;
    background-image: 
        radial-gradient(circle at 10% 20%, rgba(0, 255, 163, 0.05) 0%, transparent 20%),
        radial-gradient(circle at 90% 80%, rgba(0, 209, 255, 0.05) 0%, transparent 20%);
}

/* ===== TYPOGRAPHY ===== */
h1 { font-size: 1.8rem; font-weight: 800; margin-bottom: 20px; }
h2 { font-size: 1.5rem; font-weight: 700; margin-bottom: 15px; }
h3 { font-size: 1.2rem; font-weight: 600; margin-bottom: 10px; }
h4 { font-size: 1rem; font-weight: 600; margin-bottom: 8px; }

.neon-text { 
    color: var(--primary); 
    text-shadow: 0 0 12px rgba(0, 255, 163, 0.4); 
}

.text-secondary { color: var(--secondary); }
.text-warning { color: var(--warning); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.text-info { color: var(--info); }

.text-center { text-align: center; }

/* ===== LAYOUT ===== */
.container { 
    width: 100%; 
    max-width: 550px; 
    margin: 0 auto; 
    padding: 20px 20px 100px 20px; 
    min-height: 100vh; 
    position: relative; 
}

/* ===== PAGES ===== */
.page { 
    display: none; 
    opacity: 0; 
    transform: translateY(10px); 
    transition: var(--transition); 
}

.page.active { 
    display: block; 
    opacity: 1; 
    transform: translateY(0); 
    animation: fadeIn 0.3s ease forwards;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.page-header {
    margin-bottom: 25px;
}

.page-header h2 {
    margin-bottom: 5px;
}

.page-description {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 0;
}

/* ===== LOADING SCREEN ===== */
.loading {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 50px;
}

.loading i {
    color: var(--primary);
    font-size: 3rem;
    margin-bottom: 20px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading h2 {
    color: var(--primary);
    margin-bottom: 10px;
    font-size: 1.8rem;
}

.loading p {
    color: #888;
    font-size: 0.9rem;
}

/* ===== UTILITY CLASSES ===== */
.hidden { display: none !important; }
.visible { display: block !important; }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .container {
        padding: 15px 15px 90px 15px;
    }
    
    h1 { font-size: 1.6rem; }
    h2 { font-size: 1.3rem; }
    h3 { font-size: 1.1rem; }
}

@media (min-width: 768px) {
    .container {
        max-width: 700px;
    }
}

@media (max-width: 480px) {
    body {
        font-size: 13px;
    }
    
    .container {
        padding: 12px 12px 80px 12px;
    }
}