/* ============================================
   R.I.T.H.M - Note Identification Game Styles
   Game-specific overrides on top of game-common.css
   ============================================ */

/* ── Key Signature Select ──────────────── */

.key-select {
  padding: 0.4rem 0.75rem;
  border-radius: 6px;
  font-weight: 500;
  font-size: 0.9rem;
  border: 1px solid var(--border-color);
  background: var(--input-bg);
  color: var(--text-primary);
  cursor: pointer;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
  padding-right: 2rem;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23ededef' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 0.5rem center;
  background-size: 14px;
}

[data-theme="light"] .key-select {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%231b1b1e' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e");
  background-color: var(--input-bg);
  background-repeat: no-repeat;
  background-position: right 0.5rem center;
  background-size: 14px;
}

.key-select:disabled { opacity: 0.5; cursor: not-allowed; }
.key-select:focus { border-color: var(--primary); box-shadow: 0 0 0 2px rgba(74, 158, 111, 0.15); }
.key-select option { background: var(--bg-secondary); color: var(--text-primary); }

/* ── Note Buttons ──────────────────────── */

.note-buttons {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.note-btn {
  min-width: 55px;
  padding: 0.5rem 1rem;
  font-weight: 600;
  font-size: 1rem;
  border-radius: 8px;
  transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
  border: 2px solid var(--border-color);
  cursor: pointer;
  background: var(--input-bg);
  color: var(--text-primary);
}

.note-btn:hover { box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15); }
.note-btn:active { box-shadow: none; }

.note-btn.natural-note {
  background: #f0efeb;
  color: #1b1b1e;
  border-color: #c0c0bc;
}
[data-theme="light"] .note-btn.natural-note { box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1); border-color: #a0a09c; }
.note-btn.natural-note:hover { background: #ffffff; border-color: var(--primary); box-shadow: 0 2px 8px rgba(74, 158, 111, 0.2); }

.note-btn.sharp-note {
  background: #2a2a2e;
  color: #ededef;
  border-color: #3a3a3e;
}
[data-theme="light"] .note-btn.sharp-note { background: #2a2a2e; border-color: #1b1b1e; }
.note-btn.sharp-note:hover { background: #3a3a3e; border-color: var(--accent); box-shadow: 0 2px 8px rgba(242, 204, 143, 0.2); }

.note-btn.flat-note {
  background: #5ba3c9;
  color: #ffffff;
  border-color: rgba(91, 163, 201, 0.3);
}
.note-btn.flat-note:hover { background: #6bb3d9; border-color: #6bb3d9; box-shadow: 0 2px 8px rgba(91, 163, 201, 0.2); color: #ffffff; }

.note-btn.correct { background: var(--success) !important; color: #1b1b1e !important; border-color: var(--success) !important; box-shadow: 0 2px 8px rgba(90, 173, 122, 0.3); }
.note-btn.incorrect { background: var(--danger) !important; color: #ffffff !important; border-color: var(--danger) !important; }

/* ── Guide Section ─────────────────────── */

.note-guide { display: none; }

.note-guide .guide-container { max-width: 1100px; margin: 0 auto; padding: 2rem; }
.note-guide .guide-header { text-align: center; margin-bottom: 2.5rem; }
.note-guide .guide-header h2 { font-family: 'Space Grotesk', sans-serif; font-size: 1.75rem; font-weight: 700; margin-bottom: 0.5rem; }
.note-guide .guide-header p { color: var(--text-secondary); font-size: 1rem; max-width: 600px; margin: 0 auto; }

.note-guide .guide-section {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 1.75rem;
  margin-bottom: 1.25rem;
}

.note-guide .guide-section h3 { font-family: 'Space Grotesk', sans-serif; font-size: 1.25rem; font-weight: 600; margin-bottom: 0.875rem; display: flex; align-items: center; gap: 0.75rem; }
.note-guide .guide-section strong { color: var(--text-primary); }
.note-guide .guide-section p, .note-guide .guide-section li { color: var(--text-secondary); line-height: 1.7; font-size: 0.95rem; }
.note-guide .guide-section ul { padding-left: 1.25rem; margin-bottom: 0; }
.note-guide .guide-section li { margin-bottom: 0.35rem; }

.mnemonic-box {
  background: var(--input-bg);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 1rem 1.25rem;
  margin: 1rem 0;
}
.mnemonic-box .mnemonic-label { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted); margin-bottom: 0.3rem; }
.mnemonic-box .mnemonic-text { font-family: 'Space Grotesk', sans-serif; font-size: 1.1rem; font-weight: 600; color: var(--text-primary); margin: 0; }
.mnemonic-box .mnemonic-notes { font-size: 0.85rem; color: var(--text-muted); margin-top: 0.25rem; }

.staff-diagram { background: var(--bg-secondary); border-radius: 8px; padding: 1.25rem 1.75rem; margin: 1rem 0; text-align: center; overflow-x: auto; }
.staff-diagram svg { max-width: 100%; height: auto; }

/* Data tables */
.note-table, .key-sig-table {
  width: 100%; border-collapse: separate; border-spacing: 0;
  margin: 1rem 0; border-radius: 8px; overflow: hidden;
  border: 1px solid var(--border-color);
}
.note-table th, .key-sig-table th { background: var(--input-bg); color: var(--text-primary); font-family: 'Space Grotesk', sans-serif; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; text-align: left; }
.note-table td, .key-sig-table td { color: var(--text-secondary); border-top: 1px solid var(--border-color); }
.note-table tr:hover td, .key-sig-table tr:hover td { background: var(--input-bg); }
.note-table th { font-size: 0.8rem; padding: 0.65rem 0.875rem; }
.note-table td { padding: 0.6rem 0.875rem; font-size: 0.9rem; }
.key-sig-table { font-size: 0.9rem; }
.key-sig-table th { font-size: 0.75rem; padding: 0.5rem 0.625rem; }
.key-sig-table td { padding: 0.45rem 0.625rem; }

.symbol-badge { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 6px; font-weight: 700; font-size: 1.1rem; }
.symbol-badge.sharp { background: #2a2a2e; color: #ededef; }
.symbol-badge.flat { background: #5ba3c9; color: #ffffff; }
.symbol-badge.natural { background: #f0efeb; color: #1b1b1e; border: 1px solid var(--border-color); }
[data-theme="light"] .symbol-badge.natural { border-color: #a0a09c; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08); }

.tip-callout { background: rgba(90, 173, 122, 0.08); border-left: 3px solid var(--success); border-radius: 0 8px 8px 0; padding: 0.875rem 1.125rem; margin: 1rem 0; }
.tip-callout p { margin: 0; color: var(--text-secondary); }
.tip-callout strong { color: var(--success); }

/* ── Responsive ──────────────────────── */

@media (max-width: 576px) {
  .note-btn { min-width: 55px; padding: 0.75rem 1rem; font-size: 1rem; }
  .note-buttons { gap: 0.5rem; }
  .note-guide .guide-container { padding: 1rem; }
  .note-guide .guide-section { padding: 1.25rem; }
  .mnemonic-box { padding: 0.875rem; }
  .staff-diagram { padding: 0.875rem; }
}

@media (max-height: 700px) and (min-width: 577px) {
  .note-buttons { gap: 0.3rem; margin-bottom: 0.3rem; }
  .note-btn { min-width: 45px; padding: 0.3rem 0.6rem; font-size: 0.9rem; border-radius: 6px; }
}
