/* =====================================================
   HİKMET ATÖLYESİ - Dashboard Stilleri
   css/dashboard.css
   ===================================================== */

/* ─── SINIF DASHBOARD HERO ─── */
.dashboard-hero {
  padding: var(--space-12) 0 var(--space-8);
  position: relative;
  overflow: hidden;
}

.dashboard-hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.dashboard-hero-gradient {
  position: absolute;
  inset: 0;
  opacity: 0.08;
}

.sinif-5 .dashboard-hero-gradient { background: radial-gradient(ellipse at 30% 50%, var(--color-sinif5), transparent 60%); }
.sinif-6 .dashboard-hero-gradient { background: radial-gradient(ellipse at 30% 50%, var(--color-sinif6), transparent 60%); }
.sinif-7 .dashboard-hero-gradient { background: radial-gradient(ellipse at 30% 50%, var(--color-sinif7), transparent 60%); }
.sinif-8 .dashboard-hero-gradient { background: radial-gradient(ellipse at 30% 50%, var(--color-sinif8), transparent 60%); }

.dashboard-hero-content {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: var(--space-8);
  align-items: center;
}

.dashboard-class-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-full);
  font-size: var(--text-sm);
  font-weight: var(--font-semibold);
  margin-bottom: var(--space-3);
  color: white;
}

.sinif-5 .dashboard-class-badge { background: var(--color-sinif5); }
.sinif-6 .dashboard-class-badge { background: var(--color-sinif6); }
.sinif-7 .dashboard-class-badge { background: var(--color-sinif7); }
.sinif-8 .dashboard-class-badge { background: var(--color-sinif8); }

.dashboard-title {
  font-size: var(--text-4xl);
  font-weight: var(--font-extrabold);
  margin-bottom: var(--space-3);
}

.dashboard-subtitle {
  font-size: var(--text-lg);
  color: var(--text-secondary);
}

/* Genel İlerleme Paneli */
.overall-progress-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-2xl);
  padding: var(--space-6);
  min-width: 260px;
}

.overall-progress-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-4);
}

.overall-progress-title {
  font-size: var(--text-sm);
  font-weight: var(--font-semibold);
  color: var(--text-secondary);
}

.overall-progress-percent {
  font-family: var(--font-mono);
  font-size: var(--text-2xl);
  font-weight: var(--font-bold);
  color: var(--color-primary);
}

/* ─── KİTAP KARTLARI ─── */
.books-section {
  padding: var(--space-8) 0;
}

.books-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-6);
}

.book-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-2xl);
  overflow: hidden;
  cursor: pointer;
  transition: all var(--transition-base);
  text-decoration: none;
  display: block;
  position: relative;
}

.book-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-xl);
}

.book-card-dkab:hover { border-color: var(--color-dkab); }
.book-card-ph:hover { border-color: var(--color-ph); }
.book-card-kuran:hover { border-color: var(--color-kuran); }
.book-card-arapca:hover { border-color: var(--color-arapca); }

.book-card-header {
  padding: var(--space-8);
  position: relative;
  overflow: hidden;
  min-height: 180px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.book-card-dkab .book-card-header { background: var(--color-dkab-gradient); }
.book-card-ph .book-card-header { background: var(--color-ph-gradient); }
.book-card-kuran .book-card-header { background: var(--color-kuran-gradient); }
.book-card-arapca .book-card-header { background: var(--color-arapca-gradient); }

.book-card-header-pattern {
  position: absolute;
  inset: 0;
  opacity: 0.1;
  background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='white'%3E%3Cpolygon points='30,5 55,20 55,40 30,55 5,40 5,20'/%3E%3C/g%3E%3C/svg%3E");
  background-size: 60px 60px;
}

.book-card-icon {
  font-size: 2.5rem;
  filter: drop-shadow(0 2px 8px rgba(0,0,0,0.3));
}

.book-card-header-content { color: white; }

.book-card-label {
  font-size: var(--text-xs);
  opacity: 0.8;
  margin-bottom: var(--space-1);
  font-weight: var(--font-medium);
}

.book-card-title {
  font-size: var(--text-2xl);
  font-weight: var(--font-bold);
  font-family: var(--font-heading);
  line-height: 1.2;
}

.book-card-body {
  padding: var(--space-6);
}

.book-card-progress {
  margin-bottom: var(--space-4);
}

.book-card-units {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-bottom: var(--space-4);
}

.unit-dot {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-xs);
  font-weight: var(--font-bold);
  transition: all var(--transition-base);
  cursor: pointer;
  border: 2px solid transparent;
}

.unit-dot-incomplete { background: var(--bg-surface-2); color: var(--text-tertiary); border-color: var(--border-color); }
.unit-dot-started { background: rgba(13,148,136,0.15); color: var(--color-primary); border-color: var(--color-primary); }
.unit-dot-completed { background: var(--color-primary); color: white; }
.unit-dot-dkab.unit-dot-completed { background: var(--color-dkab); }
.unit-dot-ph.unit-dot-completed { background: var(--color-ph); }
.unit-dot-kuran.unit-dot-completed { background: var(--color-kuran); }
.unit-dot-arapca.unit-dot-completed { background: var(--color-arapca); }

.book-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.book-card-stats {
  display: flex;
  gap: var(--space-4);
}

.book-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.book-stat-value {
  font-family: var(--font-mono);
  font-weight: var(--font-bold);
  font-size: var(--text-lg);
  color: var(--text-primary);
}

.book-stat-label {
  font-size: var(--text-xs);
  color: var(--text-tertiary);
}

/* ─── KİTAP SAYFASI - ÜNİTE LİSTESİ ─── */
.book-page-hero {
  padding: var(--space-10) 0;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: var(--space-8);
  position: relative;
  overflow: hidden;
}

.book-page-hero-bg {
  position: absolute;
  inset: 0;
  opacity: 0.06;
}

.book-page-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: var(--space-8);
  align-items: start;
}

.units-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.unit-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-2xl);
  padding: var(--space-6);
  transition: all var(--transition-base);
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.unit-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

.unit-card.active { border-color: var(--color-primary); }

.unit-card-header {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  margin-bottom: var(--space-4);
}

.unit-number {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-xl);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-weight: var(--font-bold);
  font-size: var(--text-lg);
  flex-shrink: 0;
  color: white;
}

.unit-card-title {
  font-size: var(--text-xl);
  font-weight: var(--font-bold);
  flex: 1;
}

.unit-completion-badge {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}

.unit-completion-badge.done {
  background: var(--color-success);
  color: white;
}

.unit-completion-badge.partial {
  background: var(--color-warning-light);
  color: var(--color-warning);
}

.unit-completion-badge.new {
  background: var(--bg-surface-2);
  color: var(--text-tertiary);
}

/* Oyun Butonları Izgarası */
.game-buttons-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-2);
}

.game-btn-mini {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-1);
  padding: var(--space-3);
  border-radius: var(--radius-xl);
  background: var(--bg-surface-2);
  border: 1px solid var(--border-color);
  cursor: pointer;
  transition: all var(--transition-fast);
  text-decoration: none;
  color: var(--text-secondary);
}

.game-btn-mini:hover {
  background: var(--bg-surface-3);
  color: var(--text-primary);
  border-color: var(--color-primary);
  transform: translateY(-2px);
}

.game-btn-mini.completed {
  background: rgba(16,185,129,0.1);
  border-color: var(--color-success);
  color: var(--color-success);
}

.game-btn-mini-icon { font-size: 1.3rem; }
.game-btn-mini-label { font-size: var(--text-xs); font-weight: var(--font-medium); text-align: center; white-space: nowrap; }

/* ─── SAĞ PANEL - İLERLEME/PUAN ─── */
.progress-panel {
  position: sticky;
  top: calc(var(--header-height) + var(--space-4));
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.progress-panel-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-2xl);
  padding: var(--space-6);
}

.progress-panel-title {
  font-size: var(--text-sm);
  font-weight: var(--font-semibold);
  color: var(--text-secondary);
  margin-bottom: var(--space-4);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* Oyun tipi ilerleme listesi */
.game-type-progress-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.game-type-progress-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.game-type-icon { font-size: 1.2rem; width: 28px; text-align: center; }

.game-type-info { flex: 1; }

.game-type-name {
  font-size: var(--text-sm);
  font-weight: var(--font-medium);
  color: var(--text-primary);
  margin-bottom: 2px;
}

.game-type-status {
  font-size: var(--text-xs);
  color: var(--text-tertiary);
}

.game-type-check {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  flex-shrink: 0;
}

.game-type-check.done { background: var(--color-success); color: white; }
.game-type-check.pending { background: var(--bg-surface-2); color: var(--text-tertiary); border: 2px solid var(--border-color); }

/* ─── RESPONSIVE ─── */
@media (max-width: 1024px) {
  .book-page-layout { grid-template-columns: 1fr; }
  .progress-panel { position: static; }
  .books-grid { grid-template-columns: 1fr; }
  .dashboard-hero-content { grid-template-columns: 1fr; }
  .overall-progress-card { display: none; }
}

@media (max-width: 640px) {
  .game-buttons-grid { grid-template-columns: repeat(4, 1fr); }
  .game-btn-mini-label { display: none; }
}
