@import url('https://fonts.googleapis.com/css2?family=Vazirmatn:wght@100;200;300;400;500;600;700;800;900&display=swap');

:root {
    --primary: #3b82f6;
    --primary-hover: #2563eb;
    --primary-light: rgba(59, 130, 246, 0.15);
    --primary-glow: rgba(59, 130, 246, 0.5);
    
    --bg-body: #0f172a;
    --bg-card: #1e293b;
    --bg-input: #334155;
    
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    
    --border: #334155;
    --border-hover: #475569;
    
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    
    --gradient-primary: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    --gradient-card: linear-gradient(145deg, #1e293b, #0f172a);
    
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 25px -5px rgba(0, 0, 0, 0.3);
    
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
}

[data-theme="light"] {
    --bg-body: #f1f5f9;
    --bg-card: #ffffff;
    --bg-input: #e2e8f0;
    
    --text-main: #0f172a;
    --text-muted: #64748b;
    
    --border: #cbd5e1;
    --border-hover: #94a3b8;
    
    --gradient-card: linear-gradient(145deg, #ffffff, #f8fafc);
    --shadow-lg: 0 10px 25px -5px rgba(59, 130, 246, 0.15);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    outline: none;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'Vazirmatn', sans-serif;
    background-color: var(--bg-body);
    color: var(--text-main);
    line-height: 1.6;
    direction: rtl;
    overflow-x: hidden;
    min-height: 100vh;
    transition: background-color 0.3s ease, color 0.3s ease;
}

a {
    text-decoration: none;
    color: inherit;
    transition: 0.2s ease;
}

ul {
    list-style: none;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* --- BUTTONS --- */
.btn-action {
    width: 100%;
    padding: 14px;
    background: var(--gradient-primary);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-family: inherit;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-action:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
}

.btn-action:active {
    transform: scale(0.98);
}

.icon-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--bg-input);
    color: var(--text-main);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    cursor: pointer;
    transition: 0.2s;
}

.icon-btn:hover {
    background: var(--primary);
    color: white;
}

/* --- FORMS & INPUTS --- */
.inp-group {
    margin-bottom: 1.2rem;
    position: relative;
}

.inp-modern {
    width: 100%;
    padding: 14px 16px;
    background: var(--bg-input);
    border: 2px solid transparent;
    border-radius: var(--radius-md);
    color: var(--text-main);
    font-family: inherit;
    font-size: 0.95rem;
    transition: 0.3s;
}

.inp-modern:focus {
    background: var(--bg-card);
    border-color: var(--primary);
    box-shadow: 0 0 0 4px var(--primary-light);
}

.inp-modern::placeholder {
    color: var(--text-muted);
    opacity: 0.7;
}

/* --- HEADER --- */
.app-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    padding: 0.8rem 0;
    transition: background 0.3s;
}

[data-theme="light"] .app-header {
    background: rgba(255, 255, 255, 0.85);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.header-actions {
    display: flex;
    gap: 12px;
}

/* --- BOTTOM NAVIGATION (Mobile) --- */
.btm-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: var(--bg-card);
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-around;
    padding: 12px 0;
    z-index: 900;
    padding-bottom: max(12px, env(safe-area-inset-bottom));
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    color: var(--text-muted);
    font-size: 0.75rem;
    transition: 0.3s;
    flex: 1;
}

.nav-item i {
    font-size: 1.3rem;
    margin-bottom: 2px;
    transition: 0.3s;
}

.nav-item.active {
    color: var(--primary);
}

.nav-item.active i {
    transform: translateY(-3px);
    filter: drop-shadow(0 4px 6px var(--primary-glow));
}

/* --- AUTH PAGES (Login/Register) --- */
.auth-card {
    width: 100%;
    max-width: 420px;
    background: var(--bg-card);
    padding: 2.5rem;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border);
    margin: 2rem auto;
    position: relative;
    overflow: hidden;
}

.auth-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 6px;
    background: var(--gradient-primary);
}

.auth-title {
    text-align: center;
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 2rem;
    color: var(--text-main);
}

/* --- HOME PAGE --- */
.filter-wrapper {
    position: sticky;
    top: 65px;
    z-index: 90;
    background: var(--bg-body);
    padding: 1rem 0;
    margin-bottom: 1rem;
}

.filter-scroll {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 5px;
    scrollbar-width: none;
}

.filter-scroll::-webkit-scrollbar {
    display: none;
}

.filter-chip {
    padding: 8px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 50px;
    color: var(--text-muted);
    font-size: 0.9rem;
    white-space: nowrap;
    cursor: pointer;
    transition: 0.3s;
}

.filter-chip.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    box-shadow: 0 4px 10px var(--primary-glow);
}

.srv-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 1rem;
    padding-bottom: 80px;
}

.srv-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    padding: 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.srv-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
    box-shadow: var(--shadow-lg);
}

.srv-icon {
    width: 60px;
    height: 60px;
    background: var(--primary-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 1.8rem;
    margin-bottom: 1rem;
}

.srv-info h3 {
    font-size: 1rem;
    margin-bottom: 0.5rem;
    color: var(--text-main);
}

.price-tag {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--primary);
    margin: 0.5rem 0;
}

.price-tag small {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 400;
}

.srv-buy {
    width: 100%;
    margin-top: auto;
    padding: 8px;
    background: var(--bg-input);
    color: var(--text-main);
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    transition: 0.3s;
}

.srv-card:hover .srv-buy {
    background: var(--primary);
    color: white;
}

/* --- PROFILE PAGE --- */
.profile-header {
    background: var(--bg-card);
    padding: 2rem 1rem;
    border-radius: 0 0 var(--radius-xl) var(--radius-xl);
    text-align: center;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--border);
}

.profile-avatar {
    width: 90px;
    height: 90px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    margin: 0 auto 1rem;
    border: 4px solid var(--bg-body);
    box-shadow: 0 0 0 4px var(--primary-light);
}

.wallet-card {
    background: linear-gradient(135deg, #1e293b, #0f172a);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    position: relative;
    overflow: hidden;
    margin-bottom: 1.5rem;
}

.wallet-card::after {
    content: '';
    position: absolute;
    right: -20px;
    top: -20px;
    width: 100px;
    height: 100px;
    background: var(--primary);
    opacity: 0.1;
    border-radius: 50%;
    filter: blur(20px);
}

.wallet-amount {
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary);
    margin: 0.5rem 0;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-box {
    background: var(--bg-card);
    padding: 1.2rem;
    border-radius: var(--radius-md);
    text-align: center;
    border: 1px solid var(--border);
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-main);
}

/* --- PURCHASE PAGE --- */
.purchase-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    padding: 1.5rem;
    margin-top: 1rem;
}

.range-wrap {
    margin: 2rem 0;
}

input[type=range] {
    width: 100%;
    -webkit-appearance: none;
    background: transparent;
}

input[type=range]::-webkit-slider-thumb {
    -webkit-appearance: none;
    height: 24px;
    width: 24px;
    border-radius: 50%;
    background: var(--primary);
    cursor: pointer;
    margin-top: -10px;
    box-shadow: 0 0 0 4px var(--primary-light);
}

input[type=range]::-webkit-slider-runnable-track {
    width: 100%;
    height: 6px;
    background: var(--bg-input);
    border-radius: 10px;
}

/* --- ORDERS PAGE --- */
.grid-orders {
    display: grid;
    gap: 1rem;
    padding-bottom: 80px;
}

.ord-card-glass {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 1.2rem;
    transition: 0.3s;
    position: relative;
}

.ord-card-glass:hover {
    transform: translateY(-3px);
    border-color: var(--primary);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.ord-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px dashed var(--border);
}

.status-badge {
    padding: 4px 12px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
}

.st-pending { background: rgba(245, 158, 11, 0.1); color: var(--warning); }
.st-process { background: rgba(59, 130, 246, 0.1); color: var(--primary); }
.st-success { background: rgba(16, 185, 129, 0.1); color: var(--success); }
.st-failed { background: rgba(239, 68, 68, 0.1); color: var(--danger); }

/* --- ABOUT PAGE --- */
.about-hero {
    background: linear-gradient(180deg, var(--bg-card) 0%, var(--bg-body) 100%);
    padding: 3rem 1rem;
    text-align: center;
    border-radius: 0 0 var(--radius-xl) var(--radius-xl);
    margin: -1rem -1rem 2rem -1rem;
}

.feat-row {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 2rem;
    background: var(--bg-card);
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
}

.contact-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    border-radius: var(--radius-md);
    color: white;
    margin-bottom: 1rem;
    position: relative;
    overflow: hidden;
}

.contact-card.telegram { background: linear-gradient(135deg, #229ED9, #0088cc); }
.contact-card.email { background: linear-gradient(135deg, #ef4444, #b91c1c); }

.faq-item {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    margin-bottom: 0.8rem;
    overflow: hidden;
}

.faq-q {
    padding: 1.2rem;
    display: flex;
    justify-content: space-between;
    cursor: pointer;
    font-weight: 600;
}

.faq-a {
    padding: 0 1.2rem;
    max-height: 0;
    overflow: hidden;
    transition: all 0.3s ease;
    color: var(--text-muted);
    line-height: 1.8;
}

.faq-item.active .faq-a {
    padding-bottom: 1.2rem;
    max-height: 300px;
}

/* --- MODALS --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(5px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: 0.3s;
}

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

.modal-box {
    background: var(--bg-card);
    width: 90%;
    max-width: 400px;
    padding: 2rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    transform: translateY(20px);
    transition: 0.3s;
    box-shadow: var(--shadow-lg);
}

.modal-overlay.active .modal-box {
    transform: translateY(0);
}

.section-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.section-title::before {
    content: '';
    width: 4px;
    height: 20px;
    background: var(--primary);
    border-radius: 4px;
}

/* --- ALERTS --- */
.alert {
    padding: 1rem;
    border-radius: var(--radius-md);
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.alert-error {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.alert-success {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

/* --- RESPONSIVE --- */
@media (min-width: 769px) {
    .btm-nav { display: none; }
    
    .srv-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
    
    .container {
        padding: 0 2rem;
    }
    
    .grid-orders {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .profile-header {
        border-radius: var(--radius-xl);
        margin: 2rem 0;
    }
}

@media (max-width: 768px) {
    main { padding-bottom: 70px; }
    
    .hide-mobile { display: none; }
    
    .auth-card {
        padding: 1.5rem;
        margin: 1rem;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .feat-row {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
}

/* --- ADDED FOR PURCHASE PAGE DESCRIPTION --- */
.service-description-box {
    background: rgba(59, 130, 246, 0.05);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 2rem;
    margin-top: 0.5rem;
}

.desc-title {
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.95rem;
}

.desc-content {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.8;
    white-space: pre-line;
}