/* ===== GENEL STILLER ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

:root {
  --primary: #9B7ED9;
  --secondary: #7EC8E3;
  --accent: #B8E0D2;
  --background: #F5F0FA;
  --card-bg: #FFFFFF;
  --text-primary: #4A4A6A;
  --text-secondary: #7A7A9A;
  --text-light: #FFFFFF;
  --success: #8FD9A8;
  --warning: #FFE5A0;
  --error: #FFB5B5;
  --glow1: #E0B0FF;
  --glow2: #87CEEB;
  --glow3: #98FB98;
}

body {
  background: var(--background);
  min-height: 100vh;
  overflow-x: hidden;
}

.app-container {
  max-width: 100%;
  min-height: 100vh;
  position: relative;
}

/* ===== YANIP SÖNEN IŞIKLAR ===== */
.glow-bg {
  position: fixed;
  border-radius: 50%;
  pointer-events: none;
  animation: glow 4s ease-in-out infinite;
}

.glow-1 {
  width: 300px;
  height: 300px;
  top: -50px;
  right: -50px;
  background: var(--glow1);
  opacity: 0.3;
}

.glow-2 {
  width: 250px;
  height: 250px;
  bottom: -30px;
  left: -30px;
  background: var(--glow2);
  opacity: 0.25;
  animation-delay: 2s;
}

@keyframes glow {
  0%, 100% { transform: scale(1); opacity: 0.2; }
  50% { transform: scale(1.1); opacity: 0.4; }
}

/* ===== EKRANLAR ===== */
.screen {
  display: none;
  min-height: 100vh;
  padding: 40px 20px;
  position: relative;
  z-index: 1;
}

.screen.active {
  display: flex;
  justify-content: center;
  align-items: center;
}

.content {
  max-width: 600px;
  width: 100%;
  text-align: center;
}

/* ===== TİPOGRAFİ ===== */
.title {
  font-size: 2.5rem;
  font-weight: bold;
  color: var(--primary);
  margin-bottom: 10px;
}

.slogan, .subtitle {
  font-size: 1rem;
  color: var(--text-secondary);
  margin-bottom: 30px;
}

.greeting {
  font-size: 1.4rem;
  color: var(--text-primary);
  margin-bottom: 10px;
}

.emoji-large {
  font-size: 5rem;
  margin-bottom: 10px;
}

/* ===== INPUT ===== */
.input-container {
  margin-bottom: 30px;
}

.label {
  display: block;
  font-size: 1.1rem;
  color: var(--text-primary);
  margin-bottom: 10px;
}

.input {
  width: 100%;
  max-width: 350px;
  padding: 18px 25px;
  font-size: 1.1rem;
  border: none;
  border-radius: 20px;
  background: var(--card-bg);
  color: var(--text-primary);
  text-align: center;
  box-shadow: 0 4px 15px rgba(155, 126, 217, 0.1);
  outline: none;
  transition: box-shadow 0.3s;
}

.input:focus {
  box-shadow: 0 4px 20px rgba(155, 126, 217, 0.25);
}

/* ===== BUTONLAR ===== */
.btn {
  display: block;
  width: 100%;
  max-width: 300px;
  margin: 10px auto;
  padding: 18px 30px;
  font-size: 1.1rem;
  font-weight: bold;
  border: none;
  border-radius: 30px;
  cursor: pointer;
  transition: all 0.3s;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-primary {
  background: var(--primary);
  color: var(--text-light);
  box-shadow: 0 6px 20px rgba(155, 126, 217, 0.3);
}

.btn-primary:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(155, 126, 217, 0.4);
}

.btn-secondary {
  background: var(--secondary);
  color: var(--text-light);
}

.btn-tertiary {
  background: var(--card-bg);
  color: var(--primary);
  border: 2px solid var(--primary);
}

.btn-save {
  background: #4CAF50;
  color: white;
  box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3);
}

.btn-save.saved {
  background: var(--success);
  opacity: 0.8;
}

.btn-danger {
  background: var(--error);
  color: var(--text-primary);
}

/* ===== KARTLAR ===== */
.cards-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-top: 20px;
}

.age-card, .music-card {
  background: var(--card-bg);
  border-radius: 25px;
  padding: 25px;
  cursor: pointer;
  transition: all 0.3s;
  box-shadow: 0 4px 15px rgba(155, 126, 217, 0.1);
  border-left: 5px solid var(--glow1);
}

.age-card:hover, .music-card:hover {
  transform: scale(1.02);
  box-shadow: 0 8px 25px rgba(155, 126, 217, 0.2);
}

.age-card:nth-child(2) {
  border-left-color: var(--glow2);
}

.card-emoji {
  font-size: 3rem;
  margin-bottom: 10px;
}

.card-age, .card-title {
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--text-primary);
}

.card-desc {
  font-size: 1rem;
  color: var(--primary);
  margin: 5px 0 10px;
}

.card-example {
  font-size: 1.2rem;
  color: var(--text-secondary);
  background: var(--background);
  padding: 10px 20px;
  border-radius: 15px;
  display: inline-block;
  margin-bottom: 15px;
}

.card-badge {
  display: inline-block;
  background: var(--glow1);
  padding: 8px 15px;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
}

.badge-blue {
  background: var(--glow2);
}

/* ===== MÜZİK KARTLARI ===== */
.music-cards {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.music-card {
  display: flex;
  align-items: center;
  text-align: left;
  padding: 20px;
}

.music-icon {
  font-size: 2.5rem;
  margin-right: 15px;
}

.music-info {
  flex: 1;
}

.music-name {
  font-size: 1.2rem;
  font-weight: bold;
  color: var(--text-primary);
}

.music-desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin: 3px 0 8px;
}

.tempo-badge {
  display: inline-block;
  padding: 5px 12px;
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-primary);
}

/* ===== OYUN EKRANI ===== */
.game-content {
  max-width: 700px;
}

.game-header {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 15px;
}

.header-box {
  background: var(--card-bg);
  padding: 12px 18px;
  border-radius: 15px;
  text-align: center;
  flex: 1;
}

.header-label {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.header-value {
  font-size: 1.2rem;
  font-weight: bold;
  color: var(--text-primary);
}

.header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
}

.warmup-label {
  font-size: 1.1rem;
  font-weight: bold;
  color: var(--primary);
}

/* ===== PROGRESS BAR ===== */
.progress-bar, .question-timer {
  height: 30px;
  background: var(--card-bg);
  border-radius: 15px;
  margin-bottom: 20px;
  position: relative;
  overflow: hidden;
}

.progress-fill, .timer-fill {
  height: 100%;
  background: var(--success);
  border-radius: 15px;
  transition: width 1s linear;
}

.progress-text, .timer-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 0.9rem;
  font-weight: bold;
  color: var(--text-primary);
}

/* ===== SORU KARTI ===== */
.question-card {
  background: var(--card-bg);
  border-radius: 25px;
  padding: 30px;
  margin-bottom: 25px;
  box-shadow: 0 8px 25px rgba(155, 126, 217, 0.15);
}

.question-number {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 15px;
}

.question-text {
  font-size: 1.8rem;
  font-weight: bold;
  color: var(--text-primary);
}

/* ===== SEÇENEKLER ===== */
.options-container {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 15px;
  max-width: 400px;
  margin: 0 auto;
}

.option-btn {
  background: var(--primary);
  color: var(--text-light);
  padding: 25px;
  font-size: 1.5rem;
  font-weight: bold;
  border: none;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 4px 15px rgba(155, 126, 217, 0.3);
}

.option-btn:hover {
  transform: scale(1.05);
}

.option-btn:active {
  transform: scale(0.98);
}

/* ===== RİTİM IŞIĞI ===== */
.rhythm-light {
  position: fixed;
  top: 35%;
  right: 20px;
  display: none;
  z-index: 100;
  animation: rhythmPulse 0.8s ease-in-out infinite;
}

.rhythm-light.active {
  display: block;
}

.rhythm-button {
  background: #FFD700;
  padding: 25px;
  border-radius: 50%;
  text-align: center;
  cursor: pointer;
  box-shadow: 0 4px 30px rgba(255, 215, 0, 0.8);
  border: 3px solid #FFA500;
}

.rhythm-emoji {
  font-size: 2.5rem;
  display: block;
}

.rhythm-text {
  font-size: 0.8rem;
  font-weight: bold;
  color: #8B4513;
}

@keyframes rhythmPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.2); }
}

.rhythm-success {
  position: fixed;
  top: 30%;
  right: 25px;
  background: var(--success);
  padding: 10px 20px;
  border-radius: 20px;
  font-weight: bold;
  color: var(--text-primary);
  display: none;
  animation: fadeOut 1s forwards;
}

.rhythm-success.show {
  display: block;
}

@keyframes fadeOut {
  0% { opacity: 1; transform: translateY(0); }
  100% { opacity: 0; transform: translateY(-20px); }
}

/* ===== UYARILAR ===== */
.gentle-warning {
  position: fixed;
  top: 160px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--warning);
  padding: 12px 25px;
  border-radius: 15px;
  font-size: 1rem;
  color: var(--text-primary);
  display: none;
  z-index: 50;
}

.gentle-warning.show {
  display: block;
}

/* ===== FOOTER ===== */
.game-footer {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--card-bg);
  padding: 12px 30px;
  border-radius: 25px;
  display: flex;
  gap: 20px;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.score-display {
  margin-top: 25px;
  font-size: 1.2rem;
  font-weight: bold;
  color: var(--primary);
}

/* ===== ENSTRÜMANLAR ===== */
.instruments {
  text-align: center;
  font-size: 1.5rem;
  margin-bottom: 10px;
  min-height: 30px;
}

/* ===== SONUÇ EKRANI ===== */
.result-content {
  max-width: 500px;
}

.result-header {
  margin-bottom: 20px;
}

.result-emoji {
  font-size: 4rem;
  margin-bottom: 10px;
}

.player-name {
  font-size: 1.5rem;
  color: var(--text-primary);
  margin: 5px 0;
}

.performance-msg {
  font-size: 1.1rem;
  color: var(--text-secondary);
}

.stars-container {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: 20px;
}

.star {
  font-size: 2rem;
  transition: transform 0.3s;
}

.star.dim {
  opacity: 0.3;
}

.main-score-card {
  background: var(--card-bg);
  border-radius: 25px;
  padding: 25px;
  margin-bottom: 20px;
  box-shadow: 0 6px 20px rgba(155, 126, 217, 0.15);
}

.score-label {
  font-size: 1rem;
  color: var(--text-secondary);
}

.main-score {
  font-size: 3.5rem;
  font-weight: bold;
  color: var(--primary);
}

.accuracy-badge {
  display: inline-block;
  background: var(--success);
  padding: 8px 20px;
  border-radius: 20px;
  font-weight: bold;
  color: var(--text-primary);
  margin-top: 10px;
}

/* ===== İSTATİSTİKLER ===== */
.stats-container {
  background: var(--card-bg);
  border-radius: 25px;
  padding: 20px;
  margin-bottom: 20px;
  text-align: left;
}

.stats-title {
  text-align: center;
  color: var(--text-primary);
  margin-bottom: 15px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 15px;
}

.stat-card {
  background: var(--background);
  border-radius: 15px;
  padding: 15px;
  text-align: center;
}

.stat-emoji {
  font-size: 1.5rem;
  display: block;
  margin-bottom: 5px;
}

.stat-value {
  font-size: 1.3rem;
  font-weight: bold;
  color: var(--text-primary);
  display: block;
}

.stat-label {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.detail-section {
  border-top: 1px solid var(--background);
  padding-top: 15px;
  margin-top: 15px;
}

.detail-section h4 {
  color: var(--primary);
  margin-bottom: 10px;
  font-size: 1rem;
}

.detail-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
  font-size: 0.9rem;
}

.detail-row span:first-child {
  color: var(--text-secondary);
}

.detail-row span:last-child {
  font-weight: bold;
  color: var(--text-primary);
}

/* ===== GEÇMİŞ EKRANI ===== */
.history-header {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 20px;
}

.back-btn {
  background: none;
  border: none;
  font-size: 1rem;
  color: var(--primary);
  cursor: pointer;
  font-weight: 600;
}

.summary-card {
  background: var(--card-bg);
  border-radius: 20px;
  padding: 15px 20px;
  margin-bottom: 20px;
  text-align: left;
}

.summary-card h3 {
  color: var(--text-primary);
  margin-bottom: 10px;
  font-size: 1rem;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 5px;
  font-size: 0.9rem;
}

.summary-row span:last-child {
  font-weight: bold;
  color: var(--primary);
}

.history-list {
  max-height: 400px;
  overflow-y: auto;
}

.history-card {
  background: var(--card-bg);
  border-radius: 20px;
  padding: 15px;
  margin-bottom: 15px;
  text-align: left;
}

.history-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.history-name {
  font-weight: bold;
  color: var(--text-primary);
}

.history-date {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.history-score-badge {
  padding: 5px 12px;
  border-radius: 15px;
  font-weight: bold;
  color: white;
  font-size: 0.9rem;
}

.history-details {
  display: flex;
  gap: 15px;
  margin-bottom: 10px;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.history-stats {
  display: flex;
  justify-content: space-between;
  background: var(--background);
  border-radius: 12px;
  padding: 10px;
  font-size: 0.8rem;
}

.history-stat {
  text-align: center;
}

.history-stat-label {
  color: var(--text-secondary);
  display: block;
}

.history-stat-value {
  font-weight: bold;
  color: var(--text-primary);
}

.history-buttons {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}

.history-buttons .btn {
  flex: 1;
}

.empty-state {
  text-align: center;
  padding: 50px 20px;
}

.empty-emoji {
  font-size: 4rem;
  margin-bottom: 15px;
}

.empty-text {
  font-size: 1.1rem;
  color: var(--text-primary);
  font-weight: 600;
}

.empty-subtext {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-top: 5px;
}

/* ===== DEKORASYONLAR ===== */
.decorations {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
  z-index: 0;
}

.deco {
  position: absolute;
  font-size: 1.8rem;
  animation: float 3s ease-in-out infinite;
}

.deco:nth-child(2) { animation-delay: 0.5s; }
.deco:nth-child(3) { animation-delay: 1s; }
.deco:nth-child(4) { animation-delay: 1.5s; }

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

/* ===== RESPONSIVE - AKILLI TAHTA ===== */
@media (min-width: 1200px) {
  .title { font-size: 3.5rem; }
  .emoji-large { font-size: 7rem; }
  .input { font-size: 1.4rem; padding: 22px 30px; }
  .btn { font-size: 1.3rem; padding: 22px 40px; max-width: 400px; }
  .question-text { font-size: 2.5rem; }
  .option-btn { font-size: 2rem; padding: 35px; }
  .options-container { max-width: 600px; gap: 20px; }
  .card-emoji { font-size: 4rem; }
  .card-age { font-size: 2rem; }
  .rhythm-emoji { font-size: 4rem; }
  .rhythm-button { padding: 35px; }
  .game-footer { font-size: 1.3rem; padding: 15px 40px; }
}

/* ===== RESPONSIVE - TABLET ===== */
@media (min-width: 768px) and (max-width: 1199px) {
  .content { max-width: 700px; }
  .cards-container { flex-direction: row; }
  .age-card { flex: 1; }
}

/* ===== RESPONSIVE - MOBİL ===== */
@media (max-width: 480px) {
  .title { font-size: 2rem; }
  .emoji-large { font-size: 4rem; }
  .question-text { font-size: 1.5rem; }
  .option-btn { font-size: 1.3rem; padding: 20px; }
  .game-header { flex-wrap: wrap; }
  .header-box { min-width: 80px; }
}


/* ===== DETAYLI İSTATİSTİKLER ===== */
.history-stats-detailed {
  display: none;
  margin-top: 15px;
  padding-top: 15px;
  border-top: 1px solid var(--background);
}

.history-card.expanded .history-stats-detailed {
  display: block;
}

.history-card.expanded .expand-hint {
  display: none;
}

.expand-hint {
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed var(--background);
}

.stats-section {
  margin-bottom: 15px;
  padding: 12px;
  background: var(--background);
  border-radius: 12px;
}

.stats-section-title {
  font-weight: bold;
  color: var(--primary);
  margin-bottom: 10px;
  font-size: 0.95rem;
}

.stats-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 6px;
  font-size: 0.85rem;
}

.stats-row span:first-child {
  color: var(--text-secondary);
}

.stats-row span:last-child {
  font-weight: bold;
  color: var(--text-primary);
}

.history-card {
  cursor: pointer;
  transition: all 0.3s;
}

.history-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(155, 126, 217, 0.15);
}

.history-card.expanded {
  border-left: 4px solid var(--primary);
}

/* Akıllı tahta için büyük detaylar */
@media (min-width: 1200px) {
  .stats-section-title {
    font-size: 1.1rem;
  }
  .stats-row {
    font-size: 1rem;
    margin-bottom: 8px;
  }
  .expand-hint {
    font-size: 1rem;
  }
}


/* ===== MÜZİK ÖNİZLEME BUTONLARI ===== */
.music-actions {
  display: flex;
  gap: 10px;
  margin-top: 15px;
}

.preview-btn, .select-btn {
  flex: 1;
  padding: 12px 15px;
  border: none;
  border-radius: 15px;
  font-size: 0.95rem;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s;
}

.preview-btn {
  background: var(--background);
  color: var(--text-primary);
  border: 2px solid var(--secondary);
}

.preview-btn:hover {
  background: var(--secondary);
  color: white;
}

.preview-btn.playing {
  background: var(--secondary);
  color: white;
  animation: pulse 1s infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.02); }
}

.select-btn {
  background: var(--primary);
  color: white;
}

.select-btn:hover {
  background: #8a6dc8;
  transform: translateY(-2px);
}

/* Akıllı tahta için büyük butonlar */
@media (min-width: 1200px) {
  .preview-btn, .select-btn {
    padding: 15px 20px;
    font-size: 1.1rem;
  }
}
