/* ========================================
   المتغيرات العامة والوضع المظلم/الفاتح
   ======================================== */
:root {
    --primary: #667eea;
    --primary-dark: #5a67d8;
    --secondary: #764ba2;
    --success: #48bb78;
    --danger: #f56565;
    --warning: #ed8936;
    --dark-bg: #1a202c;
    --light-bg: #f7fafc;
    --dark-text: #2d3748;
    --light-text: #e2e8f0;
    --border: #e2e8f0;
}

[data-theme="dark"] {
    --bg-primary: #1a202c;
    --bg-secondary: #2d3748;
    --text-primary: #f7fafc;
    --text-secondary: #a0aec0;
    --border: #4a5568;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', 'Tahoma', Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

/* ========================================
   صفحة تسجيل الدخول (index.html)
   ======================================== */
.auth-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.auth-hero {
    text-align: center;
    margin-bottom: 50px;
}

.auth-logo {
    width: 80px;
    height: 80px;
    border-radius: 20px;
    margin-bottom: 20px;
}

.auth-hero h1 {
    color: white;
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.auth-hero p {
    color: rgba(255,255,255,0.9);
    font-size: 1.1rem;
}

.auth-cards {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
    margin-bottom: 40px;
}

.auth-card {
    background: white;
    border-radius: 24px;
    padding: 30px;
    width: 320px;
    text-align: center;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.auth-card:hover {
    transform: translateY(-5px);
}

.telegram-icon {
    font-size: 48px;
    color: #0088cc;
    margin-bottom: 15px;
}

.google-icon {
    font-size: 48px;
    color: #ea4335;
    margin-bottom: 15px;
}

.auth-card h3 {
    margin-bottom: 10px;
    color: #2d3748;
}

.auth-card p {
    color: #718096;
    font-size: 14px;
    margin-bottom: 20px;
}

.btn-telegram-dev, .btn-google-dev {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 12px;
    font-size: 14px;
    cursor: pointer;
    margin-top: 10px;
    background: #e2e8f0;
    color: #4a5568;
}

.btn-telegram-dev:hover, .btn-google-dev:hover {
    background: #cbd5e0;
}

.btn-google {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 12px;
    font-size: 14px;
    cursor: pointer;
    background: #ea4335;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn-google:hover {
    background: #d33426;
}

.dev-note {
    display: block;
    font-size: 10px;
    color: #a0aec0;
    margin-top: 8px;
}

.auth-footer {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255,255,255,0.2);
}

.auth-footer a {
    color: white;
    text-decoration: none;
    margin: 0 15px;
    font-size: 14px;
}

.auth-footer a:hover {
    text-decoration: underline;
}

/* ========================================
   لوحة التحكم (dashboard.html)
   ======================================== */
.dashboard-container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 280px;
    background: white;
    box-shadow: 2px 0 10px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
}

.sidebar-header {
    padding: 25px;
    text-align: center;
    border-bottom: 1px solid var(--border);
}

.sidebar-logo {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    margin-bottom: 10px;
}

.sidebar-header h2 {
    font-size: 1.2rem;
    color: var(--primary);
}

.sidebar-nav {
    flex: 1;
    padding: 20px 0;
}

.nav-item {
    width: 100%;
    padding: 12px 25px;
    text-align: right;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 14px;
    color: #4a5568;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 12px;
}

.nav-item i {
    width: 20px;
}

.nav-item:hover {
    background: #f0f4ff;
    color: var(--primary);
}

.nav-item.active {
    background: linear-gradient(135deg, #667eea15, #764ba215);
    color: var(--primary);
    border-right: 3px solid var(--primary);
}

.sidebar-footer {
    padding: 20px;
    border-top: 1px solid var(--border);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    background: #f7fafc;
    border-radius: 12px;
    margin-bottom: 15px;
}

.user-info i {
    font-size: 24px;
    color: var(--primary);
}

.user-info span {
    font-size: 14px;
    font-weight: 500;
}

.logout-btn {
    width: 100%;
    padding: 10px;
    background: #f56565;
    color: white;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s;
}

.logout-btn:hover {
    background: #e53e3e;
}

/* Main Content */
.main-content {
    flex: 1;
    margin-right: 280px;
    padding: 30px;
    background: #f7fafc;
    min-height: 100vh;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* البطاقات */
.card {
    background: white;
    border-radius: 20px;
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.card h3 {
    margin-bottom: 15px;
    color: #2d3748;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* بطاقة فحص اليوزرنيم */
.username-checker-card .description {
    margin-bottom: 15px;
    font-size: 14px;
    color: #718096;
}

.btn-username-checker {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    text-decoration: none;
    padding: 12px 20px;
    border-radius: 12px;
    font-weight: bold;
    transition: all 0.3s ease;
}

.btn-username-checker:hover {
    transform: translateY(-2px);
    opacity: 0.95;
}

.disclaimer {
    font-size: 11px;
    color: #a0aec0;
    margin-top: 12px;
    text-align: center;
    padding-top: 10px;
    border-top: 1px solid var(--border);
}

/* الحسابات المسجلة */
.accounts-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.account-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px;
    background: #f7fafc;
    border-radius: 12px;
}

.account-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.account-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.btn-analyze {
    padding: 6px 16px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    font-size: 12px;
}

.btn-analyze.coming-soon {
    background: #cbd5e0;
    cursor: not-allowed;
}

/* التحليلات */
.analysis-card {
    background: #f7fafc;
    border-radius: 16px;
    padding: 15px;
    margin-bottom: 15px;
}

.analysis-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 10px 0;
}

.stat-mini {
    background: white;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    color: #667eea;
}

.action-buttons {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

.btn-details, .btn-download, .btn-ai {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 11px;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
}

.btn-details { background: #667eea; color: white; }
.btn-download { background: #48bb78; color: white; }
.btn-ai { background: linear-gradient(135deg, #9b59b6, #8e44ad); color: white; }
.btn-ai-premium { background: #cbd5e0; color: #718096; cursor: not-allowed; }

/* النافذة المنبثقة */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background: white;
    border-radius: 20px;
    max-width: 90%;
    max-height: 80%;
    overflow-y: auto;
    padding: 20px;
}

/* Toast */
.toast-message {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background: #48bb78;
    color: white;
    padding: 12px 24px;
    border-radius: 40px;
    display: none;
    z-index: 1002;
    font-size: 14px;
}

/* Loading Spinner */
.loading-spinner {
    text-align: center;
    padding: 40px;
    color: #a0aec0;
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar {
        width: 80px;
    }
    .sidebar-header h2,
    .nav-item span,
    .user-info span,
    .logout-btn span {
        display: none;
    }
    .nav-item i {
        font-size: 20px;
    }
    .main-content {
        margin-right: 80px;
    }
    .auth-cards {
        flex-direction: column;
        align-items: center;
    }
}