:root {
    /* متغیرهای تم روشن */
    --primary-color: #7c3aed;
    --primary-light: #a78bfa;
    --primary-dark: #5b21b6;
    --secondary-color: #06b6d4;
    --surface-color: #ffffff;
    --background-color: #f8fafc;
    --on-primary: #ffffff;
    --on-surface: #1e293b;
    --on-background: #1e293b;
    --outline-color: #e2e8f0;
    --error-color: #dc2626;
    --success-color: #16a34a;
    --warning-color: #d97706;
    --info-color: #0284c7;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --radius: 16px;
    --radius-sm: 12px;
    --radius-lg: 20px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --app-height: 100vh;
    --header-height: 70px;
    --nav-height: 70px;
}

[data-theme="dark"] {
    /* متغیرهای تم تاریک */
    --primary-color: #8b5cf6;
    --primary-light: #a78bfa;
    --primary-dark: #7c3aed;
    --secondary-color: #06b6d4;
    --surface-color: #1e293b;
    --background-color: #0f172a;
    --on-primary: #ffffff;
    --on-surface: #f1f5f9;
    --on-background: #f1f5f9;
    --outline-color: #334155;
    --error-color: #ef4444;
    --success-color: #22c55e;
    --warning-color: #f59e0b;
    --info-color: #0ea5e9;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -1px rgba(0, 0, 0, 0.2);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.3), 0 4px 6px -2px rgba(0, 0, 0, 0.2);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.3), 0 10px 10px -5px rgba(0, 0, 0, 0.2);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    font-family: 'Vazirmatn', sans-serif;
    background-color: var(--background-color);
    color: var(--on-background);
    min-height: 100vh;
    min-height: var(--app-height);
    transition: var(--transition);
    line-height: 1.6;
    overflow-x: hidden;
    scroll-behavior: smooth;
}

.app-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    min-height: var(--app-height);
    padding-top: var(--header-height);
    padding-bottom: var(--nav-height);
}

/* هدر - کاملاً ثابت */
.app-header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--on-primary);
    height: var(--header-height);
    box-shadow: var(--shadow-lg);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
    padding: 0 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo {
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

.logo-inner {
    width: 32px;
    height: 32px;
    background: white;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    font-weight: 800;
    font-size: 18px;
}

.brand-name {
    font-size: 20px;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.theme-toggle {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: var(--radius);
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--on-primary);
    transition: var(--transition);
    font-size: 20px;
}

.theme-toggle:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

/* محتوای اصلی */
.app-main {
    flex: 1;
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    height: calc(100vh - var(--header-height) - var(--nav-height));
}

.page {
    display: none;
    animation: fadeIn 0.4s ease;
}

.page.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.page-title {
    font-size: 28px;
    font-weight: 800;
    margin-bottom: 24px;
    text-align: center;
    color: var(--on-surface);
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.card {
    background-color: var(--surface-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    padding: 28px;
    margin-bottom: 24px;
    transition: var(--transition);
    border: 1px solid var(--outline-color);
}

.card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
}

.card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.card-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius);
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 20px;
}

.card-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--on-surface);
}

.card-content {
    color: var(--on-surface);
    opacity: 0.8;
    line-height: 1.7;
}

/* ویژگی‌های صفحه اصلی */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 24px;
}

.feature-card {
    background-color: var(--surface-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    padding: 24px;
    transition: var(--transition);
    border: 1px solid var(--outline-color);
    text-align: center;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.feature-icon {
    width: 60px;
    height: 60px;
    border-radius: var(--radius);
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
    margin: 0 auto 16px;
}

.feature-card h3 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--on-surface);
}

.feature-card p {
    color: var(--on-surface);
    opacity: 0.8;
    font-size: 14px;
    line-height: 1.6;
}

.coming-soon {
    text-align: center;
    padding: 60px 20px;
    color: var(--on-surface);
    opacity: 0.7;
}

.coming-soon .material-icons {
    font-size: 80px;
    margin-bottom: 20px;
    color: var(--primary-color);
    opacity: 0.5;
}

/* فرم‌ها و دکمه‌ها */
.form-group {
    margin-bottom: 28px;
    position: relative;
}

label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: var(--on-surface);
    font-size: 15px;
}

.input-container {
    position: relative;
}

input {
    width: 100%;
    padding: 16px 20px 16px 56px;
    border: 2px solid var(--outline-color);
    border-radius: var(--radius);
    font-size: 16px;
    background-color: var(--surface-color);
    color: var(--on-surface);
    transition: var(--transition);
    font-family: 'Vazirmatn', sans-serif;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1);
}

.input-icon {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--primary-color);
    font-size: 18px;
}

.btn {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border: none;
    border-radius: var(--radius);
    padding: 16px 28px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.3);
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.2), transparent);
    transform: translateX(-100%);
    transition: transform 0.6s;
}

.btn:hover::before {
    transform: translateX(0);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(124, 58, 237, 0.4);
}

.btn:active {
    transform: translateY(0);
}

.btn-outline {
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    box-shadow: none;
}

.btn-outline:hover {
    background: var(--primary-color);
    color: white;
}

.btn-secondary {
    background: transparent;
    color: var(--on-surface);
    border: 2px solid var(--outline-color);
    box-shadow: none;
    margin-top: 12px;
}

.btn-secondary:hover {
    background: var(--outline-color);
    color: var(--on-surface);
}

/* مراحل فعال‌سازی */
.step-indicator {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 32px;
}

.step-dot {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background-color: var(--outline-color);
    transition: var(--transition);
}

.step-dot.active {
    background-color: var(--primary-color);
    transform: scale(1.2);
}

.step {
    display: none;
    animation: fadeIn 0.5s ease;
}

.step.active {
    display: block;
}

.hint {
    font-size: 14px;
    color: var(--on-surface);
    opacity: 0.7;
    margin-top: 16px;
    text-align: center;
    line-height: 1.6;
}

/* پیام‌ها */
.message {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    border-radius: var(--radius);
    margin-bottom: 20px;
    font-weight: 500;
}

.message.info {
    background-color: rgba(2, 132, 199, 0.1);
    color: var(--info-color);
    border: 1px solid rgba(2, 132, 199, 0.2);
}

.message.success {
    background-color: rgba(22, 163, 74, 0.1);
    color: var(--success-color);
    border: 1px solid rgba(22, 163, 74, 0.2);
}

.message.error {
    background-color: rgba(220, 38, 38, 0.1);
    color: var(--error-color);
    border: 1px solid rgba(220, 38, 38, 0.2);
}

.message.warning {
    background-color: rgba(217, 119, 6, 0.1);
    color: var(--warning-color);
    border: 1px solid rgba(217, 119, 6, 0.2);
}

/* اطلاعات کاربر */
.user-info {
    background-color: rgba(124, 58, 237, 0.05);
    border: 1px solid rgba(124, 58, 237, 0.1);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 20px;
}

.user-info h3 {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
    color: var(--primary-color);
    font-size: 16px;
}

.user-info p {
    margin-bottom: 8px;
    display: flex;
    justify-content: space-between;
}

.user-info strong {
    color: var(--on-surface);
}

/* صفحه پروفایل */
.profile-header {
    text-align: center;
    margin-bottom: 32px;
    padding: 20px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: var(--radius-lg);
    color: white;
    position: relative;
    overflow: hidden;
}

.profile-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" preserveAspectRatio="none"><path d="M0,0 L100,0 L100,100 Z" fill="rgba(255,255,255,0.1)"/></svg>');
    background-size: cover;
}

.profile-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
}

.profile-avatar-inner {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    font-size: 32px;
}

.profile-header h2 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 8px;
}

.profile-username {
    opacity: 0.9;
    font-size: 16px;
}

.subscription-status {
    text-align: center;
    margin-bottom: 32px;
    padding: 20px;
    background-color: var(--surface-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    position: relative;
}

.status-badge {
    display: inline-block;
    padding: 8px 20px;
    border-radius: 50px;
    font-weight: 700;
    margin-bottom: 12px;
    font-size: 14px;
}

.status-active {
    background-color: rgba(22, 163, 74, 0.1);
    color: var(--success-color);
    border: 1px solid rgba(22, 163, 74, 0.2);
}

.status-inactive {
    background-color: rgba(220, 38, 38, 0.1);
    color: var(--error-color);
    border: 1px solid rgba(220, 38, 38, 0.2);
}

.refresh-btn {
    position: absolute;
    top: 20px;
    left: 20px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    font-size: 16px;
}

.refresh-btn:hover {
    transform: rotate(180deg);
    background: var(--primary-dark);
}

.wallet-balance {
    text-align: center;
    margin-bottom: 24px;
    padding: 20px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: var(--radius);
    color: white;
}

.balance-amount {
    font-size: 32px;
    font-weight: 800;
    margin-bottom: 8px;
}

.balance-label {
    opacity: 0.9;
    font-size: 14px;
}

.info-row {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid var(--outline-color);
}

.info-row:last-child {
    border-bottom: none;
}

.info-label {
    color: var(--on-surface);
    opacity: 0.7;
}

.info-value {
    color: var(--on-surface);
    font-weight: 600;
}

/* مودال‌ها */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background-color: var(--surface-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    width: 90%;
    max-width: 500px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-height: 90vh;
    overflow-y: auto;
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from { opacity: 0; transform: translate(-50%, -60%); }
    to { opacity: 1; transform: translate(-50%, -50%); }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px;
    border-bottom: 1px solid var(--outline-color);
}

.modal-header h3 {
    font-size: 20px;
    font-weight: 700;
    color: var(--on-surface);
}

.modal-close {
    background: none;
    border: none;
    font-size: 20px;
    color: var(--on-surface);
    cursor: pointer;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.modal-close:hover {
    background-color: var(--outline-color);
}

.modal-body {
    padding: 24px;
}

.amount-suggestions {
    margin-bottom: 24px;
}

.amount-suggestions h4 {
    margin-bottom: 16px;
    color: var(--on-surface);
    font-size: 16px;
}

.suggestion-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

.amount-btn {
    background-color: var(--surface-color);
    border: 2px solid var(--outline-color);
    border-radius: var(--radius);
    padding: 16px;
    font-size: 14px;
    font-weight: 600;
    color: var(--on-surface);
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
}

.amount-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.amount-btn.active {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.payment-info {
    margin-bottom: 24px;
}

.payment-amount {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    background-color: rgba(124, 58, 237, 0.05);
    border-radius: var(--radius);
    margin-bottom: 20px;
}

.amount-label {
    color: var(--on-surface);
    font-weight: 600;
}

.amount-value {
    font-size: 20px;
    font-weight: 800;
    color: var(--primary-color);
}

.bank-card-info {
    margin-bottom: 24px;
    padding: 20px;
    background-color: rgba(124, 58, 237, 0.05);
    border-radius: var(--radius);
}

.bank-card-info h4 {
    margin-bottom: 16px;
    color: var(--on-surface);
    font-size: 16px;
}

.card-details {
    background-color: var(--surface-color);
    border-radius: var(--radius);
    padding: 16px;
    box-shadow: var(--shadow);
}

.card-number {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--outline-color);
}

.card-number-text {
    font-family: monospace;
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 1px;
    color: var(--on-surface);
}

.copy-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    padding: 8px 16px;
    font-size: 12px;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 6px;
}

.copy-btn:hover {
    background: var(--primary-dark);
}

.card-name {
    color: var(--on-surface);
    font-weight: 600;
}

.payment-steps {
    margin-top: 24px;
}

.payment-steps h4 {
    margin-bottom: 16px;
    color: var(--on-surface);
    font-size: 16px;
}

.payment-steps ol {
    padding-right: 20px;
}

.payment-steps li {
    margin-bottom: 12px;
    color: var(--on-surface);
    line-height: 1.6;
}

.action-buttons {
    display: flex;
    gap: 12px;
}

.action-buttons .btn {
    flex: 1;
}

/* اعلانات */
.notification-container {
    position: fixed;
    top: 90px;
    right: 20px;
    z-index: 3000;
    max-width: 400px;
    width: calc(100% - 40px);
}

.notification {
    background-color: var(--surface-color);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    padding: 16px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    animation: slideInRight 0.3s ease;
    border-right: 4px solid;
}

@keyframes slideInRight {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

.notification.success {
    border-right-color: var(--success-color);
}

.notification.error {
    border-right-color: var(--error-color);
}

.notification.warning {
    border-right-color: var(--warning-color);
}

.notification.info {
    border-right-color: var(--info-color);
}

.notification-icon {
    font-size: 20px;
}

.notification.success .notification-icon {
    color: var(--success-color);
}

.notification.error .notification-icon {
    color: var(--error-color);
}

.notification.warning .notification-icon {
    color: var(--warning-color);
}

.notification.info .notification-icon {
    color: var(--info-color);
}

.notification-content {
    flex: 1;
}

.notification-title {
    font-weight: 700;
    margin-bottom: 4px;
    color: var(--on-surface);
}

.notification-message {
    font-size: 14px;
    color: var(--on-surface);
    opacity: 0.8;
}

.notification-close {
    background: none;
    border: none;
    color: var(--on-surface);
    opacity: 0.6;
    cursor: pointer;
    font-size: 16px;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: var(--transition);
}

.notification-close:hover {
    background-color: var(--outline-color);
    opacity: 1;
}

/* ناوبری پایین - کاملاً ثابت */
.app-nav {
    background-color: var(--surface-color);
    border-top: 1px solid var(--outline-color);
    height: var(--nav-height);
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.05);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.nav-container {
    display: flex;
    justify-content: space-around;
    align-items: center;
    height: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.nav-item {
    background: none;
    border: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 12px;
    border-radius: var(--radius);
    cursor: pointer;
    transition: var(--transition);
    color: var(--on-surface);
    opacity: 0.6;
    flex: 1;
    max-width: 80px;
    position: relative;
}

.nav-item.active {
    opacity: 1;
    color: var(--primary-color);
}

.nav-item.active::before {
    content: '';
    position: absolute;
    top: -8px;
    width: 40px;
    height: 3px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 10px;
}

.nav-icon {
    font-size: 20px;
    transition: var(--transition);
}

.nav-item span {
    font-size: 12px;
    font-weight: 600;
    transition: var(--transition);
}

.nav-item.active .nav-icon {
    transform: translateY(-2px);
}

.nav-item:hover {
    opacity: 1;
    background-color: rgba(124, 58, 237, 0.05);
}

/* صفحه فقط تلگرام */
.telegram-only {
    text-align: center;
    padding: 60px 20px;
    background-color: var(--surface-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    margin-bottom: 24px;
}

.telegram-only-content {
    max-width: 400px;
    margin: 0 auto;
}

.telegram-only .material-icons {
    font-size: 80px;
    margin-bottom: 20px;
    color: var(--error-color);
    opacity: 0.7;
}

.telegram-only h2 {
    font-size: 20px;
    margin-bottom: 16px;
    color: var(--on-surface);
}

.telegram-only p {
    color: var(--on-surface);
    opacity: 0.7;
    line-height: 1.6;
}

/* رسپانسیو */
@media (max-width: 768px) {
    :root {
        --header-height: 60px;
        --nav-height: 65px;
    }
    
    .header-content {
        padding: 0 16px;
    }
    
    .brand-name {
        font-size: 18px;
    }
    
    .app-main {
        padding: 16px;
    }
    
    .page-title {
        font-size: 24px;
    }
    
    .card {
        padding: 20px;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .suggestion-grid {
        grid-template-columns: 1fr;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .modal-content {
        width: 95%;
    }
    
    .notification-container {
        right: 16px;
        width: calc(100% - 32px);
    }
    
    .nav-container {
        padding: 0 16px;
    }
    
    .nav-item {
        padding: 8px;
        max-width: 70px;
    }
    
    .nav-item span {
        font-size: 11px;
    }
}

@media (max-width: 480px) {
    .header-content {
        padding: 0 12px;
    }
    
    .app-main {
        padding: 12px;
    }
    
    .card {
        padding: 16px;
    }
    
    .btn {
        padding: 14px 20px;
    }
    
    .modal-body {
        padding: 20px;
    }
    
    .modal-header {
        padding: 20px;
    }
    
    .profile-header {
        padding: 16px;
    }
    
    .profile-avatar {
        width: 80px;
        height: 80px;
    }
    
    .profile-avatar-inner {
        width: 64px;
        height: 64px;
        font-size: 24px;
    }
    
    .nav-item {
        max-width: 60px;
    }
    
    .nav-item span {
        font-size: 10px;
    }
}

/* پشتیبانی از مرورگرهای قدیمی */
@supports not (backdrop-filter: blur(10px)) {
    .app-header, .app-nav, .modal {
        background-color: rgba(var(--surface-color), 0.95);
    }
}

/* بهبود عملکرد لمسی */
@media (hover: none) {
    .btn:hover, .nav-item:hover, .theme-toggle:hover, .refresh-btn:hover, .copy-btn:hover, .modal-close:hover, .notification-close:hover {
        transform: none;
    }
    
    .card:hover {
        transform: none;
    }
    
    .feature-card:hover {
        transform: none;
    }
}

/* حالت چاپ */
@media print {
    .app-header, .app-nav, .theme-toggle, .btn {
        display: none;
    }
    
    .app-container {
        padding: 0;
    }
    
    .app-main {
        height: auto;
        overflow: visible;
    }
}













/* استایل‌های جدید برای بخش خرید - کاملاً ریسپانسیو دو به دو و یکسان */
.purchase-options {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 32px;
}

.purchase-option {
    background-color: var(--surface-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    padding: 16px;
    transition: var(--transition);
    border: 1px solid var(--outline-color);
    text-align: center;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 200px;
}

.purchase-option:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.discount-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 9px;
    font-weight: 700;
    z-index: 10;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
}

.option-header {
    margin-bottom: 12px;
    flex-grow: 0;
    padding-top: 5px;
}

.option-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 16px;
    margin: 0 auto 8px;
    box-shadow: 0 2px 6px rgba(124, 58, 237, 0.3);
    transition: var(--transition);
}

.purchase-option:hover .option-icon {
    transform: scale(1.05);
    box-shadow: 0 3px 8px rgba(124, 58, 237, 0.4);
}

.option-title {
    font-size: 14px;
    font-weight: 800;
    margin-bottom: 4px;
    color: var(--on-surface);
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.2;
}

.option-duration {
    color: var(--on-surface);
    opacity: 0.8;
    font-size: 10px;
    font-weight: 500;
    line-height: 1.3;
}

.option-pricing {
    margin-bottom: 12px;
    flex-grow: 0;
    padding: 8px;
    background: rgba(124, 58, 237, 0.03);
    border-radius: var(--radius-sm);
    border: 1px solid rgba(124, 58, 237, 0.1);
}

.original-price {
    text-decoration: line-through;
    color: var(--on-surface);
    opacity: 0.5;
    font-size: 11px;
    margin-bottom: 2px;
    font-weight: 600;
}

.final-price {
    font-size: 15px;
    font-weight: 900;
    color: var(--primary-color);
    margin-bottom: 6px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    line-height: 1.1;
}

.price-savings {
    background: linear-gradient(135deg, rgba(22, 163, 74, 0.15), rgba(22, 163, 74, 0.1));
    color: var(--success-color);
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 8px;
    font-weight: 700;
    display: inline-block;
    border: 1px solid rgba(22, 163, 74, 0.2);
}

.purchase-btn {
    width: 100%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border: none;
    border-radius: var(--radius);
    padding: 8px 12px;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    box-shadow: 0 2px 6px rgba(124, 58, 237, 0.3);
    margin-top: auto;
    position: relative;
    overflow: hidden;
}

.purchase-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.purchase-btn:hover::before {
    left: 100%;
}

.purchase-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(124, 58, 237, 0.4);
}

.purchase-btn:active {
    transform: translateY(0);
}

/* رسپانسیو برای بخش خرید - دو به دو در همه دستگاه‌ها */
@media (max-width: 1400px) {
    .purchase-options {
        grid-template-columns: repeat(2, 1fr);
        gap: 14px;
    }
    
    .purchase-option {
        padding: 18px;
        min-height: 220px;
    }
    
    .option-icon {
        width: 45px;
        height: 45px;
        font-size: 18px;
    }
    
    .option-title {
        font-size: 15px;
    }
    
    .final-price {
        font-size: 16px;
    }
    
    .purchase-btn {
        padding: 10px 14px;
        font-size: 12px;
    }
    
    .discount-badge {
        top: 12px;
        right: 12px;
        padding: 4px 10px;
        font-size: 10px;
    }
}

@media (max-width: 1200px) {
    .purchase-options {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .purchase-option {
        padding: 16px;
        min-height: 210px;
    }
}

@media (max-width: 992px) {
    .purchase-options {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .purchase-option {
        padding: 15px;
        min-height: 200px;
    }
    
    .option-icon {
        width: 42px;
        height: 42px;
        font-size: 17px;
    }
    
    .option-title {
        font-size: 14px;
    }
    
    .final-price {
        font-size: 15px;
    }
    
    .discount-badge {
        top: 10px;
        right: 10px;
        padding: 3px 8px;
        font-size: 9px;
    }
}

@media (max-width: 768px) {
    .purchase-options {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .purchase-option {
        padding: 14px;
        min-height: 190px;
    }
    
    .option-icon {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
    
    .option-title {
        font-size: 13px;
    }
    
    .option-duration {
        font-size: 10px;
    }
    
    .final-price {
        font-size: 14px;
    }
    
    .purchase-btn {
        padding: 8px 10px;
        font-size: 11px;
    }
    
    .discount-badge {
        top: 8px;
        right: 8px;
        padding: 3px 7px;
        font-size: 8px;
    }
}

@media (max-width: 640px) {
    .purchase-options {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
    
    .purchase-option {
        padding: 12px;
        min-height: 180px;
    }
    
    .option-icon {
        width: 36px;
        height: 36px;
        font-size: 15px;
        margin-bottom: 6px;
    }
    
    .option-title {
        font-size: 12px;
        margin-bottom: 3px;
    }
    
    .option-duration {
        font-size: 9px;
    }
    
    .option-pricing {
        padding: 6px;
        margin-bottom: 10px;
    }
    
    .final-price {
        font-size: 13px;
        margin-bottom: 4px;
    }
    
    .original-price {
        font-size: 10px;
        margin-bottom: 2px;
    }
    
    .purchase-btn {
        padding: 7px 9px;
        font-size: 10px;
    }
    
    .price-savings {
        font-size: 7px;
        padding: 1px 4px;
    }
    
    .discount-badge {
        top: 8px;
        right: 8px;
        padding: 2px 6px;
        font-size: 8px;
    }
}

@media (max-width: 480px) {
    .purchase-options {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
    
    .purchase-option {
        padding: 10px;
        min-height: 170px;
    }
    
    .option-icon {
        width: 32px;
        height: 32px;
        font-size: 14px;
    }
    
    .option-title {
        font-size: 11px;
    }
    
    .option-duration {
        font-size: 8px;
    }
    
    .final-price {
        font-size: 12px;
    }
    
    .purchase-btn {
        padding: 6px 8px;
        font-size: 9px;
    }
    
    .discount-badge {
        top: 6px;
        right: 6px;
        padding: 2px 5px;
        font-size: 7px;
    }
}

@media (max-width: 380px) {
    .purchase-options {
        grid-template-columns: repeat(2, 1fr);
        gap: 6px;
    }
    
    .purchase-option {
        padding: 8px;
        min-height: 160px;
    }
    
    .option-icon {
        width: 30px;
        height: 30px;
        font-size: 13px;
    }
    
    .option-title {
        font-size: 10px;
    }
    
    .final-price {
        font-size: 11px;
    }
    
    .purchase-btn {
        padding: 5px 7px;
        font-size: 8px;
    }
    
    .discount-badge {
        top: 5px;
        right: 5px;
        padding: 1px 4px;
        font-size: 6px;
    }
}

@media (max-width: 320px) {
    .purchase-options {
        grid-template-columns: repeat(2, 1fr);
        gap: 5px;
    }
    
    .purchase-option {
        padding: 6px;
        min-height: 150px;
    }
    
    .option-icon {
        width: 28px;
        height: 28px;
        font-size: 12px;
    }
    
    .option-title {
        font-size: 9px;
    }
    
    .final-price {
        font-size: 10px;
    }
    
    .discount-badge {
        top: 4px;
        right: 4px;
        padding: 1px 3px;
        font-size: 5px;
    }
}

/* انیمیشن‌های ظریف */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.purchase-option {
    animation: fadeInUp 0.3s ease forwards;
}

.purchase-option:nth-child(1) { animation-delay: 0.1s; }
.purchase-option:nth-child(2) { animation-delay: 0.15s; }
.purchase-option:nth-child(3) { animation-delay: 0.2s; }
.purchase-option:nth-child(4) { animation-delay: 0.25s; }
.purchase-option:nth-child(5) { animation-delay: 0.3s; }
.purchase-option:nth-child(6) { animation-delay: 0.35s; }

/* بخش هدیه */
.gift-section {
    margin-top: 24px;
}

.section-divider {
    text-align: center;
    margin: 20px 0;
    position: relative;
}

.section-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    right: 0;
    left: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--outline-color), transparent);
}

.section-divider span {
    background-color: var(--background-color);
    padding: 0 12px;
    color: var(--on-surface);
    opacity: 0.8;
    font-size: 11px;
    font-weight: 600;
    position: relative;
    z-index: 1;
}







































/* استایل‌های بخش راهنما */

/* گرید دکمه‌ها */
.guide-buttons-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 16px;
    margin-top: 24px;
}

/* دکمه‌های راهنما */
.guide-btn {
    background-color: var(--surface-color);
    border: 2px solid var(--outline-color);
    border-radius: var(--radius-lg);
    padding: 24px 16px;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    text-align: center;
    min-height: 120px;
    position: relative;
    overflow: hidden;
}

.guide-btn:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

.guide-btn-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 20px;
    transition: var(--transition);
}

.guide-btn:hover .guide-btn-icon {
    transform: scale(1.1);
}

.guide-btn-text {
    font-size: 16px;
    font-weight: 700;
    color: var(--on-surface);
    transition: var(--transition);
}

.guide-btn:hover .guide-btn-text {
    color: var(--primary-color);
}

/* مودال راهنما */
.guide-modal {
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
}

.guide-content {
    padding: 10px 0;
}

.command-item {
    background-color: var(--surface-color);
    border: 1px solid var(--outline-color);
    border-radius: var(--radius);
    padding: 16px;
    margin-bottom: 12px;
    transition: var(--transition);
}

.command-item:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow);
}

.command-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
    gap: 12px;
}

.command-name {
    font-size: 16px;
    font-weight: 700;
    color: var(--on-surface);
    flex: 1;
}

.command-syntax {
    font-family: monospace;
    font-size: 14px;
    color: var(--primary-color);
    background-color: rgba(124, 58, 237, 0.1);
    padding: 6px 10px;
    border-radius: 6px;
    direction: ltr;
    text-align: left;
    flex-shrink: 0;
}

.command-description {
    font-size: 14px;
    color: var(--on-surface);
    opacity: 0.8;
    line-height: 1.6;
    text-align: right;
}

.copy-btn-small {
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    padding: 6px 12px;
    font-size: 12px;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 8px;
}

.copy-btn-small:hover {
    background: var(--primary-dark);
}

/* استایل‌های ریسپانسیو */
@media (max-width: 768px) {
    .guide-buttons-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .guide-btn {
        padding: 20px 12px;
        min-height: 110px;
    }
    
    .guide-btn-icon {
        width: 44px;
        height: 44px;
        font-size: 18px;
    }
    
    .guide-btn-text {
        font-size: 14px;
    }
    
    .command-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .command-syntax {
        align-self: flex-start;
    }
}

@media (max-width: 480px) {
    .guide-buttons-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
    
    .guide-btn {
        padding: 16px 8px;
        min-height: 100px;
    }
    
    .guide-btn-icon {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
    
    .guide-btn-text {
        font-size: 13px;
    }
    
    .guide-modal {
        width: 95%;
    }
}

/* استایل‌های اضافی برای بخش راهنما */

/* حالت بدون دستور */
.no-commands {
    text-align: center;
    padding: 40px 20px;
    color: var(--on-surface);
    opacity: 0.7;
}

.no-commands i {
    font-size: 48px;
    margin-bottom: 16px;
    color: var(--primary-color);
    opacity: 0.5;
}

.no-commands h3 {
    font-size: 18px;
    margin-bottom: 8px;
}

.no-commands p {
    font-size: 14px;
}

/* انیمیشن‌های اضافی */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.guide-btn {
    animation: fadeInUp 0.3s ease forwards;
}

.guide-btn:nth-child(1) { animation-delay: 0.1s; }
.guide-btn:nth-child(2) { animation-delay: 0.15s; }
.guide-btn:nth-child(3) { animation-delay: 0.2s; }
.guide-btn:nth-child(4) { animation-delay: 0.25s; }
.guide-btn:nth-child(5) { animation-delay: 0.3s; }
.guide-btn:nth-child(6) { animation-delay: 0.35s; }
.guide-btn:nth-child(7) { animation-delay: 0.4s; }
.guide-btn:nth-child(8) { animation-delay: 0.45s; }

.command-item {
    animation: fadeInUp 0.3s ease forwards;
}
