﻿/**
 * Identify the Note — Styles
 */

/* -- Audio Banner -- */
.audio-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #fefce8;
  border: 1px solid #fde047;
  border-radius: 0.75rem;
  padding: 0.875rem 1.25rem;
}

.audio-banner.hidden {
  display: none !important;
}

/* -- Play Button -- */
.play-btn {
  width: 130px;
  height: 130px;
  border-radius: 50%;
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  color: white;
  border: none;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.2s;
  box-shadow: 0 4px 20px rgba(5, 150, 105, 0.35);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  user-select: none;
}

.play-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 28px rgba(5, 150, 105, 0.45);
}

.play-btn:active {
  transform: scale(0.97);
}

.play-btn.playing {
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  box-shadow: 0 4px 20px rgba(2, 132, 199, 0.4);
}

/* -- Piano Visual -- */
.piano-visual {
  display: flex;
  justify-content: center;
  gap: 6px;
  flex-wrap: nowrap;
}

.note-tile {
  flex: 1;
  max-width: 64px;
  min-width: 36px;
  height: 72px;
  border-radius: 10px;
  border: 3px solid transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.1rem;
  transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
  background: white;
  cursor: default;
  position: relative;
  overflow: hidden;
}

.note-tile.dim {
  filter: grayscale(0.5) opacity(0.35);
}

.note-tile.active {
  transform: translateY(-4px) scale(1.08);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
  filter: none;
}

.note-tile.correct-reveal {
  animation: correctPulse 0.5s ease;
}

@keyframes correctPulse {
  0%   { transform: scale(1); }
  40%  { transform: translateY(-6px) scale(1.12); }
  100% { transform: translateY(-4px) scale(1.08); }
}

/* -- Answer Grid -- */
.answer-grid {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
}

.answer-btn {
  min-width: 64px;
  padding: 0.75rem 1rem;
  border: 2px solid #e5e7eb;
  border-radius: 0.875rem;
  background: white;
  cursor: pointer;
  transition: border-color 0.12s, background 0.12s, transform 0.1s;
  font-size: 1.4rem;
  font-weight: 700;
  text-align: center;
  color: #111827;
  line-height: 1;
}

.answer-btn:hover:not(:disabled) {
  border-color: #059669;
  background: #f0fdf4;
  transform: translateY(-2px);
}

.answer-btn:active:not(:disabled) {
  transform: translateY(0);
}

.answer-btn.selected {
  border-color: #6366f1;
  background: #eef2ff;
}

.answer-btn.correct {
  border-color: #059669;
  background: #d1fae5;
  color: #065f46;
}

.answer-btn.incorrect {
  border-color: #ef4444;
  background: #fee2e2;
  color: #991b1b;
}

.answer-btn:disabled {
  cursor: default;
}

/* -- Feedback Banner -- */
.feedback-banner {
  border-radius: 0.75rem;
  padding: 0.875rem 1rem;
  animation: feedbackSlideIn 0.25s ease;
  font-size: 0.95rem;
}

.feedback-banner.correct {
  background: #d1fae5;
  color: #065f46;
  border: 1px solid #6ee7b7;
}

.feedback-banner.incorrect {
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #fca5a5;
}

.feedback-banner.unlock {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fcd34d;
  margin-top: 0.5rem;
}

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

/* -- Note Grid (per-note accuracy) -- */
.note-grid {
  display: flex;
  justify-content: center;
  gap: 6px;
  flex-wrap: wrap;
}

.note-cell {
  width: 52px;
  background: #f9fafb;
  border: 1.5px solid #e5e7eb;
  border-radius: 10px;
  padding: 6px 4px;
  text-align: center;
  transition: border-color 0.2s, background 0.2s;
}

.note-cell.locked {
  opacity: 0.45;
}

.note-cell-name {
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.2;
}

.note-cell-pct {
  font-size: 0.68rem;
  font-weight: 600;
  line-height: 1.4;
  margin-top: 1px;
}

.note-cell-count {
  font-size: 0.6rem;
  color: #9ca3af;
  line-height: 1.3;
}

/* -- Hidden utility -- */
.hidden {
  display: none !important;
}

/* -- Responsive -- */
@media (max-width: 480px) {
  .play-btn {
    width: 110px;
    height: 110px;
  }

  .note-tile {
    height: 60px;
    font-size: 0.95rem;
    border-radius: 8px;
  }

  .answer-btn {
    min-width: 52px;
    font-size: 1.2rem;
    padding: 0.65rem 0.75rem;
  }
}
