/* MES Akademi · Canlı Keşif · Öğrenci Alanı Tasarım Katmanı (2026-10-10)
 * Altı menü ekseni:
 *   1. Benim Sayfam (Karşılama, Kaldığın Yerden Devam, Son Açılanlar, Hızlı Ödev Özeti)
 *   2. Dersler ve Konular (Sınıf > Ders > Ünite/Konu hiyerarşisi, sade konu kartları)
 *   3. Oyunlar ve Deneyler (3D/Simülasyon/Oyun odaklı keşif)
 *   4. Proje Atölyem (Tasarım ve üretim araçları)
 *   5. Ödevlerim (Öğretmen tarafından verilen gerçek görevler)
 *   6. İlerlemem (Öğrencinin tamamladığı gerçek etkinlikler)
 *
 * Kapsam: html.ck ve .ck-theme altındadır.
 */

/* ---- Öğrenci Ana Yerleşimi (Layout Primitives) ---- */
html.ck .ck-student-app,
.ck-theme .ck-student-app {
  display: flex;
  min-height: 100vh;
  background-color: var(--ck-bg);
  color: var(--ck-ink);
  box-sizing: border-box;
}

/* Sol Kenar Çubuğu (Sidebar) */
html.ck .ck-sidebar,
.ck-theme .ck-sidebar {
  width: 256px;
  background-color: var(--ck-surface);
  border-right: 1px solid var(--ck-line);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  position: sticky;
  top: 0;
  height: 100vh;
  z-index: 40;
  box-sizing: border-box;
}

/* Sidebar Logo / Başlık */
html.ck .ck-sidebar-brand,
.ck-theme .ck-sidebar-brand {
  padding: 20px 18px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--ck-line);
}

html.ck .ck-brand-icon,
.ck-theme .ck-brand-icon {
  width: 38px;
  height: 38px;
  border-radius: var(--ck-radius-md);
  background: var(--ck-action);
  color: #FFFFFF;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 18px;
  flex-shrink: 0;
}

html.ck .ck-brand-meta,
.ck-theme .ck-brand-meta {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

html.ck .ck-brand-name,
.ck-theme .ck-brand-name {
  font-size: 15px;
  font-weight: 800;
  color: var(--ck-ink);
  line-height: 1.2;
}

html.ck .ck-brand-sub,
.ck-theme .ck-brand-sub {
  font-size: 12px;
  color: var(--ck-ink-2);
  line-height: 1.2;
}

/* Öğrenci Profil Özeti */
html.ck .ck-sidebar-profile,
.ck-theme .ck-sidebar-profile {
  margin: 14px 14px 8px;
  padding: 10px 12px;
  background: var(--ck-soft);
  border: 1px solid #CFE0FF;
  border-radius: var(--ck-radius-md);
  display: flex;
  align-items: center;
  gap: 10px;
}

html.ck .ck-profile-avatar,
.ck-theme .ck-profile-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #FFFFFF;
  border: 1px solid #CFE0FF;
  color: var(--ck-action-text);
  font-weight: 800;
  font-size: 13px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

html.ck .ck-profile-info,
.ck-theme .ck-profile-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

html.ck .ck-profile-name,
.ck-theme .ck-profile-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--ck-ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

html.ck .ck-profile-grade,
.ck-theme .ck-profile-grade {
  font-size: 11px;
  color: var(--ck-ink-2);
}

/* Navigasyon Menüsü (6 Menü) */
html.ck .ck-sidebar-nav,
.ck-theme .ck-sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 8px 12px;
  flex: 1;
  overflow-y: auto;
}

html.ck .ck-nav-item,
.ck-theme .ck-nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: var(--ck-radius-md);
  font-size: 14px;
  font-weight: 600;
  color: var(--ck-ink-2);
  text-decoration: none;
  min-height: 42px;
  box-sizing: border-box;
  transition: background-color 0.15s ease, color 0.15s ease;
  border: 1px solid transparent;
  cursor: pointer;
}

html.ck .ck-nav-item:hover,
.ck-theme .ck-nav-item:hover {
  background-color: var(--ck-bg);
  color: var(--ck-ink);
}

html.ck .ck-nav-item.is-active,
.ck-theme .ck-nav-item.is-active {
  background-color: var(--ck-soft);
  color: var(--ck-action-text);
  border-color: #CFE0FF;
  font-weight: 700;
}

html.ck .ck-nav-icon,
.ck-theme .ck-nav-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
}

/* Sidebar Alt Bölümü */
html.ck .ck-sidebar-footer,
.ck-theme .ck-sidebar-footer {
  padding: 12px 14px;
  border-top: 1px solid var(--ck-line);
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: var(--ck-surface);
}

/* ---- Ana İçerik Alanı ---- */
html.ck .ck-main-content,
.ck-theme .ck-main-content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  background-color: var(--ck-bg);
  overflow-x: hidden;
}

/* Üst Çubuk (Top Bar) */
html.ck .ck-topbar,
.ck-theme .ck-topbar {
  height: 64px;
  background-color: var(--ck-surface);
  border-bottom: 1px solid var(--ck-line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 30;
  box-sizing: border-box;
}

html.ck .ck-topbar-left,
.ck-theme .ck-topbar-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

html.ck .ck-topbar-right,
.ck-theme .ck-topbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Sayfa İçi Gezinti Yolu (Breadcrumbs) */
html.ck .ck-breadcrumbs,
.ck-theme .ck-breadcrumbs {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--ck-ink-2);
}

html.ck .ck-breadcrumbs a,
.ck-theme .ck-breadcrumbs a {
  color: var(--ck-ink-2);
  text-decoration: none;
}

html.ck .ck-breadcrumbs a:hover,
.ck-theme .ck-breadcrumbs a:hover {
  color: var(--ck-action-text);
  text-decoration: underline;
}

html.ck .ck-breadcrumbs .ck-sep,
.ck-theme .ck-breadcrumbs .ck-sep {
  color: var(--ck-line-strong);
}

html.ck .ck-breadcrumbs .ck-current,
.ck-theme .ck-breadcrumbs .ck-current {
  color: var(--ck-ink);
  font-weight: 700;
}

/* Zeko Akıllı Arama & Rehber Bölmesi (Entegre Dock - İçeriği ASLA kapatmaz) */
html.ck .ck-zeko-dock,
.ck-theme .ck-zeko-dock {
  background: var(--ck-surface);
  border: 1px solid #CFE0FF;
  border-radius: var(--ck-radius-lg);
  padding: 12px 18px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  box-shadow: 0 2px 8px rgba(0, 102, 255, 0.05);
  margin-bottom: 20px;
}

html.ck .ck-zeko-avatar-wrap,
.ck-theme .ck-zeko-avatar-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

html.ck .ck-zeko-avatar,
.ck-theme .ck-zeko-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--ck-soft);
  border: 2px solid #99C2FF;
  display: grid;
  place-items: center;
  font-size: 22px;
  flex-shrink: 0;
  position: relative;
}

html.ck .ck-zeko-avatar.is-speaking::after,
.ck-theme .ck-zeko-avatar.is-speaking::after {
  content: "";
  position: absolute;
  bottom: 0;
  right: 0;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #10B981;
  border: 2px solid #FFFFFF;
}

html.ck .ck-zeko-status-text,
.ck-theme .ck-zeko-status-text {
  font-size: 11px;
  font-weight: 700;
  color: var(--ck-ink-2);
  display: flex;
  flex-direction: column;
}

html.ck .ck-zeko-prompt,
.ck-theme .ck-zeko-prompt {
  flex: 1;
  min-width: 220px;
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--ck-bg);
  border: 1px solid var(--ck-line);
  border-radius: var(--ck-radius-md);
  padding: 8px 12px;
}

html.ck .ck-zeko-prompt input,
.ck-theme .ck-zeko-prompt input {
  flex: 1;
  border: none;
  background: transparent;
  font-family: inherit;
  font-size: 14px;
  color: var(--ck-ink);
  outline: none;
}

html.ck .ck-zeko-controls,
.ck-theme .ck-zeko-controls {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

/* Sayfa Gövdesi */
html.ck .ck-page-body,
.ck-theme .ck-page-body {
  padding: 24px;
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  box-sizing: border-box;
}

/* Sınıf, Ders ve Konu Seçim Şeridi */
html.ck .ck-filter-section,
.ck-theme .ck-filter-section {
  background: var(--ck-surface);
  border: 1px solid var(--ck-line);
  border-radius: var(--ck-radius-lg);
  padding: 16px 20px;
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

html.ck .ck-filter-row,
.ck-theme .ck-filter-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

html.ck .ck-filter-label,
.ck-theme .ck-filter-label {
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ck-ink-2);
  min-width: 60px;
}

/* Sınıf Seçim Butonları */
html.ck .ck-grade-selector,
.ck-theme .ck-grade-selector {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

html.ck .ck-grade-btn,
.ck-theme .ck-grade-btn {
  appearance: none;
  border: 1px solid var(--ck-line);
  background: var(--ck-surface);
  color: var(--ck-ink);
  font-size: 13px;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: var(--ck-radius-md);
  cursor: pointer;
  min-height: 36px;
  transition: all 0.15s ease;
}

html.ck .ck-grade-btn:hover,
.ck-theme .ck-grade-btn:hover {
  background: var(--ck-soft);
  color: var(--ck-action-text);
  border-color: #CFE0FF;
}

html.ck .ck-grade-btn.is-active,
.ck-theme .ck-grade-btn.is-active {
  background: var(--ck-action);
  color: #FFFFFF;
  border-color: var(--ck-action);
}

/* Aktif Filtre Çubuğu (Chips) */
html.ck .ck-active-filters-bar,
.ck-theme .ck-active-filters-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px 14px;
  background: #F1F5F9;
  border-radius: var(--ck-radius-md);
  border: 1px solid var(--ck-line);
}

html.ck .ck-results-count,
.ck-theme .ck-results-count {
  margin-left: auto;
  font-size: 13px;
  font-weight: 700;
  color: var(--ck-ink-2);
}

/* Bölüm Başlığı & Ayırıcılar */
html.ck .ck-section-header,
.ck-theme .ck-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 28px 0 14px;
}

html.ck .ck-section-title-wrap,
.ck-theme .ck-section-title-wrap {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

html.ck .ck-section-subtitle,
.ck-theme .ck-section-subtitle {
  font-size: 13px;
  color: var(--ck-ink-2);
}

/* ---- Kart Izgarası (Cards Grid) ---- */
html.ck .ck-cards-grid,
.ck-theme .ck-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}

/* Standart Öğrenci Kartı Anatomisi */
html.ck .ck-card,
.ck-theme .ck-card {
  background: var(--ck-surface);
  border: 1px solid var(--ck-line);
  border-radius: var(--ck-radius-lg);
  padding: 16px;
  display: flex;
  flex-direction: column;
  box-shadow: var(--ck-shadow-sm);
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
  position: relative;
  box-sizing: border-box;
}

html.ck .ck-card:hover,
.ck-theme .ck-card:hover {
  border-color: #B8D2FF;
  box-shadow: var(--ck-shadow-md);
}

/* Kart Üst Başlık & Tür */
html.ck .ck-card-header,
.ck-theme .ck-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

html.ck .ck-subject-badge,
.ck-theme .ck-subject-badge {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 3px 8px;
  border-radius: 6px;
  border: 1px solid transparent;
}

html.ck .ck-subject-fen, .ck-theme .ck-subject-fen { background: var(--ck-subject-fen-bg); color: var(--ck-subject-fen); border-color: #BFE3CD; }
html.ck .ck-subject-mat, .ck-theme .ck-subject-mat { background: var(--ck-subject-mat-bg); color: var(--ck-subject-mat); border-color: #CFE0FF; }
html.ck .ck-subject-turkce, .ck-theme .ck-subject-turkce { background: var(--ck-subject-turkce-bg); color: var(--ck-subject-turkce); border-color: #F3C2C2; }
html.ck .ck-subject-sosyal, .ck-theme .ck-subject-sosyal { background: var(--ck-subject-sosyal-bg); color: var(--ck-subject-sosyal); border-color: #F5D9B0; }

/* Kart İçeriği */
html.ck .ck-card-body,
.ck-theme .ck-card-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
}

/* Açık ve Anlaşılır Başlık (Teknik kod değil) */
html.ck .ck-card-title,
.ck-theme .ck-card-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--ck-ink);
  line-height: 1.3;
  margin: 0;
}

/* Kısa Öğrenme Amacı */
html.ck .ck-card-desc,
.ck-theme .ck-card-desc {
  font-size: 13px;
  color: var(--ck-ink-2);
  line-height: 1.45;
  margin: 0;
}

/* Doğrulanmış Özellikler Alanı */
html.ck .ck-card-features,
.ck-theme .ck-card-features {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

/* Kart Altı ve Tek Belirgin Eylem */
html.ck .ck-card-footer,
.ck-theme .ck-card-footer {
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--ck-line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

html.ck .ck-card-action-btn,
.ck-theme .ck-card-action-btn {
  width: 100%;
}

/* ---- Ayrılmış Alanlar: Kaldığın Yerden Devam vs Son Açılanlar ---- */
html.ck .ck-resume-rail,
.ck-theme .ck-resume-rail {
  background: var(--ck-soft);
  border: 1px solid #CFE0FF;
  border-radius: var(--ck-radius-xl);
  padding: 18px 20px;
  margin-bottom: 24px;
}

html.ck .ck-resume-grid,
.ck-theme .ck-resume-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 14px;
}

html.ck .ck-resume-card,
.ck-theme .ck-resume-card {
  background: var(--ck-surface);
  border: 1px solid #CFE0FF;
  border-radius: var(--ck-radius-md);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

html.ck .ck-resume-progress-bar,
.ck-theme .ck-resume-progress-bar {
  width: 100%;
  height: 6px;
  background: #E2E8F0;
  border-radius: 999px;
  overflow: hidden;
}

html.ck .ck-resume-progress-fill,
.ck-theme .ck-resume-progress-fill {
  height: 100%;
  background: var(--ck-action);
  border-radius: 999px;
}

/* ---- Akıllı Tahta Modu Uyumları ---- */
html.ck.ck-board-mode,
.ck-theme.ck-board-mode {
  --ck-touch-target: 52px;
}

html.ck.ck-board-mode .ck-btn,
.ck-theme.ck-board-mode .ck-btn {
  min-height: 52px;
  font-size: 16px;
  padding: 12px 20px;
}

html.ck.ck-board-mode .ck-card-title,
.ck-theme.ck-board-mode .ck-card-title {
  font-size: 17px;
}

html.ck.ck-board-mode .ck-nav-item,
.ck-theme.ck-board-mode .ck-nav-item {
  min-height: 52px;
  font-size: 16px;
}

/* ---- Arapça (RTL) Düzeni ---- */
[dir="rtl"] html.ck .ck-sidebar,
[dir="rtl"] .ck-theme .ck-sidebar,
html.ck[dir="rtl"] .ck-sidebar,
.ck-theme[dir="rtl"] .ck-sidebar {
  border-right: none;
  border-left: 1px solid var(--ck-line);
}

[dir="rtl"] html.ck .ck-card-features,
[dir="rtl"] .ck-theme .ck-card-features,
html.ck[dir="rtl"] .ck-card-features,
.ck-theme[dir="rtl"] .ck-card-features {
  flex-direction: row-reverse;
}

[dir="rtl"] html.ck .ck-results-count,
[dir="rtl"] .ck-theme .ck-results-count,
html.ck[dir="rtl"] .ck-results-count,
.ck-theme[dir="rtl"] .ck-results-count {
  margin-left: 0;
  margin-right: auto;
}

/* ---- Mobil Alt Gezinti Çubuğu (Phone / Bottom Bar) ---- */
html.ck .ck-mobile-bottom-nav,
.ck-theme .ck-mobile-bottom-nav {
  display: none;
}

@media (max-width: 768px) {
  html.ck .ck-sidebar,
  .ck-theme .ck-sidebar {
    display: none;
  }

  html.ck .ck-page-body,
  .ck-theme .ck-page-body {
    padding: 16px 12px 80px;
  }

  html.ck .ck-topbar,
  .ck-theme .ck-topbar {
    padding: 0 14px;
    height: 56px;
  }

  html.ck .ck-cards-grid,
  .ck-theme .ck-cards-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  /* 6 Menüyü taşıyan mobil alt çubuk */
  html.ck .ck-mobile-bottom-nav,
  .ck-theme .ck-mobile-bottom-nav {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: var(--ck-surface);
    border-top: 1px solid var(--ck-line);
    z-index: 50;
    justify-content: space-around;
    align-items: center;
    padding: 0 4px;
  }

  html.ck .ck-mobile-nav-item,
  .ck-theme .ck-mobile-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    flex: 1;
    height: 100%;
    color: var(--ck-ink-2);
    text-decoration: none;
    font-size: 10px;
    font-weight: 600;
  }

  html.ck .ck-mobile-nav-item.is-active,
  .ck-theme .ck-mobile-nav-item.is-active {
    color: var(--ck-action-text);
    font-weight: 700;
  }

  html.ck .ck-mobile-nav-item svg,
  .ck-theme .ck-mobile-nav-item svg {
    width: 20px;
    height: 20px;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.8;
  }
}
