/* =========================================
   1. DEĞİŞKENLER VE TEMA AYARLARI
   ========================================= */
:root {
    --primary-color: #3b82f6;      /* Modern Mavi */
    --primary-hover: #2563eb;
    --bg-color: #f3f4f6;           /* Sayfa Arkaplanı - Açık */
    --card-bg: #ffffff;            /* Kutu/Kart Arkaplanı - Beyaz */
    --text-color: #1f2937;         /* Ana Metin - Koyu Gri */
    --text-light: #6b7280;         /* Yan Metin - Gri */
    --border-color: #e5e7eb;       /* Kenarlıklar */
    --navbar-bg: #ffffff;          /* Üst Menü */
    --table-stripe: #f9fafb;       /* Tablo Satır Rengi */
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

/* Dark Mode (Veri özniteliği ile çalışır) */
[data-theme="dark"] {
    --bg-color: #111827;           /* Sayfa Arkaplanı - Çok Koyu */
    --card-bg: #1f2937;            /* Kutu/Kart Arkaplanı - Koyu Gri */
    --text-color: #f9fafb;         /* Ana Metin - Beyaz */
    --text-light: #9ca3af;         /* Yan Metin - Açık Gri */
    --border-color: #374151;       /* Kenarlıklar */
    --navbar-bg: #1f2937;          /* Üst Menü - Koyu */
    --table-stripe: #374151;       /* Tablo Satır Rengi */
}

/* =========================================
   2. GENEL AYARLAR (RESET)
   ========================================= */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    transition: background-color 0.3s, color 0.3s;
    line-height: 1.6;
    /* EKLENDİ: Sayfanın altında boşluk bırakır ki footer içeriği kapatmasın */
    padding-bottom: 120px; 
    min-height: 100vh;
}

a { text-decoration: none; color: inherit; }

/* =========================================
   3. NAVBAR (ÜST MENÜ)
   ========================================= */
.navbar {
    background-color: var(--navbar-bg);
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 10px; /* Resim ile yazı arasındaki boşluk */
    text-decoration: none;
}

/* Logo resminin boyutunu sınırla */
.nav-logo {
    height: 80px; 
    width: auto;  
    border-radius: 50%;
    object-fit: cover;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.nav-links a {
    color: var(--text-color);
    font-weight: 500;
    transition: color 0.2s;
}

.nav-links a:hover {
    color: var(--primary-color);
}

/* Tema Değiştirme Butonu */
.theme-btn {
    background: none;
    border: 1px solid var(--border-color);
    color: var(--text-color);
    padding: 0.4rem 0.8rem;
    border-radius: 0.375rem;
    cursor: pointer;
    font-size: 1.2rem;
    transition: 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}
.theme-btn:hover {
    background-color: var(--bg-color);
}

/* =========================================
   4. BUTONLAR
   ========================================= */
.btn {
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    border: none;
    cursor: pointer;
    font-weight: 600;
    transition: 0.2s;
    display: inline-block;
    text-align: center;
    font-size: 1rem;
}

.btn-primary { background-color: var(--primary-color); color: white; }
.btn-primary:hover { background-color: var(--primary-hover); }

.btn-outline { border: 1px solid var(--primary-color); color: var(--primary-color); background: transparent; }
.btn-outline:hover { background-color: var(--primary-color); color: white; }

.btn-danger { background-color: #ef4444; color: white; }
.btn-danger:hover { background-color: #dc2626; }

.btn-sm { padding: 0.25rem 0.5rem; font-size: 0.875rem; }

/* =========================================
   5. CONTAINER & FORMLAR
   ========================================= */
.container {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1rem;
}

.auth-box {
    max-width: 500px; /* Not düzenlerken rahat olsun diye 400px'ten 500px'e çıkardım */
    margin: 3rem auto;
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 0.5rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
}

.form-group { margin-bottom: 1rem; }
.form-group label { display: block; margin-bottom: 0.5rem; color: var(--text-color); font-weight: 500; }

.form-control {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 0.375rem;
    background: var(--bg-color);
    color: var(--text-color);
    transition: border-color 0.2s;
    font-size: 1rem; /* Yazı boyutu iyileştirildi */
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}

.password-wrapper { position: relative; }
.toggle-password {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: var(--text-light);
    font-size: 1.2rem;
}

/* =========================================
   6. TABLOLAR (Admin Paneli İçin)
   ========================================= */
.table-responsive {
    overflow-x: auto;
    background: var(--card-bg);
    border-radius: 0.5rem;
    box-shadow: var(--shadow);
    padding: 1rem;
    border: 1px solid var(--border-color);
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 0.5rem;
    color: var(--text-color);
}

th, td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

th {
    background-color: var(--bg-color);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.85rem;
    color: var(--text-color);
}

tr:hover {
    background-color: var(--table-stripe);
}

/* =========================================
   7. NOT KARTLARI (Notes Grid)
   ========================================= */
.notes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.note-card {
    background: var(--card-bg);
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.2s, box-shadow 0.2s;
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
}

.note-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.note-body { padding: 1.5rem; flex-grow: 1; }

.note-title {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: var(--text-color);
    font-weight: bold;
}

.note-course {
    font-size: 0.75rem;
    color: var(--primary-color);
    background: rgba(59, 130, 246, 0.1);
    padding: 4px 10px;
    border-radius: 12px;
    text-transform: uppercase;
    font-weight: bold;
    display: inline-block;
    margin-bottom: 0.8rem;
}

.note-meta {
    font-size: 0.85rem;
    color: var(--text-light);
    background-color: var(--bg-color);
    padding: 0.75rem 1.5rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* =========================================
   8. DİĞER (Utilities)
   ========================================= */
.search-bar { display: flex; gap: 1rem; margin-bottom: 2rem; }
.search-input { flex-grow: 1; }

.text-center { text-align: center; }
.mt-2 { margin-top: 1rem; }
.mb-2 { margin-bottom: 1rem; }

.alert { padding: 1rem; border-radius: 0.375rem; margin-bottom: 1rem; font-weight: 500; }
.alert-error { background-color: #fee2e2; color: #991b1b; border: 1px solid #fecaca; }
.alert-success { background-color: #dcfce7; color: #166534; border: 1px solid #bbf7d0; }

/* =========================================
   9. YORUM VE ADMIN ÖZEL STİLLERİ
   ========================================= */

/* Yorum Kutusu */
.comment-box {
    background: var(--card-bg);
    padding: 1rem;
    border-radius: 0.5rem;
    border: 1px solid var(--border-color);
    margin-bottom: 1rem;
    color: var(--text-color);
}

.comment-header {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    color: var(--text-light);
    margin-bottom: 0.5rem;
}

.comment-author {
    font-weight: bold;
    color: var(--primary-color);
}

/* Admin İstatistik Kartları */
.stat-card {
    background: var(--card-bg);
    padding: 20px;
    border-radius: 8px;
    box-shadow: var(--shadow);
    text-align: center;
    flex: 1;
    border: 1px solid var(--border-color);
    color: var(--text-color);
}

.stat-number {
    font-size: 2rem;
    font-weight: bold;
    color: var(--primary-color);
}

/* Admin Tabloları için ek ayar */
.admin-section h2 {
    color: var(--text-color);
    border-bottom: 2px solid var(--border-color);
}

/* =========================================
   12. NAVBAR ORTA MENÜ (NAV CENTER)
   ========================================= */

.nav-center {
    display: flex;
    gap: 25px; 
    align-items: center;
}

.nav-item {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 600;
    font-size: 1rem;
    transition: color 0.3s ease;
    position: relative;
}

.nav-item:hover {
    color: var(--primary-color);
}

.nav-item.active {
    color: var(--primary-color);
}

/* Mobil Uyumluluk */
@media (max-width: 900px) {
    .nav-center {
        display: none;
    }
} /* <--- İŞTE SENDEKİ EKSİK OLAN PARANTEZ BUYDU */

html {
    scroll-behavior: smooth;
}