/* ===== GİRİŞ EKRANI ===== */
.login-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 75vh;
  gap: 20px;
  padding: 20px;
}

.app-title-large {
  font-size: 42px;
  font-weight: 900;
  background: linear-gradient(45deg, #FF6B6B, #48DBFB, #1DD1A1, #FF9F43);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-size: 300% 300%;
  animation: gradientTitle 5s ease infinite;
  text-align: center;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.05);
}

@keyframes gradientTitle {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.login-subtitle {
  color: #636e72;
  font-size: 18px;
  font-weight: 500;
  margin-bottom: 10px;
}

.login-cards {
  display: flex;
  gap: 32px;
  width: 100%;
  max-width: 850px;
}

.login-card {
  flex: 1;
  background: #fff;
  padding: 32px;
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.08);
  display: flex;
  flex-direction: column;
  gap: 20px;
  transition: transform 0.3s ease;
}

.login-card:hover {
  transform: translateY(-5px);
}

/* Öğrenci Kartı Rengi */
.login-cards .login-card:nth-child(1) {
  border-top: 8px solid #48dbfb;
}

/* Öğretmen Kartı Rengi */
.login-cards .login-card:nth-child(2) {
  border-top: 8px solid #ff6b6b;
}

.login-card h2 {
  color: #0a3d62;
  font-size: 20px;
  text-align: center;
  border-bottom: 2px solid #f0f2f5;
  padding-bottom: 12px;
}

.w-100 { width: 100%; justify-content: center; }

.btn-teacher {
  background: linear-gradient(135deg, #2c3e50, #34495e);
  color: #fff;
}

.btn-logout {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.3);
  color: #fff;
  margin-left: 12px;
  padding: 6px 12px;
  font-size: 12px;
}

.btn-logout:hover {
  background: rgba(255,255,255,0.1);
}

.user-label {
  font-size: 13px;
  background: rgba(255,255,255,0.2);
  padding: 4px 10px;
  border-radius: 20px;
  font-weight: 500;
}

/* Öğretmen Bölümleri */
.teacher-section {
  background: #fff;
  padding: 24px;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 20px;
}

.teacher-section h3 {
  color: #0a3d62;
  font-size: 16px;
  border-bottom: 1px solid #f0f2f5;
  padding-bottom: 8px;
}

.student-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 250px;
  overflow-y: auto;
}

.student-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: #f8f9fa;
  border-radius: 8px;
  border: 1px solid #e9ecef;
}

.student-item-info strong {
  color: #2d3436;
  font-size: 15px;
}

.student-item-info span {
  font-size: 12px;
  color: #636e72;
  margin-left: 8px;
}

.form-control {
  flex: 1;
  padding: 10px 14px;
  border: 2px solid #dfe6e9;
  border-radius: 8px;
  font-size: 14px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: #f0f2f5;
  color: #1a1a2e;
  min-height: 100vh;
}

/* ===== ÜST MENÜ ===== */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
  color: #fff;
  padding: 0 24px;
  height: 60px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.15);
  -webkit-app-region: drag;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.app-title {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 1px;
}

.topbar-nav {
  display: flex;
  gap: 4px;
  -webkit-app-region: no-drag;
}

.nav-btn {
  background: transparent;
  border: none;
  color: #a0a0c0;
  padding: 8px 20px;
  font-size: 14px;
  cursor: pointer;
  border-radius: 8px;
  transition: all 0.2s;
  font-weight: 500;
}

.nav-btn:hover {
  background: rgba(255,255,255,0.1);
  color: #fff;
}

.nav-btn.active {
  background: rgba(255,255,255,0.15);
  color: #fff;
  font-weight: 600;
}

.topbar-right {
  display: flex;
  align-items: center;
}

.level-badge {
  background: linear-gradient(135deg, #e94560, #c23152);
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.5px;
}

/* ===== SAYFA YÖNETİMİ ===== */
.page {
  display: none;
  padding: 24px;
  max-width: 900px;
  margin: 0 auto;
  animation: fadeIn 0.3s ease;
}

.page.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ===== OKUMA SAYFASI ===== */
.reading-container {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.text-info-card {
  background: #fff;
  border-radius: 12px;
  padding: 16px 24px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.text-info-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.text-info-header h2 {
  font-size: 20px;
  color: #1a1a2e;
}

.text-meta {
  display: flex;
  gap: 8px;
}

.badge {
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
}

.badge-level {
  background: #e8f4f8;
  color: #0a3d62;
}

.badge-score {
  background: #fef3e2;
  color: #b7791f;
}

/* Metin Görüntüleme */
.text-display-area {
  background: #fff;
  border-radius: 12px;
  padding: 28px 32px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  min-height: 120px;
  line-height: 1.9;
  font-size: 18px;
  color: #2d3436;
  border-left: 4px solid #0a3d62;
}

.text-display-area .word {
  display: inline;
  padding: 2px 1px;
  border-radius: 3px;
  transition: background 0.3s;
}

.text-display-area .word.correct {
  background: #d4edda;
  color: #155724;
}

.text-display-area .word.wrong {
  background: #f8d7da;
  color: #721c24;
  text-decoration: line-through;
}

.text-display-area .word.missed {
  background: #fff3cd;
  color: #856404;
}

/* Kontroller */
.controls-area {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 8px 0;
}

.btn {
  padding: 12px 28px;
  border: none;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.btn:active {
  transform: translateY(0);
}

.btn-record {
  background: linear-gradient(135deg, #e94560, #c23152);
  color: #fff;
  font-size: 16px;
  padding: 14px 36px;
}

.btn-record.recording {
  background: linear-gradient(135deg, #ff6b6b, #ee5a24);
  animation: pulse 1.5s infinite;
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(233, 69, 96, 0.4); }
  70% { box-shadow: 0 0 0 15px rgba(233, 69, 96, 0); }
  100% { box-shadow: 0 0 0 0 rgba(233, 69, 96, 0); }
}

.record-icon {
  font-size: 12px;
}

.btn-stop {
  background: #636e72;
  color: #fff;
}

.btn-retry {
  background: #fdcb6e;
  color: #2d3436;
}

.btn-next {
  background: linear-gradient(135deg, #00b894, #00a381);
  color: #fff;
}

.btn-primary {
  background: linear-gradient(135deg, #0a3d62, #1a5276);
  color: #fff;
}

.btn-danger {
  background: #d63031;
  color: #fff;
  font-size: 13px;
  padding: 10px 20px;
}

.hidden {
  display: none !important;
}

/* Durum çubuğu */
.status-bar {
  text-align: center;
  padding: 10px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.05);
}

.status-text {
  font-size: 14px;
  color: #636e72;
}

.status-bar.recording {
  background: #fff5f5;
  border: 1px solid #fed7d7;
}

.status-bar.recording .status-text {
  color: #e94560;
  font-weight: 600;
}

/* Canlı transcript */
.live-transcript {
  background: #fff;
  border-radius: 12px;
  padding: 16px 24px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  border-left: 4px solid #e94560;
}

.live-transcript h3 {
  font-size: 14px;
  color: #636e72;
  margin-bottom: 8px;
}

.live-transcript p {
  font-size: 16px;
  color: #2d3436;
  line-height: 1.6;
  min-height: 24px;
}

/* Sonuç kartı */
.result-card {
  background: #fff;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.1);
  border-top: 4px solid #0a3d62;
}

.result-card h3 {
  text-align: center;
  margin-bottom: 20px;
  font-size: 18px;
  color: #1a1a2e;
}

.result-stats {
  display: flex;
  justify-content: center;
  gap: 32px;
  margin-bottom: 20px;
}

.stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.stat-value {
  font-size: 32px;
  font-weight: 700;
  color: #0a3d62;
}

.stat-correct {
  color: #00b894 !important;
}

.stat-wrong {
  color: #e94560 !important;
}

.stat-label {
  font-size: 12px;
  color: #636e72;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.result-message {
  text-align: center;
  padding: 12px;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 16px;
}

.result-message.passed {
  background: #d4edda;
  color: #155724;
}

.result-message.failed {
  background: #f8d7da;
  color: #721c24;
}

/* Kelime karşılaştırma */
.word-comparison {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 12px;
  background: #f8f9fa;
  border-radius: 8px;
  line-height: 2;
}

.word-comparison .cmp-word {
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 500;
}

.word-comparison .cmp-correct {
  background: #d4edda;
  color: #155724;
}

.word-comparison .cmp-wrong {
  background: #f8d7da;
  color: #721c24;
  text-decoration: line-through;
}

.word-comparison .cmp-missed {
  background: #fff3cd;
  color: #856404;
  font-style: italic;
}

/* ===== İLERLEME SAYFASI ===== */
.progress-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.progress-container h2 {
  color: #1a1a2e;
}

.progress-summary {
  display: flex;
  justify-content: center;
  gap: 40px;
  background: #fff;
  padding: 24px;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.history-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.history-item {
  background: #fff;
  padding: 14px 20px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 1px 4px rgba(0,0,0,0.05);
  transition: transform 0.2s;
}

.history-item:hover {
  transform: translateX(4px);
}

.history-item .hi-title {
  font-weight: 600;
  color: #1a1a2e;
}

.history-item .hi-date {
  font-size: 12px;
  color: #636e72;
}

.history-item .hi-score {
  font-size: 20px;
  font-weight: 700;
  padding: 4px 16px;
  border-radius: 8px;
}

.history-item .hi-score.passed {
  background: #d4edda;
  color: #155724;
}

.history-item .hi-score.failed {
  background: #f8d7da;
  color: #721c24;
}

.progress-actions {
  display: flex;
  justify-content: flex-end;
  padding-top: 8px;
}

.empty-msg {
  text-align: center;
  color: #b2bec3;
  padding: 20px;
  font-style: italic;
}

/* ===== ÖĞRETMEN PANELİ ===== */
.teacher-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.teacher-container h2 {
  color: #1a1a2e;
}

.add-text-form {
  background: #fff;
  padding: 24px;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.add-text-form h3 {
  color: #0a3d62;
  font-size: 16px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.form-group label {
  font-size: 13px;
  font-weight: 600;
  color: #636e72;
}

.form-group input,
.form-group select,
.form-group textarea {
  padding: 10px 14px;
  border: 2px solid #dfe6e9;
  border-radius: 8px;
  font-size: 14px;
  transition: border-color 0.2s;
  font-family: inherit;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #0a3d62;
}

.form-row {
  display: flex;
  gap: 16px;
}

.form-row .form-group {
  flex: 1;
}

/* Metin listesi */
.text-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.text-item {
  background: #fff;
  padding: 16px 20px;
  border-radius: 10px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.05);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.text-item-info {
  flex: 1;
}

.text-item-info .ti-title {
  font-weight: 600;
  color: #1a1a2e;
  font-size: 15px;
}

.text-item-info .ti-meta {
  font-size: 12px;
  color: #636e72;
  margin-top: 2px;
}

.text-item-info .ti-preview {
  font-size: 13px;
  color: #b2bec3;
  margin-top: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 500px;
}

.text-item-actions {
  display: flex;
  gap: 6px;
}

.btn-sm {
  padding: 6px 14px;
  font-size: 12px;
  border-radius: 6px;
}

.text-item .badge-source {
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  margin-left: 8px;
}

.badge-source.default {
  background: #dfe6e9;
  color: #636e72;
}

.badge-source.teacher {
  background: #e8f4f8;
  color: #0a3d62;
}

.teacher-actions {
  display: flex;
  justify-content: flex-end;
  padding-top: 8px;
}

/* ===== MODAL ===== */
.modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  animation: fadeIn 0.2s ease;
}

.modal {
  background: #fff;
  border-radius: 16px;
  padding: 28px;
  width: 90%;
  max-width: 500px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.2);
}

.modal h3 {
  margin-bottom: 16px;
  color: #1a1a2e;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 16px;
}

.btn-cancel {
  background: #dfe6e9;
  color: #2d3436;
}

.app-footer {
  text-align: center;
  padding: 20px;
  font-size: 13px;
  color: #a4b0be;
  width: 100%;
  margin-top: auto;
  font-weight: 500;
  letter-spacing: 0.5px;
}

::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #f0f2f5;
}

::-webkit-scrollbar-thumb {
  background: #b2bec3;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #636e72;
}

/* ===== MOBİL (TELEFON) UYUMLULUĞU ===== */
@media screen and (max-width: 768px) {
  .login-cards {
    flex-direction: column;
    gap: 16px;
  }
  
  .topbar {
    flex-direction: column;
    height: auto;
    padding: 10px;
    gap: 10px;
  }
  
  .topbar-nav {
    flex-wrap: wrap;
    justify-content: center;
  }
  
  .page {
    padding: 12px;
  }
  
  .form-row {
    flex-direction: column;
    gap: 10px;
  }
  
  .text-display-area {
    padding: 16px;
    font-size: 16px;
    line-height: 1.6;
  }
  
  .controls-area {
    flex-direction: column;
  }
  
  .controls-area .btn {
    width: 100%;
    justify-content: center;
  }
  
  .result-stats {
    flex-wrap: wrap;
    gap: 16px;
  }
  
  .game-cards-container {
    flex-direction: column;
  }
  
  #gameContainer canvas {
    max-width: 100%;
    height: auto !important;
  }
  
  .student-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
  
/* ===== ÖĞRETMEN PANELİ YENİ TASARIM ===== */
.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 15px;
}

.teacher-section {
  background: #fff;
  padding: 24px;
  border-radius: 16px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.05);
  display: flex;
  flex-direction: column;
  gap: 14px;
  border-top: 5px solid #0a3d62;
}

.teacher-section.blue { border-top-color: #3498db; }
.teacher-section.green { border-top-color: #2ecc71; }
.teacher-section.orange { border-top-color: #e67e22; }
.teacher-section.purple { border-top-color: #9b59b6; }

.teacher-section h3 {
  color: #2c3e50;
  font-size: 18px;
  border-bottom: 2px solid #f0f2f5;
  padding-bottom: 10px;
  margin-bottom: 10px;
}

/* Öğrenci Kartları */
.student-card {
  background: #f8f9fa;
  border-radius: 12px;
  padding: 15px;
  border: 1px solid #e9ecef;
  box-shadow: 0 2px 5px rgba(0,0,0,0.02);
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: transform 0.2s;
}

.student-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(0,0,0,0.08);
  border-color: #d1d8e0;
}

.sc-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px dashed #d1d8e0;
  padding-bottom: 8px;
}

.sc-header h4 {
  color: #2980b9;
  font-size: 16px;
  margin: 0;
}

.sc-body {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.badge-info { background: #e0f7fa; color: #0097a7; }
.badge-timer { background: #fce4ec; color: #c62828; }

.sc-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 5px;
}

.btn-icon {
  flex: 1;
  padding: 8px 5px;
  font-size: 12px;
  font-weight: bold;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  color: #fff;
  transition: background 0.2s;
  text-align: center;
}

.btn-msg { background: #f39c12; } .btn-msg:hover { background: #d68910; }
.btn-report { background: #3498db; } .btn-report:hover { background: #2980b9; }
.btn-edit { background: #9b59b6; } .btn-edit:hover { background: #8e44ad; }
.btn-delete { background: #e74c3c; } .btn-delete:hover { background: #c0392b; }

/* Metin Kartları */
.text-card {
  background: #fff;
  border-radius: 10px;
  padding: 15px;
  border-left: 5px solid #2ecc71;
  box-shadow: 0 2px 6px rgba(0,0,0,0.04);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

@media screen and (max-width: 900px) {
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
}


