
/* ============================================
   LIBRARY (KÜTÜPHANE) STYLES
   ============================================ */
.form-row {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}
.form-row .form-group {
    flex: 1 1 160px;
}
.helper-text {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.library-header {
    margin-bottom: var(--spacing-2xl);
}

.library-list {
    display: grid;
    gap: var(--spacing-lg);
}

.library-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: var(--spacing-xl);
    transition: all var(--transition-base);
    box-shadow: var(--shadow-sm);
}

.library-card:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.library-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: var(--spacing-lg);
    gap: var(--spacing-md);
}

.library-card-title {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: var(--spacing-xs);
    color: var(--text-primary);
}

.library-card-desc {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin: 0;
}

.btn-icon {
    background: transparent;
    border: none;
    font-size: 1.3rem;
    cursor: pointer;
    padding: var(--spacing-xs);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

.btn-icon:hover {
    background: var(--danger);
    transform: scale(1.1);
}

.library-card-info {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-md);
    padding: var(--spacing-md) 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    margin-bottom: var(--spacing-lg);
}

.library-info-item {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.info-icon {
    font-size: 1.1rem;
}

.library-card-actions {
    display: flex;
    gap: var(--spacing-sm);
    flex-wrap: wrap;
}

.library-card-actions .btn {
    padding: var(--spacing-sm) var(--spacing-md);
    font-size: 0.9rem;
}

/* Dark Mode */
[data-theme="dark"] .library-card {
    background: var(--bg-secondary);
    border-color: var(--border);
}

[data-theme="dark"] .library-card:hover {
    background: var(--card-hover);
    border-color: var(--primary);
    box-shadow: var(--shadow-lg), var(--glow-primary);
}

/* ============================================
   MODAL STYLES
   ============================================ */

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: var(--z-modal);
    padding: var(--spacing-lg);
    animation: fadeIn 0.2s ease-out;
}

.modal-content {
    background: var(--card-bg);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    width: 100%;
    max-width: 800px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    animation: scaleIn 0.3s ease-out;
}

.modal-header {
    padding: var(--spacing-xl);
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    margin: 0;
    font-size: 1.5rem;
}

.modal-close {
    background: transparent;
    border: none;
    font-size: 2rem;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

.modal-close:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.modal-body {
    padding: var(--spacing-xl);
    overflow-y: auto;
    flex: 1;
}

.modal-footer {
    padding: var(--spacing-xl);
    border-top: 1px solid var(--border);
    display: flex;
    gap: var(--spacing-md);
    justify-content: flex-end;
}

/* Dark Mode Modal */
[data-theme="dark"] .modal-overlay {
    background: rgba(0, 0, 0, 0.8);
}

[data-theme="dark"] .modal-content {
    background: var(--card-bg);
    border: 1px solid var(--border);
}

/* ============================================
   QUIZ - GERİ BUTONU GÖRÜNÜRLÜĞÜ
   ============================================ */

/* Önceki buton her zaman görünsün (ilk soru hariç) */
#prevBtn {
    display: inline-flex;
}

#prevBtn[disabled] {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ============================================
   RESPONSIVE - LIBRARY
   ============================================ */

@media (max-width: 767px) {
    .library-card-header {
        flex-direction: column;
    }
    
    .library-card-actions {
        flex-direction: column;
    }
    
    .library-card-actions .btn {
        width: 100%;
    }
    
    .library-info-item {
        font-size: 0.85rem;
    }
    
    .modal-content {
        max-height: 95vh;
    }
    
    .modal-header,
    .modal-body,
    .modal-footer {
        padding: var(--spacing-md);
    }
}

/* ============================================
   ANIMATIONS
   ============================================ */

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* ============================================
   TESTIFY - MODERN EDUCATION PLATFORM STYLES
   ============================================ */

/* CSS Variables - Design Tokens */
:root {
    /* Colors - Light Mode */
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #a78bfa;
    --primary-hover: #5b5fc7;

    /* Primary helper renkler (chat + toast için) */
    --primary-strong: var(--primary-dark);
    --primary-soft: rgba(99, 102, 241, 0.08);
    --primary-soft-2: rgba(99, 102, 241, 0.16);

    /* Soft background / badge tonları (light) */
    --primary-soft-bg: rgba(79, 70, 229, 0.10);
    --success-light: #d1fae5;
    --warning-light: #fef3c7;
    --danger-light: #fee2e2;
    --info-light: #e0f2fe;

    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --info: #3b82f6;

    /* Background Colors */
    --bg: #ffffff;
    --bg-primary: #ffffff;
    --bg-secondary: #f3f4f6;
    --bg-tertiary: #f9fafb;
    --bg-hover: rgba(99, 102, 241, 0.05);

    /* Yükseltilmiş yüzeyler (chat, toast vb.) */
    --bg-elevated: #ffffff;
    --bg-elevated-soft: rgba(255, 255, 255, 0.98);

    /* Text Colors */
    --text-primary: #111827;
    --text-secondary: #6b7280;
    --text-tertiary: #9ca3af;

    /* Border & Dividers */
    --border: #e5e7eb;
    --border-light: #f3f4f6;
    --border-dark: #d1d5db;

    /* Yeni border yardımcıları (chat + toast) */
    --border-soft: rgba(148, 163, 184, 0.35);
    --border-strong: rgba(148, 163, 184, 0.6);

    /* Ek yardımcı renkler (YKS, Pro, Chat vs.) */
    --accent: var(--primary);
    --accent-soft: rgba(99, 102, 241, 0.18);
    --border-subtle: rgba(148, 163, 184, 0.25);

    /* Card & Surface */
    --card-bg: #ffffff;
    --card-hover: #f9fafb;

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1),
              0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --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);

    /* Chat & toast için ekstra yumuşak gölge */
    --shadow-soft: 0 18px 45px rgba(15, 23, 42, 0.28);

    /* Transitions */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 200ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 300ms cubic-bezier(0.4, 0, 0.2, 1);

    /* Spacing */
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    --spacing-2xl: 3rem;
    --spacing-3xl: 3.5rem;

    /* Border Radius */
    --radius-sm: 0.25rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-full: 9999px;

    /* Z-index */
    --z-dropdown: 1000;
    --z-sticky: 1020;
    --z-fixed: 1030;
    --z-modal-backdrop: 1040;
    --z-modal: 1050;
    --z-popover: 1060;
    --z-tooltip: 1070;
}


/* Dark Mode - PROFESYONEL RENKLER ✨ */
[data-theme="dark"] {
    /* Vibrant Renkler */
    --primary: #818cf8;
    --primary-dark: #6366f1;
    --primary-light: #a5b4fc;
    --primary-hover: #7c3aed;
    --success: #34d399;
    --danger: #f87171;
    --warning: #fbbf24;
    --info: #60a5fa;

    /* Soft background / badge tonları (dark) */
    --primary-soft-bg: rgba(79, 70, 229, 0.15);
    --success-light: rgba(16, 185, 129, 0.15);
    --warning-light: rgba(245, 158, 11, 0.15);
    --danger-light: rgba(239, 68, 68, 0.15);
    --info-light: rgba(14, 165, 233, 0.15);

    /* Katmanlı Siyah Tonlar */
    --bg: #0a0a0a; /* En koyu - body */
    --bg-primary: #020617; /* Ana kart yüzey */
    --bg-secondary: #1a1a1a; /* Kartlar */
    --bg-tertiary: #2a2a2a; /* Hover durumları */
    --bg-hover: rgba(129, 140, 248, 0.15);

    /* Yükseltilmiş yüzeyler */
    --bg-elevated: #020617;
    --bg-elevated-soft: rgba(15, 23, 42, 0.98);

    /* Yüksek Kontrast Metin */
    --text-primary: #f5f5f5;
    --text-secondary: #d4d4d8;
    --text-tertiary: #a1a1aa;

    /* Belirgin Kenarlıklar */
    --border: #3a3a3a;
    --border-light: #2a2a2a;
    --border-dark: #4a4a4a;
    --border-subtle: rgba(148, 163, 184, 0.45);

    /* Kontrast Kartlar */
    --card-bg: #1a1a1a;
    --card-hover: #2a2a2a;

    /* Ek yardımcı renkler */
    --accent: var(--primary);
    --accent-soft: rgba(129, 140, 248, 0.35);

    /* Işıltılı Gölgeler */
    --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.9);
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.95), 0 0 0 1px rgba(129, 140, 248, 0.1);
    --shadow-md: 0 8px 20px rgba(0, 0, 0, 0.95), 0 0 0 1px rgba(129, 140, 248, 0.12);
    --shadow-lg: 0 12px 28px rgba(0, 0, 0, 0.97), 0 0 0 1px rgba(129, 140, 248, 0.15);
    --shadow-xl: 0 20px 40px rgba(0, 0, 0, 0.98), 0 0 0 1px rgba(129, 140, 248, 0.2);

    /* Accent Işıltı */
    --glow-primary: 0 0 24px rgba(129, 140, 248, 0.5);
    --glow-success: 0 0 24px rgba(52, 211, 153, 0.5);
    --glow-danger: 0 0 24px rgba(248, 113, 113, 0.5);
}

/* ============================================
   DARK MODE İYİLEŞTİRMELERİ - HEADER
   ============================================ */

[data-theme="dark"] .header {
    background: var(--card-bg);
    border-bottom: 1px solid var(--border);
}


.logo {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 0.75rem;
    border-radius: var(--radius-full);
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--text-primary);
    text-decoration: none;
    background: transparent;
    transition:
        background var(--transition-fast),
        color var(--transition-fast),
        transform var(--transition-fast),
        box-shadow var(--transition-fast);
}

.logo span[role="img"] {
    font-size: 1.3rem;
}

.logo:hover {
    background: var(--bg-hover);
    color: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

[data-theme="dark"] .logo {
    color: #e5e7eb;
}

[data-theme="dark"] .logo:hover {
    background: rgba(15, 23, 42, 0.8);
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.7);
}


/* ============================================
   DARK MODE İYİLEŞTİRMELERİ - NAV TABS
   ============================================ */

[data-theme="dark"] .nav-tab {
    color: var(--text-secondary);
    background: transparent;
    border-bottom: 2px solid transparent;
}

[data-theme="dark"] .nav-tab:hover {
    color: var(--primary);
    background: var(--bg-hover);
}

[data-theme="dark"] .nav-tab.active {
    color: var(--primary);
    background: var(--bg-secondary);
    border-bottom-color: var(--primary);
}

/* ============================================
   DARK MODE İYİLEŞTİRMELERİ - KARTLAR
   ============================================ */

[data-theme="dark"] .stat-card,
[data-theme="dark"] .test-option-card,
[data-theme="dark"] .note-card,
[data-theme="dark"] .activity-item {
    background: var(--card-bg);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-md);
}

[data-theme="dark"] .stat-card:hover,
[data-theme="dark"] .test-option-card:hover,
[data-theme="dark"] .note-card:hover {
    background: var(--card-hover);
    border-color: var(--primary);
    box-shadow: var(--shadow-lg), var(--glow-primary);
    transform: translateY(-2px);
}

/* Smooth geçişler için */
[data-theme="dark"] * {
    transition:
        background var(--transition-base),
        border var(--transition-base),
        color var(--transition-base),
        box-shadow var(--transition-base);
}

/* ============================================
   BASE STYLES & RESET
   ============================================ */

*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: var(--bg);
    color: var(--text-primary);
    min-height: 100vh;
    transition: background var(--transition-base), color var(--transition-base);
    line-height: 1.6;
}

/* Focus Styles for Accessibility */
*:focus {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

*:focus:not(:focus-visible) {
    outline: none;
}

*:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* Screen Reader Only */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Skip Link for Accessibility */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--primary);
    color: white;
    padding: 8px 16px;
    text-decoration: none;
    z-index: 9999;
    border-radius: 0 0 var(--radius-md) 0;
}

.skip-link:focus {
    top: 0;
}

/* ============================================
   TYPOGRAPHY
   ============================================ */

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    color: var(--text-primary);
    margin-bottom: var(--spacing-md);
}

h1 {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
}

h2 {
    font-size: clamp(1.5rem, 3.5vw, 2rem);
}

h3 {
    font-size: clamp(1.25rem, 3vw, 1.5rem);
}

p {
    margin-bottom: var(--spacing-md);
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--primary-dark);
}

/* ============================================
   HEADER
   ============================================ */

.header {
    background: var(--card-bg);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: var(--z-sticky);
    transition: all var(--transition-base);
}

.header-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 var(--spacing-lg);
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-md) 0;
    border-bottom: 1px solid var(--border);
}

/* bu .logo bloğu üstteki ile birleşik çalışıyor, ekstra border-radius vs kalıyor */
.logo {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    text-decoration: none;
    transition: transform var(--transition-fast);
}

.logo:hover {
    transform: scale(1.05);
}

.logo:focus {
    outline-color: var(--primary);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: var(--spacing-lg);
}

/* Theme Toggle */
.theme-toggle {
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    width: 60px;
    height: 30px;
    position: relative;
    cursor: pointer;
    transition: all var(--transition-base);
}

.theme-toggle:hover {
    background: var(--border-dark);
}

.theme-toggle-slider {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 24px;
    height: 24px;
    background: var(--primary);
    border-radius: 50%;
    transition: all var(--transition-base);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 12px;
}

[data-theme="dark"] .theme-toggle-slider {
    left: 33px;
}

/* User Stats */
.user-stats {
    display: flex;
    gap: var(--spacing-md);
    align-items: center;
}

.stat-badge {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    padding: var(--spacing-xs) var(--spacing-md);
    background: var(--bg-secondary);
    border-radius: var(--radius-full);
    font-size: 0.9rem;
    transition: all var(--transition-fast);
    cursor: default;
}

.stat-badge:hover {
    background: var(--bg-tertiary);
    transform: translateY(-1px);
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
    border: none;
}

.user-avatar:hover {
    transform: scale(1.1);
    box-shadow: var(--shadow-lg);
}

/* Navigation Tabs */
.nav-tabs {
    display: flex;
    gap: 0;
    padding: 0;
    overflow-x: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--border) transparent;
}

.nav-tabs::-webkit-scrollbar {
    height: 4px;
}

.nav-tabs::-webkit-scrollbar-track {
    background: transparent;
}

.nav-tabs::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: var(--radius-sm);
}

.nav-tab {
    padding: var(--spacing-md) var(--spacing-lg);
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    position: relative;
    transition: all var(--transition-fast);
    white-space: nowrap;
    font-family: inherit;
}

.nav-tab:hover {
    color: var(--primary);
    background: var(--bg-hover);
}

.nav-tab.active {
    color: var(--primary);
}

.nav-tab.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--primary);
}

/* ============================================
   MAIN LAYOUT
   ============================================ */

.main-container {
    max-width: 1400px;
    margin: var(--spacing-lg) auto;
    padding: 0 var(--spacing-lg);
    display: flex;
    gap: var(--spacing-lg);
}

/* ============================================
   GLOBAL REKLAM ALANLARI
   ============================================ */

.global-ad-row {
    max-width: 1400px;
    margin: var(--spacing-md) auto;
    padding: 0 var(--spacing-lg);
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--spacing-md);
}

.ad-slot {
    background: var(--bg-secondary);
    border: 1px dashed var(--border);
    border-radius: var(--radius-lg);
    min-height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    font-size: 0.8rem;
    text-align: center;
    overflow: hidden;
}

.ad-slot--top {
}

.ad-slot--bottom {
}

/* Yan sabit reklamlar (sadece PC) */
.global-side-ad {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    width: 160px;
    min-height: 600px;
    background: var(--bg-secondary);
    border: 1px dashed var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    font-size: 0.8rem;
    z-index: 50;
}

.global-side-ad--left {
    left: 0.75rem;
}

.global-side-ad--right {
    right: 0.75rem;
}

/* Desktop / mobile görünürlük sınıfları */
.ad-slot--mobile-only {
    display: none;
}

.ad-slot--desktop-or-mobile {
    display: flex;
}

/* =========================
   MOBİL DÜZEN (üstte 3, altta 3)
   ========================= */

@media (max-width: 767px) {
    .global-ad-row {
        max-width: 100%;
        padding: 0 var(--spacing-md);
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: var(--spacing-sm);
        margin: var(--spacing-sm) auto;
    }

    .ad-slot {
        min-height: 60px;
        border-radius: var(--radius-md);
        font-size: 0.75rem;
        padding: var(--spacing-xs);
    }

    .ad-slot--mobile-only {
        display: flex;
    }

    .global-side-ad {
        display: none !important;
    }
}

@media (max-width: 480px) {
    .global-ad-row {
        padding: 0 var(--spacing-sm);
    }
    .ad-slot {
        min-height: 50px;
        font-size: 0.7rem;
    }
}


/* ============================================
   AI ASSISTANT SIDEBAR
   ============================================ */

.ai-sidebar {
    width: 350px;
    background: var(--card-bg);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow);
    height: calc(100vh - 140px);
    display: flex;
    flex-direction: column;
    transition: all var(--transition-base);
    position: sticky;
    top: 140px;
}

.ai-header {
    padding: var(--spacing-lg);
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
}

.ai-title {
    font-size: 1.2rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    margin: 0;
}

.ai-status {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    margin-top: var(--spacing-xs);
    font-size: 0.85rem;
    opacity: 0.9;
}

.status-dot {
    width: 8px;
    height: 8px;
    background: var(--success);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.7;
        transform: scale(1.2);
    }
}

.ai-chat {
    flex: 1;
    overflow-y: auto;
    padding: var(--spacing-lg);
    background: var(--bg-secondary);
    scrollbar-width: thin;
    scrollbar-color: var(--border) transparent;
}

.ai-chat::-webkit-scrollbar {
    width: 6px;
}

.ai-chat::-webkit-scrollbar-track {
    background: transparent;
}

.ai-chat::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: var(--radius-sm);
}

.ai-message {
    margin-bottom: var(--spacing-md);
    display: flex;
    gap: var(--spacing-sm);
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.ai-avatar {
    width: 32px;
    height: 32px;
    min-width: 32px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.message-content {
    background: var(--card-bg);
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: var(--radius-xl);
    flex: 1;
    box-shadow: var(--shadow-sm);
    word-wrap: break-word;
}

.user-message {
    flex-direction: row-reverse;
}

.user-message .message-content {
    background: var(--primary);
    color: white;
}

.ai-input-container {
    padding: var(--spacing-lg);
    background: var(--card-bg);
    border-top: 1px solid var(--border);
    border-radius: 0 0 var(--radius-xl) var(--radius-xl);
}

.ai-input-group {
    display: flex;
    gap: var(--spacing-sm);
}

.ai-input {
    flex: 1;
    padding: var(--spacing-md);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    font-size: 0.95rem;
    background: var(--bg);
    color: var(--text-primary);
    transition: all var(--transition-fast);
    font-family: inherit;
}

.ai-input:hover {
    border-color: var(--border-dark);
}

.ai-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--bg-hover);
}

.ai-send-btn {
    padding: var(--spacing-md) var(--spacing-lg);
    background: var(--primary);
    color: white;
    border: none;
    border-radius: var(--radius-lg);
    cursor: pointer;
    font-weight: 500;
    transition: all var(--transition-fast);
    font-family: inherit;
}

.ai-send-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

.ai-send-btn:active {
    transform: translateY(0);
}

/* ============================================
   MAIN CONTENT
   ============================================ */

.main-content {
    flex: 1;
    background: var(--card-bg);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow);
    padding: var(--spacing-2xl);
    min-height: calc(100vh - 140px);
    transition: all var(--transition-base);
}

/* Tab Contents */
.tab-content {
    display: none;
    animation: fadeIn 0.3s ease-out;
}

.tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
   DASHBOARD
   ============================================ */

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-2xl);
}

.stat-card {
    background: var(--bg-secondary);
    padding: var(--spacing-xl);
    border-radius: var(--radius-lg);
    text-align: center;
    transition: all var(--transition-fast);
    border: 1px solid transparent;
}

.stat-card:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.stat-icon {
    font-size: 2.5rem;
    margin-bottom: var(--spacing-sm);
}

.stat-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--spacing-xs);
}

.stat-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Recent Activity */
.recent-activity {
    margin-top: var(--spacing-2xl);
}

.activity-list {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

/* ============================================
   TEST PAGES
   ============================================ */

.test-page {
    display: none;
    animation: fadeIn 0.3s ease-out;
}

.test-page.active {
    display: block;
}

/* Test Selection */
.test-selection {
    padding: var(--spacing-lg);
}

.test-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--spacing-lg);
    margin-top: var(--spacing-lg);
}

.test-option-card {
    background: var(--bg-secondary);
    border: 2px solid transparent;
    border-radius: var(--radius-xl);
    padding: var(--spacing-2xl);
    text-align: center;
    cursor: pointer;
    transition: all var(--transition-base);
}

.test-option-card:hover,
.test-option-card:focus {
    border-color: var(--primary);
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    background: var(--card-hover);
}

.test-option-icon {
    font-size: 3rem;
    margin-bottom: var(--spacing-md);
}

.test-option-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--spacing-sm);
}

.test-option-desc {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin: 0;
}

/* Quiz Page */
.quiz-container {
    max-width: 800px;
    margin: 0 auto;
    padding: var(--spacing-lg);
}

.quiz-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-2xl);
    padding-bottom: var(--spacing-lg);
    border-bottom: 1px solid var(--border);
}

.quiz-info {
    display: flex;
    gap: var(--spacing-lg);
    align-items: center;
    font-weight: 500;
}

.quiz-progress-bar {
    width: 100%;
    height: 8px;
    background: var(--bg-secondary);
    border-radius: var(--radius-sm);
    overflow: hidden;
    margin-bottom: var(--spacing-2xl);
}

.quiz-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--primary-light));
    transition: width var(--transition-slow);
    border-radius: var(--radius-sm);
}

.question-card {
    background: var(--bg-secondary);
    border-radius: var(--radius-xl);
    padding: var(--spacing-2xl);
    margin-bottom: var(--spacing-lg);
}

.question-text {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: var(--spacing-2xl);
    line-height: 1.6;
}

.options-list {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
    border: none;
}

.option-item {
    padding: var(--spacing-md) var(--spacing-lg);
    background: var(--card-bg);
    border: 2px solid var(--border);
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
}

.option-item:hover {
    border-color: var(--primary);
    background: var(--bg-hover);
    transform: translateX(5px);
}

.option-letter {
    width: 32px;
    height: 32px;
    min-width: 32px;
    border-radius: 50%;
    background: var(--bg-tertiary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: var(--text-secondary);
    transition: all var(--transition-fast);
}

.option-item.selected {
    border-color: var(--primary);
    background: var(--bg-hover);
}

.option-item.selected .option-letter {
    background: var(--primary);
    color: white;
}

.option-item.correct {
    border-color: var(--success);
    background: rgba(16, 185, 129, 0.1);
}

.option-item.correct .option-letter {
    background: var(--success);
    color: white;
}

.option-item.incorrect {
    border-color: var(--danger);
    background: rgba(239, 68, 68, 0.1);
}

.option-item.incorrect .option-letter {
    background: var(--danger);
    color: white;
}

.option-item.disabled {
    pointer-events: none;
    opacity: 0.7;
}

/* Quiz Actions */
.quiz-actions {
    display: flex;
    justify-content: center;
    gap: var(--spacing-md);
    margin-top: var(--spacing-2xl);
    flex-wrap: wrap;
}

/* ============================================
   BUTTONS
   ============================================ */

.btn {
    padding: var(--spacing-md) var(--spacing-2xl);
    border-radius: var(--radius-lg);
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
    border: none;
    font-size: 0.95rem;
    font-family: inherit;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover:not(:disabled) {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-primary:active:not(:disabled) {
    transform: translateY(0);
}

.btn-secondary {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 1px solid var(--border);
}

.btn-secondary:hover:not(:disabled) {
    background: var(--bg-tertiary);
    border-color: var(--border-dark);
}

.btn-large {
    padding: var(--spacing-lg) var(--spacing-2xl);
    font-size: 1rem;
    width: 100%;
}

/* ============================================
   RESULTS PAGE
   ============================================ */

.results-container {
    text-align: center;
    padding: var(--spacing-2xl);
}

.results-icon {
    font-size: 4rem;
    margin-bottom: var(--spacing-lg);
    animation: bounceIn 0.6s ease-out;
}

@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }

    50% {
        transform: scale(1.05);
    }

    100% {
        opacity: 1;
        transform: scale(1);
    }
}

.results-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: var(--spacing-sm);
}

.results-score {
    font-size: 3rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: var(--spacing-2xl);
}

.results-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: var(--spacing-lg);
    max-width: 600px;
    margin: 0 auto var(--spacing-2xl);
}

.result-stat {
    padding: var(--spacing-lg);
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
}

.result-value {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: var(--spacing-xs);
    display: block;
}

.result-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin: 0;
}

.success-color {
    color: var(--success);
}

.danger-color {
    color: var(--danger);
}

.primary-color {
    color: var(--primary);
}

/* ============================================
   FORMS
   ============================================ */

.form-group {
    margin-bottom: var(--spacing-xl);
}

.form-group label {
    display: block;
    margin-bottom: var(--spacing-sm);
    font-weight: 600;
    color: var(--text-primary);
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"],
.form-group select,
.form-group textarea {
    width: 100%;
    max-width: 500px;
    padding: var(--spacing-md);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    font-size: 0.95rem;
    background: var(--bg);
    color: var(--text-primary);
    transition: all var(--transition-fast);
    font-family: inherit;
}

.form-group input:hover,
.form-group select:hover,
.form-group textarea:hover {
    border-color: var(--border-dark);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--bg-hover);
    outline: none;
}

.form-group textarea {
    min-height: 120px;
    resize: vertical;
}

.required {
    color: var(--danger);
    margin-left: 2px;
}

.error-message {
    display: block;
    color: var(--danger);
    font-size: 0.85rem;
    margin-top: var(--spacing-xs);
    min-height: 1.2em;
}

/* Checkbox Group */
.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: var(--primary);
}

.form-actions {
    display: flex;
    gap: var(--spacing-md);
    margin-top: var(--spacing-2xl);
}

/* File Upload */
.file-upload-area {
    border: 2px dashed var(--border);
    border-radius: var(--radius-lg);
    padding: var(--spacing-2xl);
    text-align: center;
    cursor: pointer;
    transition: all var(--transition-fast);
    position: relative;
}

.file-upload-area:hover {
    border-color: var(--primary);
    background: var(--bg-hover);
}

.file-upload-area input[type="file"] {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

.file-upload-content {
    pointer-events: none;
}

.file-icon {
    font-size: 3rem;
    margin-bottom: var(--spacing-sm);
}

.file-hint {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin: var(--spacing-xs) 0 0;
}

.file-info {
    margin-top: var(--spacing-md);
    padding: var(--spacing-md);
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    font-size: 0.9rem;
}

/* ============================================
   LEADERBOARD
   ============================================ */

.leaderboard-container {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.leaderboard-header {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    padding: var(--spacing-xl);
}

.leaderboard-header h1 {
    margin: 0;
    color: white;
}

.leaderboard-header p {
    margin: var(--spacing-xs) 0 0;
    opacity: 0.9;
    font-size: 0.9rem;
}

.table-responsive {
    overflow-x: auto;
}

.leaderboard-table {
    width: 100%;
    border-collapse: collapse;
}

.leaderboard-table th {
    background: var(--bg-secondary);
    padding: var(--spacing-md);
    text-align: left;
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.leaderboard-table td {
    padding: var(--spacing-md);
    border-bottom: 1px solid var(--border);
}

.leaderboard-table tr:last-child td {
    border-bottom: none;
}

.leaderboard-table tbody tr {
    transition: background var(--transition-fast);
}

.leaderboard-table tbody tr:hover {
    background: var(--bg-hover);
}

.rank-badge {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.9rem;
}

.rank-1 {
    background: linear-gradient(135deg, #ffd700, #ffed4e);
    color: #875a00;
}

.rank-2 {
    background: linear-gradient(135deg, #c0c0c0, #e8e8e8);
    color: #555;
}

.rank-3 {
    background: linear-gradient(135deg, #cd7f32, #e4a853);
    color: #fff;
}

.rank-default {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
}

.user-info {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.user-avatar-small {
    width: 35px;
    height: 35px;
    min-width: 35px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.9rem;
}

.empty-cell {
    text-align: center;
    padding: var(--spacing-2xl);
    color: var(--text-secondary);
}

/* ============================================
   NOTES
   ============================================ */

.notes-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-xl);
}

.notes-list {
    display: grid;
    gap: var(--spacing-md);
}

.note-card {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    transition: all var(--transition-fast);
    border: 1px solid transparent;
}

.note-card:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.note-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: var(--spacing-sm);
}

.note-content {
    color: var(--text-secondary);
    margin-bottom: var(--spacing-md);
}

.note-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    color: var(--text-tertiary);
}

/* ============================================
   EMPTY STATES
   ============================================ */

.empty-state {
    text-align: center;
    padding: var(--spacing-2xl);
    color: var(--text-secondary);
}

.empty-state-icon {
    font-size: 3rem;
    margin-bottom: var(--spacing-md);
    opacity: 0.5;
}

.empty-state p {
    margin: 0;
}

/* ============================================
   LOADING & OVERLAYS
   ============================================ */

.loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: var(--z-modal);
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition-base);
}

.loading-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.loading-spinner {
    width: 48px;
    height: 48px;
    border: 4px solid var(--bg-tertiary);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid var(--bg-tertiary);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* ============================================
   TOAST NOTIFICATIONS
   ============================================ */

.toast-container {
    position: fixed;
    top: 80px;
    right: var(--spacing-lg);
    z-index: var(--z-tooltip);
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
    max-width: 400px;
}

.toast {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    padding: var(--spacing-md) var(--spacing-lg);
    box-shadow: var(--shadow-xl);
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    animation: slideInRight 0.3s ease-out;
    border-left: 4px solid var(--primary);
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100%);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.toast.success {
    border-left-color: var(--success);
}

.toast.error {
    border-left-color: var(--danger);
}

.toast.warning {
    border-left-color: var(--warning);
}

.toast.info {
    border-left-color: var(--info);
}

.toast-icon {
    font-size: 1.5rem;
}

.toast-content {
    flex: 1;
}

.toast-title {
    font-weight: 600;
    margin-bottom: var(--spacing-xs);
}

.toast-message {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin: 0;
}

.toast-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 1.2rem;
    padding: var(--spacing-xs);
    transition: color var(--transition-fast);
}

.toast-close:hover {
    color: var(--text-primary);
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

/* Large Desktop (1440px+) */
@media (min-width: 1440px) {
    .main-container {
        max-width: 1600px;
    }

    .ai-sidebar {
        width: 400px;
    }
}

/* Laptop (1024px - 1439px) */
@media (max-width: 1439px) {
    .header-content,
    .main-container {
        max-width: 1200px;
    }
}

/* Tablet (768px - 1023px) */
@media (max-width: 1023px) {
    .main-container {
        flex-direction: column;
    }

    .ai-sidebar {
        width: 100%;
        height: 400px;
        position: relative;
        top: 0;
    }

    .user-stats {
        display: none;
    }

    .header-top {
        padding: var(--spacing-sm) 0;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .test-options {
        grid-template-columns: repeat(2, 1fr);
    }

    .results-stats {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Mobile Large (640px - 767px) */
@media (max-width: 767px) {
    :root {
        font-size: 14px;
    }

    .header-content,
    .main-container {
        padding: 0 var(--spacing-md);
    }

    .logo {
        font-size: 1.25rem;
    }

    .nav-tabs {
        gap: 0;
    }

    .nav-tab {
        padding: var(--spacing-sm) var(--spacing-md);
        font-size: 0.85rem;
    }

    .main-content {
        padding: var(--spacing-xl);
    }

    .ai-sidebar {
        height: 350px;
    }

    .test-options,
    .stats-grid {
        grid-template-columns: 1fr;
    }

    .quiz-header {
        flex-direction: column;
        gap: var(--spacing-sm);
    }

    .quiz-actions {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }

    .form-actions {
        flex-direction: column;
    }

    .toast-container {
        right: var(--spacing-sm);
        left: var(--spacing-sm);
        max-width: none;
    }
}

/* Mobile Small (< 640px) */
@media (max-width: 639px) {
    :root {
        font-size: 13px;
    }

    .header-actions {
        gap: var(--spacing-sm);
    }

    .theme-toggle {
        width: 50px;
        height: 26px;
    }

    .theme-toggle-slider {
        width: 20px;
        height: 20px;
        font-size: 10px;
    }

    [data-theme="dark"] .theme-toggle-slider {
        left: 27px;
    }

    .user-avatar {
        width: 36px;
        height: 36px;
        font-size: 0.9rem;
    }

    .nav-tab span[role="img"] {
        display: none;
    }

    .ai-header {
        padding: var(--spacing-md);
    }

    .ai-title {
        font-size: 1rem;
    }

    .question-text {
        font-size: 1.1rem;
    }

    .results-score {
        font-size: 2.5rem;
    }

    .result-value {
        font-size: 1.5rem;
    }
}

/* ============================================
   ACCESSIBILITY ENHANCEMENTS
   ============================================ */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    :root {
        --border: #000;
        --shadow: none;
    }

    [data-theme="dark"] {
        --border: #fff;
    }

    .btn {
        border: 2px solid currentColor;
    }
}

/* Print Styles */
@media print {
    .header,
    .ai-sidebar,
    .ad-banner,
    .nav-tabs,
    .btn,
    .loading-overlay,
    .toast-container {
        display: none !important;
    }

    .main-content {
        box-shadow: none;
        padding: 0;
    }

    * {
        background: white !important;
        color: black !important;
    }
}

/* ============================================
   UTILITY CLASSES
   ============================================ */

.hidden {
    display: none !important;
}

.visible {
    display: block !important;
}

.text-center {
    text-align: center;
}

.text-left {
    text-align: left;
}

.text-right {
    text-align: right;
}

.mt-sm {
    margin-top: var(--spacing-sm);
}

.mt-md {
    margin-top: var(--spacing-md);
}

.mt-lg {
    margin-top: var(--spacing-lg);
}

.mt-xl {
    margin-top: var(--spacing-xl);
}

.mb-sm {
    margin-bottom: var(--spacing-sm);
}

.mb-md {
    margin-bottom: var(--spacing-md);
}

.mb-lg {
    margin-bottom: var(--spacing-lg);
}

.mb-xl {
    margin-bottom: var(--spacing-xl);
}

.p-sm {
    padding: var(--spacing-sm);
}

.p-md {
    padding: var(--spacing-md);
}

.p-lg {
    padding: var(--spacing-lg);
}

.p-xl {
    padding: var(--spacing-xl);
}

.flex {
    display: flex;
}

.flex-col {
    flex-direction: column;
}

.items-center {
    align-items: center;
}

.justify-center {
    justify-content: center;
}

.gap-sm {
    gap: var(--spacing-sm);
}

.gap-md {
    gap: var(--spacing-md);
}

.gap-lg {
    gap: var(--spacing-lg);
}

/* ============================================
   ANIMATIONS EXTRA
   ============================================ */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes scaleInExtra {
    from {
        opacity: 0;
        transform: scale(0.9);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.animate-fadeInUp {
    animation: fadeInUp 0.4s ease-out;
}

.animate-fadeInDown {
    animation: fadeInDown 0.4s ease-out;
}

.animate-scaleIn {
    animation: scaleInExtra 0.3s ease-out;
}

/* ============================================
   AI CHAT TYPING INDICATOR
   ============================================ */

.typing-indicator {
    opacity: 0.7;
}

.typing-dots {
    display: flex;
    gap: 4px;
    padding: 8px;
}

.typing-dots .dot {
    width: 8px;
    height: 8px;
    background: var(--text-secondary);
    border-radius: 50%;
    animation: typingDot 1.4s infinite;
}

.typing-dots .dot:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-dots .dot:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typingDot {
    0%, 60%, 100% {
        opacity: 0.3;
        transform: scale(1);
    }

    30% {
        opacity: 1;
        transform: scale(1.2);
    }
}

/* ============================================
   AI SEND BUTTON - TAM GÜVENLİ
   ============================================ */

.ai-send-btn {
    padding: var(--spacing-md) var(--spacing-lg);
    background: var(--primary);
    color: white;
    border: none;
    border-radius: var(--radius-lg);
    cursor: pointer;
    font-weight: 500;
    transition: all var(--transition-fast);
    font-family: inherit;
    font-size: 1.2rem;
    min-width: 50px;
    pointer-events: auto !important;
    z-index: 10;
    position: relative;
}

.ai-send-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: var(--shadow-lg);
}

.ai-send-btn:active {
    transform: translateY(0);
}

.ai-send-btn:focus {
    outline: 2px solid var(--primary-light);
    outline-offset: 2px;
}

/* Input container düzeni */
.ai-input-group {
    display: flex;
    gap: var(--spacing-sm);
    align-items: stretch;
}

.ai-input {
    flex: 1;
}

/* Pulse animasyonu */
@keyframes pulseButton {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(99, 102, 241, 0.7);
    }

    50% {
        transform: scale(1.05);
        box-shadow: 0 0 20px 10px rgba(99, 102, 241, 0);
    }
}

/* ============================================
   AI MESSAGE FORMATTING
   ============================================ */

.message-content strong {
    color: var(--primary);
    font-weight: 600;
}

.message-content code {
    background: var(--bg-tertiary);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
}

[data-theme="dark"] .message-content code {
    background: var(--bg-secondary);
    color: var(--primary-light);
}

/* Animasyonlar */
@keyframes fadeOut {
    from {
        opacity: 1;
        transform: scale(1);
    }

    to {
        opacity: 0;
        transform: scale(0.95);
    }
}

/* === Testfy Floating Chat Widget - Fix === */

.chat-widget-wrapper{
    position:fixed;
    right:1.5rem;
    bottom:1.5rem;
    z-index:999;
    display:flex;
    flex-direction:column;
    align-items:flex-end;
    gap:0.75rem;
}

.chat-toggle-btn{
    display:flex;
    align-items:center;
    gap:0.5rem;
    border:none;
    border-radius:999px;
    padding:0.55rem 1.1rem;
    font-family:inherit;
    font-size:0.95rem;
    font-weight:600;
    background:var(--primary,#4f46e5);
    color:#fff;
    box-shadow:0 10px 25px rgba(15,23,42,0.35);
    cursor:pointer;
    transition:transform .16s ease,box-shadow .16s ease,opacity .16s ease;
}
.chat-toggle-btn:hover{
    transform:translateY(-1px);
    box-shadow:0 12px 30px rgba(15,23,42,0.4);
}
.chat-toggle-btn--hidden{
    display:none;
}

.chat-toggle-initial{
    width:2rem;
    height:2rem;
    border-radius:999px;
    display:flex;
    align-items:center;
    justify-content:center;
    font-weight:700;
    background:rgba(15,23,42,0.15);
}
.chat-toggle-text{
    letter-spacing:0.02em;
}

/* 🔧 Asıl widget */
.chat-widget{
    position:fixed;
    right:1.5rem;
    bottom:5rem;
    width:min(420px,100vw - 2rem);
    max-height:70vh;
    display:flex;
    flex-direction:column;
    background:var(--bg-primary,#0f172a);
    color:var(--text-primary,#e5e7eb);
    border-radius:1rem;
    box-shadow:0 18px 45px rgba(15,23,42,0.55);
    border:1px solid rgba(148,163,184,0.6);
    overflow:hidden;

    opacity:0;
    visibility:hidden;
    pointer-events:none;
    transform:translateY(12px) scale(0.98);
    transition:opacity .2s ease,transform .2s ease,visibility .2s ease;
}

/* ✅ Açıkken görünür olsun */
.chat-widget.chat-widget--open{
    opacity:1;
    visibility:visible;
    pointer-events:auto;
    transform:translateY(0) scale(1);
}

/* ✅ Drag sırasında animasyon kapansın ve el imleci olsun */
.chat-widget.chat-widget--dragging{
    transition:none !important;
}
.chat-widget.chat-widget--dragging .chat-header{
    cursor:grabbing;
    cursor:-webkit-grabbing;
}

/* ✅ Küçültülmüş hâl */
.chat-widget.chat-widget--minimized .chat-body,
.chat-widget.chat-widget--minimized .chat-footer{
    display:none;
}

/* Header / body / footer iç tasarımını koruyoruz */
.chat-header{
    padding:0.85rem 1rem;
    display:flex;
    align-items:center;
    justify-content:space-between;
    background:linear-gradient(135deg,rgba(15,23,42,0.98),rgba(30,64,175,0.95));
    color:#f9fafb;
}
.chat-title{
    display:flex;
    flex-direction:column;
    gap:0.15rem;
}
.chat-title-main{
    font-weight:600;
    font-size:0.95rem;
}
.chat-status{
    display:flex;
    align-items:center;
    gap:0.35rem;
    font-size:0.78rem;
    opacity:0.9;
}
.chat-header-actions{
    display:flex;
    align-items:center;
    gap:0.25rem;
}
.chat-header-btn{
    width:1.9rem;
    height:1.9rem;
    border-radius:999px;
    border:none;
    background:rgba(15,23,42,0.25);
    color:inherit;
    display:flex;
    align-items:center;
    justify-content:center;
    font-size:0.9rem;
    cursor:pointer;
}
.chat-header-btn:hover{
    background:rgba(15,23,42,0.4);
}

.chat-body{
    padding:0.75rem 0.9rem;
    background:var(--bg-secondary,#020617);
}
.chat-footer{
    padding:0.7rem 0.9rem 0.8rem;
    background:var(--bg-secondary,#020617);
    border-top:1px solid rgba(15,23,42,0.7);
}
.chat-footer .ai-input-group{
    background:var(--bg-tertiary,rgba(15,23,42,0.9));
}

.ai-chat{
    flex:1;
    max-height:40vh;
    overflow-y:auto;
    scroll-behavior:smooth;
}

/* =========================
   MOBİL – CHAT WIDGET
   ========================= */
@media (max-width: 768px) {
    .chat-widget-wrapper {
        right: 1rem;
        bottom: 1rem;
    }

    .chat-widget {
        right: 1rem;
        left: auto;
        bottom: 4.5rem;
        width: min(420px, 100vw - 2rem);
        max-height: 80vh;
        border-radius: 1rem;
    }
}

/* =========================
   GERİ BUTONU + ÇIKIŞ BUTONU
   ========================= */

.btn-back {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.9rem;
    border-radius: var(--radius-full);
    border: 1px solid var(--border);
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition:
        background var(--transition-fast),
        border-color var(--transition-fast),
        color var(--transition-fast),
        transform var(--transition-fast),
        box-shadow var(--transition-fast);
}

.btn-back:hover {
    background: var(--bg-hover);
    border-color: var(--primary-soft-2, var(--primary));
    color: var(--primary-dark);
    transform: translateY(-1px);
}

.btn-exit-quiz {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.3rem 0.85rem;
    border-radius: var(--radius-full);
    border: 1px solid var(--border);
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    font-size: 0.83rem;
    font-weight: 500;
    cursor: pointer;
    transition:
        background var(--transition-fast),
        border-color var(--transition-fast),
        color var(--transition-fast),
        transform var(--transition-fast),
        box-shadow var(--transition-fast);
}

.btn-exit-quiz:hover {
    background: var(--bg-hover);
    border-color: var(--primary-soft-2, var(--primary));
    color: var(--primary-dark);
    transform: translateY(-1px);
}

[data-theme="dark"] .btn-exit-quiz,
[data-theme="dark"] .btn-back {
    background: rgba(15, 23, 42, 0.92);
    border-color: rgba(148, 163, 184, 0.45);
    color: var(--text-secondary);
}

/* =========================
   ONAY (CONFIRM) MODALI
   ========================= */

#confirmOverlay,
.confirm-overlay,
#confirmDialogOverlay {
    position: fixed !important;
    inset: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 1rem !important;
    background: rgba(15, 23, 42, 0.65) !important;
    z-index: var(--z-modal-backdrop);
}

#confirmDialog,
.confirm-dialog,
.confirm-modal {
    width: 100% !important;
    max-width: 480px !important;
    margin: 0 auto !important;
    background: var(--bg-elevated-soft, var(--card-bg));
    border-radius: 1rem !important;
    box-shadow: var(--shadow-xl);
    border: 1px solid var(--border-soft, rgba(148, 163, 184, 0.35));
    color: var(--text-primary);
    padding: 1rem 1.25rem 0.9rem !important;
    z-index: var(--z-modal);
}

.confirm-dialog-title {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
    color: var(--text-primary);
}

.confirm-dialog-message {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 0.9rem;
}

.confirm-dialog-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.confirm-dialog-actions .btn {
    border-radius: var(--radius-full);
    padding-inline: 1.1rem;
    font-size: 0.85rem;
}

[data-theme="dark"] #confirmDialog,
[data-theme="dark"] .confirm-dialog,
[data-theme="dark"] .confirm-modal {
    background: rgba(15, 23, 42, 0.98) !important;
    border-color: rgba(30, 64, 175, 0.7) !important;
    color: #e5e7eb !important;
}

@media (max-width: 640px) {
    #confirmOverlay,
    .confirm-overlay,
    #confirmDialogOverlay {
        padding: 0.75rem !important;
    }

    #confirmDialog,
    .confirm-dialog,
    .confirm-modal {
        border-radius: 0.85rem !important;
        padding: 0.9rem 1rem 0.8rem !important;
    }
}

/* =========================
   TOAST / BİLDİRİMLERİ KAPAT
   ========================= */

#toastContainer,
.toast-container,
.toast {
    display: none !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

/* === NOT EKLE MODALI === */

.note-modal-overlay {
    display: none !important;
    opacity: 0;
}

.note-modal-overlay.is-open {
    display: flex !important;
    opacity: 1;
}

.note-modal .note-modal-body {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    margin-bottom: 0.5rem;
}

.note-modal .note-label {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.note-modal input,
.note-modal textarea {
    width: 100%;
    border-radius: 0.6rem;
    border: 1px solid var(--border);
    background: var(--bg-secondary);
    color: var(--text-primary);
    padding: 0.4rem 0.6rem;
    font-size: 0.85rem;
    outline: none;
    resize: vertical;
}

.note-modal input::placeholder,
.note-modal textarea::placeholder {
    color: var(--text-tertiary);
}

.note-modal input:focus,
.note-modal textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 1px rgba(99, 102, 241, 0.35);
}

[data-theme="dark"] .note-modal input,
[data-theme="dark"] .note-modal textarea {
    background: rgba(15, 23, 42, 0.9);
    border-color: rgba(148, 163, 184, 0.4);
    color: #e5e7eb;
}

/* ============================================
   MOBİL QUIZ SIKILAŞTIRMA
   ============================================ */

@media (max-width: 767px) {

  .quiz-container {
    max-width: 100%;
    margin: 0 auto;
    padding: var(--spacing-md) var(--spacing-sm);
  }

  .quiz-header {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--spacing-xs);
    margin-bottom: var(--spacing-xl);
  }

  .question-card {
    padding: var(--spacing-lg) var(--spacing-md);
    margin-bottom: var(--spacing-md);
    border-radius: var(--radius-lg);
  }

  .question-text {
    font-size: 1.05rem;
    line-height: 1.45;
    margin-bottom: var(--spacing-lg);
  }

  .options-list {
    gap: var(--spacing-sm);
  }

  .option-item {
    padding: var(--spacing-sm) var(--spacing-md);
    gap: var(--spacing-sm);
    word-break: break-word;
    white-space: normal;
  }

  .option-letter {
    width: 26px;
    height: 26px;
    min-width: 26px;
    font-size: 0.85rem;
  }

  .quiz-actions {
    margin-top: var(--spacing-xl);
    gap: var(--spacing-sm);
  }
}

@media (max-width: 639px) {

  .quiz-container {
    padding: var(--spacing-md) var(--spacing-xs);
  }

  .question-card {
    padding: var(--spacing-lg) var(--spacing-sm);
  }

  .question-text {
    font-size: 1rem;
    margin-bottom: var(--spacing-md);
  }

  .option-item {
    padding: var(--spacing-sm) var(--spacing-sm);
  }
}

/* ===========================
   Testify Pro – Tanıtım Modali
   =========================== */

.pro-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.70);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1001;
}

.pro-modal-overlay.active {
    display: flex;
}

.pro-modal {
    width: min(560px, 100% - 2rem);
    background: var(--bg-primary);
    color: var(--text-primary);
    border-radius: var(--radius-xl);
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.55);
    border: 1px solid var(--border);
    padding: var(--spacing-xl);
    position: relative;
}

[data-theme="dark"] .pro-modal {
    background: var(--bg-secondary);
}

.pro-modal-close {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    width: 2rem;
    height: 2rem;
    border-radius: 999px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.pro-modal-close:hover {
    background: var(--bg-tertiary);
}

.pro-modal-header {
    margin-bottom: var(--spacing-lg);
}

.pro-modal-title-row {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-sm);
}

.pro-badge {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 0.15rem 0.5rem;
    border-radius: 999px;
    background: rgba(129, 140, 248, 0.18);
    color: var(--primary);
}

.pro-modal-header h2 {
    margin: 0;
    font-size: 1.4rem;
}

.pro-modal-header p {
    margin: 0.35rem 0 0;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.pro-modal-price {
    margin-bottom: var(--spacing-lg);
    padding: var(--spacing-md);
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, rgba(129, 140, 248, 0.12), rgba(59, 130, 246, 0.10));
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.pro-price-main {
    font-size: 1.1rem;
    font-weight: 600;
}

.pro-price-note {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.pro-price-limit {
    font-size: 0.85rem;
    margin-top: 0.25rem;
    color: var(--text-secondary);
}

.pro-modal-features {
    display: grid;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-lg);
}

.pro-feature {
    display: flex;
    gap: var(--spacing-md);
    align-items: flex-start;
}

.pro-feature-icon {
    width: 36px;
    height: 36px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-tertiary);
    flex-shrink: 0;
}

.pro-feature-icon i {
    font-size: 1.2rem;
    color: var(--primary);
}

.pro-feature-body h3 {
    margin: 0 0 0.15rem;
    font-size: 0.95rem;
}

.pro-feature-body p {
    margin: 0;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.pro-modal-footer {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.pro-modal-footer .btn {
    width: 100%;
    justify-content: center;
}

.pro-modal-note {
    font-size: 0.8rem;
    color: var(--text-secondary);
    text-align: center;
}

/* Testify Pro floating buton */
.pro-floating-btn {
    position: fixed;
    left: 1.5rem;
    bottom: 1.5rem;
    z-index: 950;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.45rem 0.9rem;
    border-radius: 999px;
    border: none;
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 0.85rem;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.30);
    cursor: pointer;
}

.pro-floating-btn i {
    color: var(--primary);
}

.pro-floating-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.35);
}

@media (max-width: 768px) {
    .pro-floating-btn {
        left: 1rem;
        bottom: 4.5rem;
    }

    .pro-modal {
        padding: var(--spacing-lg);
    }
}

/* ============================================
   TESTIFY – YKS JOURNEY EK DÜZENLEMELERİ
   (Bu bloğu ANA CSS'in en sonuna ekle)
   ============================================ */

/* 1) Accent değişkenleri – progress bar'lar için
   (light + dark, kaybolma olmasın) */
:root {
    --accent-primary: #6366f1;   /* light mode mor-mavi */
    --accent-secondary: #8b5cf6;
}

[data-theme="dark"] {
    --accent-primary: #818cf8;   /* dark mode biraz daha parlak */
    --accent-secondary: #a78bfa;
}

/* 2) "Bugün" kartındaki üst şerit için: before düzgün otursun */
#journey .yks-plan-day-card {
    position: relative;
}

/* 3) "Seni Tanıyalım" başlığı (ve Journey içi h2'ler)
      LIGHT MODDA net siyah dursun */
html[data-theme="light"] #journey h2 {
    color: #111827; /* neredeyse siyah */
}

/* 4) Bugünkü ilerleme çubuğu – light modda daha koyu track */
html[data-theme="light"] .widget-progress-bar,
html[data-theme="light"] .yks-task-progress-bar,
html[data-theme="light"] .quiz-progress-bar {
    background: #d1d5db; /* gri-300, karttan belirgin koyu */
}

/* 5) Bugünkü Görevler – DARK MODDA görev yazıları beyaz olsun
   (görev kartı class’ların farklıysa .yks-task-item / .yks-task-card
    kısımlarını kendi class’ınla değiştirirsin) */
[data-theme="dark"] #journey .yks-task-item,
[data-theme="dark"] #journey .yks-task-item *,
[data-theme="dark"] #journey .yks-task-card,
[data-theme="dark"] #journey .yks-task-card * {
    color: #f9fafb;
}

/* ============================================
   Bilimsel içerik kartları – Dashboard & YKS Journey
   ============================================ */

.tab-intro {
    margin-top: var(--spacing-3xl);
    margin-bottom: var(--spacing-3xl);
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xl);
    color: #e5e7eb;

    background:
        radial-gradient(circle at top left, rgba(148, 163, 184, 0.18), transparent 55%),
        radial-gradient(circle at bottom right, rgba(37, 99, 235, 0.18), transparent 55%),
        #020617;
    border-radius: 26px;
    border: 1px solid rgba(148, 163, 184, 0.45);
    box-shadow: 0 30px 80px rgba(15, 23, 42, 0.75);
    padding: clamp(1.8rem, 2vw, 2.4rem);
    animation: fadeInUp 0.55s ease-out;
}

.tab-intro h2 {
    color: #f9fafb;
    font-weight: 700;
    letter-spacing: 0.015em;
    margin-bottom: 0.75rem;
}

.tab-intro p {
    color: #d1d5db;
    line-height: 1.6;
}

/* Üçlü küçük kartlar */
.tab-intro-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: var(--spacing-lg, 1.5rem);
}

.tab-intro .intro-card {
    background: rgba(15, 23, 42, 0.96);
    border-radius: 20px;
    border: 1px solid rgba(148, 163, 184, 0.55);
    padding: 1.25rem 1.35rem;
    animation: fadeInUp 0.55s ease-out;
    animation-fill-mode: both;
    transition:
        transform .18s ease,
        box-shadow .18s ease,
        border-color .18s ease;
}

.tab-intro .intro-card:nth-child(1) { animation-delay: 0.04s; }
.tab-intro .intro-card:nth-child(2) { animation-delay: 0.09s; }
.tab-intro .intro-card:nth-child(3) { animation-delay: 0.14s; }

.tab-intro .intro-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 20px 45px rgba(15, 23, 42, 0.9);
    border-color: rgba(129, 140, 248, 0.85);
}

.tab-intro .intro-card h3 {
    color: #f9fafb;
    font-weight: 600;
    margin-bottom: 0.4rem;
}

.tab-intro .intro-card p {
    color: #cbd5f5;
    font-size: 0.95rem;
}

/* Linkler */
.tab-intro a {
    color: #38bdf8;
    text-decoration: underline;
    text-decoration-thickness: 1px;
}

.tab-intro a:hover {
    color: #0ea5e9;
}

/* ============================================
   YKS JOURNEY – ANA KARTLAR & ALT REKLAM / AÇIKLAMA KARTLARI
   (Bu bloğu style.css dosyanın EN SONUNA ekle)
   ============================================ */

/* 1) YKS Yolculuğum ana kartları – LIGHT modda beyaz kart + siyah kenar + siyah yazı */
[data-theme="light"] #journey .yks-card,
[data-theme="light"] #journey .yks-mini-card,
[data-theme="light"] #journey .pomodoro-card {
    background: #ffffff !important;
    border-color: #000000 !important;
    color: #000000 !important;
    box-shadow: 0 22px 55px rgba(0, 0, 0, 0.22) !important;
}

/* Başlık ve açıklamalar net siyah */
[data-theme="light"] #journey .yks-card-title,
[data-theme="light"] #journey .yks-card-subtitle,
[data-theme="light"] #journey .yks-mini-title,
[data-theme="light"] #journey .pomodoro-title,
[data-theme="light"] #journey .pomodoro-desc,
[data-theme="light"] #journey .yks-metric-label,
[data-theme="light"] #journey .yks-metric-value {
    color: #000000 !important;
}

/* Küçük metinler ve label'lar */
[data-theme="light"] #journey .yks-chip,
[data-theme="light"] #journey .yks-widget-tag {
    color: #000000 !important;
    border-color: #000000 !important;
    background: #ffffff !important;
}

/* 2) YKS ALT BİLGİ / REKLAM YAZI BÖLÜMÜ
   HTML'de:
   <section id="journey">
     ...
     <section class="yks-info-section">
        <article class="yks-info-card">...</article>
        ...
     </section>
   </section>
*/

/* Bölüm sarmalayıcı */
#journey .yks-info-section {
    margin-top: var(--spacing-3xl);
    display: grid;
    gap: var(--spacing-lg);
}

/* Kart – hem dark hem light için temel stil */
#journey .yks-info-card {
    position: relative;
    overflow: hidden;
    isolation: isolate;
    border-radius: 1.25rem;
    padding: 1.35rem 1.6rem;
    background: var(--card-bg);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-soft);
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    animation: fadeInUp 0.4s ease-out backwards;
    transition:
        transform var(--transition-fast),
        box-shadow var(--transition-fast),
        border-color var(--transition-fast),
        background var(--transition-fast),
        color var(--transition-fast);
}

/* Hafif glow efekti */
#journey .yks-info-card::before {
    content: "";
    position: absolute;
    inset: -40%;
    background:
        radial-gradient(circle at 0% 0%, rgba(129, 140, 248, 0.18), transparent 55%),
        radial-gradient(circle at 100% 100%, rgba(34, 197, 94, 0.18), transparent 55%);
    opacity: 0.45;
    pointer-events: none;
    mix-blend-mode: screen;
}

/* Kartlar sırayla gelsin */
#journey .yks-info-card:nth-child(1) { animation-delay: 0.03s; }
#journey .yks-info-card:nth-child(2) { animation-delay: 0.08s; }
#journey .yks-info-card:nth-child(3) { animation-delay: 0.13s; }
#journey .yks-info-card:nth-child(4) { animation-delay: 0.18s; }
#journey .yks-info-card:nth-child(5) { animation-delay: 0.23s; }

/* Hover – bol animasyonlu, YKS kartlarıyla aynı ruh */
#journey .yks-info-card:hover {
    transform: translateY(-4px) scale(1.01);
    border-color: var(--primary);
    box-shadow:
        0 24px 60px rgba(15, 23, 42, 0.9),
        0 0 0 1px rgba(129, 140, 248, 0.35);
}

/* Başlık */
#journey .yks-info-card-title {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    font-weight: 700;
    font-size: 1rem;
    margin: 0;
    color: var(--text-primary);
}

/* Başlık ikonu – istersen <i class="ph ph-info"></i> kullan */
#journey .yks-info-card-title i {
    width: 30px;
    height: 30px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    background: rgba(250, 204, 21, 0.14);
    color: #facc15;
    box-shadow: 0 8px 20px rgba(250, 204, 21, 0.35);
    transition: transform 0.25s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

#journey .yks-info-card:hover .yks-info-card-title i {
    transform: translateY(-2px) scale(1.12) rotate(6deg);
}

/* Gövde metni */
#journey .yks-info-card-body {
    font-size: 0.93rem;
    line-height: 1.7;
    color: var(--text-secondary);
}

#journey .yks-info-card-body p {
    margin: 0.2rem 0;
}

#journey .yks-info-card-body b,
#journey .yks-info-card-body strong {
    font-weight: 700;
}

/* Light mod – OP ADSENSE MODU 😎
   Kart tam beyaz, kenar full siyah, yazı full siyah */
[data-theme="light"] #journey .yks-info-card {
    background: #ffffff !important;
    border-color: #000000 !important;
    color: #000000 !important;
    box-shadow:
        0 20px 50px rgba(15, 23, 42, 0.22),
        0 0 0 1px rgba(0, 0, 0, 0.8);
}

/* Light modda glow biraz kısık olsun */
[data-theme="light"] #journey .yks-info-card::before {
    opacity: 0.18;
}

/* Light modda metinler net siyah */
[data-theme="light"] #journey .yks-info-card-title,
[data-theme="light"] #journey .yks-info-card-body,
[data-theme="light"] #journey .yks-info-card-body p {
    color: #000000 !important;
}

/* Hover’da daha güçlü siyah kenar ve gölge */
[data-theme="light"] #journey .yks-info-card:hover {
    border-color: #000000 !important;
    box-shadow:
        0 26px 60px rgba(0, 0, 0, 0.28),
        0 0 0 2px rgba(0, 0, 0, 0.95);
}

/* Light modda ikon arka planı daha soft */
[data-theme="light"] #journey .yks-info-card-title i {
    background: rgba(250, 204, 21, 0.12);
    color: #ca8a04;
}

/* Dark mod – koyu şık görünüm */
[data-theme="dark"] #journey .yks-info-card {
    background:
        radial-gradient(circle at top left, rgba(30, 64, 175, 0.38), transparent 55%),
        radial-gradient(circle at bottom right, rgba(17, 94, 89, 0.42), transparent 60%),
        #020617;
    border-color: rgba(148, 163, 184, 0.55);
    color: #e5e7eb;
    box-shadow:
        0 24px 70px rgba(15, 23, 42, 0.95);
}

[data-theme="dark"] #journey .yks-info-card-title,
[data-theme="dark"] #journey .yks-info-card-body,
[data-theme="dark"] #journey .yks-info-card-body p {
    color: rgba(248, 250, 252, 0.96);
}

/* Dark modda hover glow daha parlak */
[data-theme="dark"] #journey .yks-info-card:hover {
    border-color: rgba(129, 140, 248, 0.95);
    box-shadow:
        0 30px 80px rgba(15, 23, 42, 0.98),
        0 0 0 1px rgba(129, 140, 248, 0.4);
}

/* Mobilde kart aralıklarını biraz sık */
@media (max-width: 768px) {
    #journey .yks-info-section {
        margin-top: var(--spacing-2xl);
        gap: var(--spacing-md);
    }

    #journey .yks-info-card {
        padding: 1.1rem 1.2rem;
        border-radius: 1rem;
    }
}

/* ============================================
   GLOBAL "YAZI KARTI" PRESETİ
   (library, notlar, YKS açıklama kartları, bilimsel kartlar)
   ============================================ */

/* 1) Ortak kart iskeleti */
.text-card,
.tab-intro .intro-card,
#journey .yks-info-card,
.library-card,
.note-card {
    position: relative;
    overflow: hidden;
    isolation: isolate;
    border-radius: 1.25rem;
    padding: 1.35rem 1.6rem;
    background: var(--card-bg);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-soft);
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    transition:
        transform var(--transition-fast),
        box-shadow var(--transition-fast),
        border-color var(--transition-fast),
        background var(--transition-fast),
        color var(--transition-fast);
}

/* Hafif glow efekti – hepsine aynı */
.text-card::before,
.tab-intro .intro-card::before,
#journey .yks-info-card::before,
.library-card::before,
.note-card::before {
    content: "";
    position: absolute;
    inset: -40%;
    background:
        radial-gradient(circle at 0% 0%, rgba(129, 140, 248, 0.18), transparent 55%),
        radial-gradient(circle at 100% 100%, rgba(34, 197, 94, 0.18), transparent 55%);
    opacity: 0.45;
    pointer-events: none;
    mix-blend-mode: screen;
}

/* Hover davranışı – hepsi aynı tepki */
.text-card:hover,
.tab-intro .intro-card:hover,
#journey .yks-info-card:hover,
.library-card:hover,
.note-card:hover {
    transform: translateY(-4px) scale(1.01);
    border-color: var(--primary);
    box-shadow:
        0 24px 60px rgba(15, 23, 42, 0.9),
        0 0 0 1px rgba(129, 140, 248, 0.35);
}

/* Başlıklar için helper; kart içindeki h3'ler vb. */
.text-card h3,
.tab-intro .intro-card h3,
#journey .yks-info-card-title,
.library-card .library-card-title,
.note-card .note-title {
    font-weight: 700;
    font-size: 1rem;
    margin-bottom: 0.35rem;
}

/* 2) LIGHT MODE – tamamen beyaz + siyah kenar / yazı  */
[data-theme="light"] .text-card,
[data-theme="light"] .tab-intro .intro-card,
[data-theme="light"] #journey .yks-info-card,
[data-theme="light"] .library-card,
[data-theme="light"] .note-card {
    background: #ffffff !important;
    border-color: #000000 !important;
    color: #000000 !important;
    box-shadow:
        0 20px 50px rgba(15, 23, 42, 0.22),
        0 0 0 1px rgba(0, 0, 0, 0.8);
}

[data-theme="light"] .text-card *,
[data-theme="light"] .tab-intro .intro-card *,
[data-theme="light"] #journey .yks-info-card *,
[data-theme="light"] .library-card *,
[data-theme="light"] .note-card * {
    color: #000000 !important;
}

[data-theme="light"] .text-card::before,
[data-theme="light"] .tab-intro .intro-card::before,
[data-theme="light"] #journey .yks-info-card::before,
[data-theme="light"] .library-card::before,
[data-theme="light"] .note-card::before {
    opacity: 0.18;
}

/* 3) DARK MODE – gradient + glow görünüm */
[data-theme="dark"] .text-card,
[data-theme="dark"] .tab-intro .intro-card,
[data-theme="dark"] #journey .yks-info-card,
[data-theme="dark"] .library-card,
[data-theme="dark"] .note-card {
    background:
        radial-gradient(circle at top left, rgba(30, 64, 175, 0.38), transparent 55%),
        radial-gradient(circle at bottom right, rgba(17, 94, 89, 0.42), transparent 60%),
        #020617;
    border-color: rgba(148, 163, 184, 0.55);
    color: #e5e7eb;
    box-shadow: 0 24px 70px rgba(15, 23, 42, 0.95);
}

[data-theme="dark"] .text-card *,
[data-theme="dark"] .tab-intro .intro-card *,
[data-theme="dark"] #journey .yks-info-card *,
[data-theme="dark"] .library-card *,
[data-theme="dark"] .note-card * {
    color: rgba(248, 250, 252, 0.96);
}

/* ============================================
   TAB INTRO – LIGHT MODE ARKA PLANINI BEYAZ YAP
   ============================================ */

[data-theme="light"] .tab-intro {
    background: #ffffff !important;
    color: #000000 !important;
    border-radius: 26px;
    border: 1px solid #000000 !important;
    box-shadow:
        0 20px 50px rgba(15, 23, 42, 0.22),
        0 0 0 1px rgba(0, 0, 0, 0.8);
}

/* Başlık ve paragraf metinleri de full siyah olsun */
[data-theme="light"] .tab-intro h2,
[data-theme="light"] .tab-intro p {
    color: #000000 !important;
}
/* === AI Test ikonu tema desteği === */
.ai-test-icon {
    width: 1.6em;
    height: 1.6em;
}

/* Karanlık modda beyaz PNG kullan */
[data-theme="dark"] .ai-test-icon {
    content: url("al-white.png");
}

/* === MOBİL HEADER & TEMA TOGGLE DÜZELTMESİ === */
@media (max-width: 640px) {
    .header-content {
        padding-inline: 12px;
    }

    .header-actions {
        gap: 8px;
    }

    .theme-toggle {
        width: 44px;
        min-width: 44px;
        height: 26px;
        padding: 0;
        overflow: hidden;          /* yuvarlak dışarı taşmasın */
        border-radius: 999px;
    }

    .theme-toggle-slider {
        width: 20px;
        height: 20px;
        font-size: 10px;
        padding: 0;
        display: flex;
        align-items: center;
        justify-content: center;

        /* mobilde tam dikey ortala */
        top: 50%;
        left: 3px;
        transform: translateY(-50%);
    }

    /* dark modda knob'u sağa, tam içine al */
    [data-theme="dark"] .theme-toggle-slider {
        left: calc(100% - 20px - 3px); /* genişlik - knob - margin */
    }

    .theme-toggle .icon {
        font-size: 0.9rem;
    }
}

/* Sadece AI ikonlu kartta, ikon ile yazı arasındaki boşluğu artır */
.test-option-icon:has(.ai-test-icon) {
    margin-bottom: 26px;  /* 16–20 arası zevkine göre oynatabilirsin */
}




















