@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&family=Outfit:wght@400;600;700&display=swap');

:root {
  --bg-color: #0f1115;
  --panel-bg: rgba(26, 30, 36, 0.6);
  --text-main: #f8f9fa;
  --text-muted: #a0aec0;
  --accent: #ffd700;
  --accent-glow: rgba(255, 215, 0, 0.3);
  --success: #38b2ac;
  --border-light: rgba(255, 255, 255, 0.08);
}

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

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--bg-color);
  color: var(--text-main);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

h1, h2, h3, h4, h5 {
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
}

/* Glassmorphism Panel */
.glass-panel {
  background: var(--panel-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-light);
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

header {
  padding: 2rem;
  text-align: center;
  border-bottom: 1px solid var(--border-light);
}

header h1 {
  font-size: 2.5rem;
  background: linear-gradient(135deg, var(--text-main) 0%, var(--text-muted) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 0.5rem;
}

header h1 a {
  text-decoration: none;
}

header p {
  color: var(--accent);
  font-size: 1.1rem;
  text-transform: uppercase;
  letter-spacing: 2px;
}

main {
  flex: 1;
  padding: 3rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}

/* Home Grid */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.tool-card {
  display: block;
  text-decoration: none;
  color: inherit;
  padding: 2.5rem;
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.3s ease;
  position: relative;
  overflow: hidden;
}

.tool-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at top right, var(--accent-glow) 0%, transparent 70%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.tool-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 35px rgba(0,0,0,0.4), 0 0 20px var(--accent-glow);
  border-color: rgba(255, 215, 0, 0.4);
}

.tool-card:hover::before {
  opacity: 1;
}

.tool-card h2 {
  font-size: 1.8rem;
  margin-bottom: 1rem;
  position: relative;
  z-index: 1;
}

.tool-card p {
  color: var(--text-muted);
  position: relative;
  z-index: 1;
}

/* Chord Charts Layout */
.controls-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.btn {
  background: transparent;
  border: 1px solid var(--border-light);
  color: var(--text-main);
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn:hover {
  background: var(--border-light);
}

.btn.primary {
  background: var(--accent);
  color: #000;
  border-color: var(--accent);
}

.btn.primary:hover {
  background: #e6c200;
  box-shadow: 0 0 20px var(--accent-glow);
}

.chord-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 2rem;
}

.chord-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1.5rem;
}

.chord-item h3 {
  margin-bottom: 1rem;
  font-size: 1.4rem;
  color: var(--accent);
}

.chord-diagram {
  width: 100%;
  max-width: 180px;
  background: #fff; /* Chords svg generated are usually colored black on white/transparent which is hard to see on dark bg, so we use white bg with rounded edges */
  border-radius: 12px;
  padding: 10px;
}

/* Practice Area */
.practice-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  margin: 0 auto;
  text-align: center;
}

.metronome-display {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 2rem;
}

.beat {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--border-light);
  transition: background 0.1s;
}

.beat.active {
  background: var(--accent);
  box-shadow: 0 0 15px var(--accent);
}

.beat.downbeat {
  background: var(--success);
  box-shadow: 0 0 15px var(--success);
}

.active-chord-display {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4rem;
  margin-bottom: 3rem;
  width: 100%;
}

.chord-focus {
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: transform 0.2s ease;
}

.chord-focus.pulse {
  transform: scale(1.05);
}

.chord-focus h2 {
  font-size: 4rem;
  color: var(--accent);
  margin-bottom: 1rem;
}

.chord-focus.next {
  opacity: 0.5;
  transform: scale(0.8);
}

.chord-focus.next h2 {
  font-size: 2.5rem;
  color: var(--text-muted);
}

footer {
  text-align: center;
  padding: 2rem;
  color: var(--text-muted);
  font-size: 0.9rem;
  border-top: 1px solid var(--border-light);
}

@media (max-width: 768px) {
  .active-chord-display {
    flex-direction: column;
    gap: 2rem;
  }
}
