/* ==========================================================================
   1. GLOBAL RESET & BASE LAYOUT
   ========================================================================== */
body {
  margin: 0;
  padding: 0;
  font-family: Arial, sans-serif;
  background: #121212;
  color: white;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ==========================================================================
   2. TOP NAVIGATION BAR
   ========================================================================== */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 5%;
  background: #1e1e1e;
  border-bottom: 1px solid #333;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
  width: 100%;
  box-sizing: border-box;
}

.logo {
  font-size: 22px;
  font-weight: bold;
  color: white;
  letter-spacing: 1px;
  text-transform: lowercase;
}

.logo span {
  font-weight: 300;
  opacity: 0.6;
}

.nav-links {
  display: flex;
  gap: 10px;
}

.nav-btn {
  background: transparent;
  border: none;
  color: #aaa;
  padding: 10px 15px;
  cursor: pointer;
  font-size: 16px;
  font-weight: bold;
  border-radius: 6px;
  text-decoration: none;
  transition: all 0.2s ease;
}

.nav-btn:hover {
  color: white;
  background: #2d2d2d;
}

.nav-btn.active {
  color: #3b82f6;
  background: #2d2d2d;
}

/* ==========================================================================
   3. APP CONTAINER & GENERAL MODULE DESIGN
   ========================================================================== */
.container {
  text-align: center;
  width: 90%;
  max-width: 500px;
  margin: 50px auto;
  flex-grow: 1;
}

.subtitle {
  opacity: 0.7;
  margin-bottom: 20px;
  font-size: 18px;
}

/* Core Action Button Style Rules */
.action-btn {
  background: #3b82f6;
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 16px;
  font-weight: bold;
  transition: background 0.2s, opacity 0.2s;
  outline: none;
}

.action-btn:hover {
  opacity: 0.9;
}

/* Unified UI Card Blueprint */
.tuner {
  margin-top: 25px;
  background: #1e1e1e;
  padding: 30px;
  border-radius: 12px;
  width: 100%;
  box-sizing: border-box;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.4);
}

.note {
  font-size: 64px;
  font-weight: bold;
  margin-bottom: 5px;
}

.frequency {
  font-size: 22px;
  opacity: 0.8;
  margin-bottom: 15px;
}

.status {
  font-size: 26px;
  margin-top: 15px;
  margin-bottom: 15px;
}

.small {
  margin-top: 25px;
  opacity: 0.6;
  font-size: 14px;
}

/* ==========================================================================
   4. TUNER SPECIFIC MODULES
   ========================================================================== */
.meter {
  margin-top: 25px;
  height: 8px;
  background: #333;
  border-radius: 10px;
  position: relative;
}

.marker {
  width: 8px;
  height: 18px;
  background: white;
  position: absolute;
  top: -5px;
  left: 50%;
  transform: translateX(-50%);
  border-radius: 4px;
  transition: left 0.1s ease;
}

/* ==========================================================================
   5. METRONOME SPECIFIC MODULES
   ========================================================================== */
.slider-container {
  width: 100%;
  margin: 20px 0;
}

#bpmSlider {
  width: 100%;
  cursor: pointer;
  accent-color: #3b82f6;
}

.beat-visualizer {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  margin-top: 25px;
}

.beat-dot {
  flex: 1;
  height: 10px;
  background: #333;
  border-radius: 4px;
  transition: background 0.05s ease;
}

.beat-dot.active {
  background: #3b82f6; 
}
.beat-dot.flash {
  background: #22c55e; 
}

/* ==========================================================================
   6. PREMIUM NEWSROOM CONTENT GRID ENGINE
   ========================================================================== */
.community-container {
  width: 90%;
  max-width: 1200px;
  margin: 50px auto;
  padding: 0 20px;
  box-sizing: border-box;
}

.community-title {
  font-size: 48px;
  font-weight: bold;
  margin-bottom: 10px;
  letter-spacing: -0.5px;
  text-align: left;
}

.community-subtitle {
  font-size: 18px;
  opacity: 0.6;
  margin-bottom: 40px;
  text-align: left;
}

.articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 25px;
}

.article-card {
  background: #1e1e1e;
  padding: 25px;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  text-align: left;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.article-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.card-category {
  font-size: 12px;
  font-weight: bold;
  letter-spacing: 1.5px;
  color: #aaa;
  margin-bottom: 15px;
  text-transform: uppercase;
}

.card-title {
  font-size: 20px;
  font-weight: bold;
  line-height: 1.4;
  margin: 0 0 12px 0;
  color: #fff;
}

.card-text {
  font-size: 14px;
  line-height: 1.6;
  color: #ccc;
  opacity: 0.85;
  margin: 0 0 25px 0;
  flex-grow: 1;
}

.card-link {
  font-size: 14px;
  font-weight: bold;
  color: #fff;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  transition: opacity 0.2s;
}

.card-link:hover {
  opacity: 0.7;
}

.upload-container label:hover {
  background: #2a2a2a !important;
  border-color: #8b5cf6 !important;
  transform: translateY(-2px);
}

/* ==========================================================================\
   X. PREMIUM CHORD STUDIO WORKSPACE LAYOUT & LAYOUT CONFLICT FIXES
   ========================================================================== */
.studio-layout {
  display: flex !important;
  flex-direction: row !important;
  flex: 1;
  width: 100vw;
  box-sizing: border-box;
  padding: 30px;
  gap: 30px;
  align-items: flex-start;
}

/* Sidebar Navigation Panel */
.studio-sidebar {
  width: 320px;
  background: #1e1e1e;
  border-radius: 12px;
  padding: 24px;
  border: 1px solid #2d2d2d;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: 25px;
}

.sidebar-header {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.sidebar-header h2 {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.5px;
  text-transform: lowercase;
}

.badge-live {
  font-size: 10px;
  font-weight: bold;
  background: rgba(34, 197, 94, 0.1);
  color: #22c55e;
  padding: 4px 8px;
  border-radius: 4px;
  width: max-content;
  letter-spacing: 0.5px;
}

.control-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.section-title {
  font-size: 12px;
  text-transform: lowercase;
  color: #777;
  letter-spacing: 0.5px;
}

/* UI Picker System Components (Segmented, Matrix, List) */
.segmented-picker {
  display: flex;
  background: #121212;
  padding: 4px;
  border-radius: 8px;
  border: 1px solid #2d2d2d;
}

.picker-btn {
  flex: 1;
  background: transparent;
  border: none;
  color: #777;
  padding: 10px;
  font-size: 13px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: bold;
  transition: all 0.2s ease;
  text-transform: lowercase;
}

.picker-btn.active {
  background: #252525;
  color: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.4);
}

.matrix-picker {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}

.matrix-btn {
  background: #121212;
  border: 1px solid #2d2d2d;
  color: #aaa;
  padding: 12px 0;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
  font-weight: bold;
  transition: all 0.2s ease;
}

.matrix-btn:hover {
  border-color: #555;
  color: #fff;
}

.matrix-btn.active {
  background: #fff;
  color: #121212;
  border-color: #fff;
}

.list-picker {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.list-btn {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #121212;
  border: 1px solid #2d2d2d;
  color: #aaa;
  padding: 14px 16px;
  border-radius: 8px;
  cursor: pointer;
  text-align: left;
  font-size: 13px;
  transition: all 0.2s ease;
}

.list-btn:hover:not(:disabled) {
  border-color: #555;
  color: #fff;
}

.list-btn.active {
  background: #252525;
  border-color: #3b82f6;
  color: #fff;
}

.list-btn .formula {
  font-size: 11px;
  color: #555;
}

.list-btn.active .formula {
  color: #3b82f6;
}

.list-btn.locked {
  background: rgba(255,255,255,0.02);
  border: 1px dashed #2d2d2d;
  cursor: not-allowed;
  opacity: 0.5;
}

.pro-tag {
  font-size: 9px;
  background: #8b5cf6;
  color: #fff;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: bold;
}

/* Right Side Workspace Display Canvas */
.studio-workspace {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-width: 0;
}

.display-card {
  background: #1e1e1e;
  border-radius: 12px;
  border: 1px solid #2d2d2d;
  padding: 30px;
  display: flex;
  flex-direction: column;
  min-height: 320px;
}

.display-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  border-bottom: 1px solid #2d2d2d;
  padding-bottom: 20px;
  margin-bottom: 30px;
}

.active-chord-label {
  font-size: 32px;
  font-weight: bold;
  letter-spacing: -1px;
}

.interval-ribbon {
  font-size: 14px;
  color: #777;
  font-family: monospace;
}

.canvas-viewport {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px 0;
}

.visualizer-view {
  width: 100%;
  transition: opacity 0.2s ease;
}

.visualizer-view.hidden {
  display: none !important;
}

/* ==========================================================================\
   XI. INTERACTIVE GUITAR FRETBOARD ENGINE RENDERING Styles
   ========================================================================== */
.fretboard-board {
  display: flex;
  flex-direction: column;
  background: #161616;
  border: 1px solid #333;
  border-radius: 6px;
  padding: 20px 0;
  position: relative;
  box-shadow: inset 0 0 20px rgba(0,0,0,0.8);
  width: 100%;
}

.fretboard-string-row {
  display: flex;
  height: 30px;
  align-items: center;
  position: relative;
}

.fretboard-string-row::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  height: var(--string-thickness, 2px);
  background: linear-gradient(90deg, #555, #888, #555);
  z-index: 1;
}

.fret-node-cell {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100%;
  border-right: 2px solid #333;
  position: relative;
  z-index: 2;
}

.fret-node-cell:first-child {
  flex: 0 0 50px;
  border-right: 5px solid #555;
  background: rgba(255,255,255,0.02);
}

.fret-marker-dot {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #3b82f6;
  color: white;
  font-size: 11px;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 10px #3b82f6;
}

.string-muted {
  color: #ef4444;
  font-weight: bold;
  font-size: 16px;
}

.string-open-active {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid #22c55e;
  background: transparent;
}

/* ==========================================================================\
   XII. LUXURY FLAT PIANO INTERACTIVE RENDERING STYLES
   ========================================================================== */
.piano-keyboard-bed {
  display: flex;
  position: relative;
  background: #121212;
  padding: 10px;
  border-radius: 8px;
  border: 1px solid #2d2d2d;
  width: max-content;
  margin: 0 auto;
}

.piano-white-key {
  width: 45px;
  height: 180px;
  background: #fdfdfd;
  border: 1px solid #dcdcdc;
  border-radius: 0 0 4px 4px;
  position: relative;
  cursor: pointer;
  z-index: 1;
}

.piano-white-key.active {
  background: #3b82f6 !important;
  border-color: #3b82f6;
}

.piano-black-key {
  width: 28px;
  height: 110px;
  background: #1a1a1a;
  border: 1px solid #000;
  border-radius: 0 0 3px 3px;
  position: absolute;
  z-index: 2;
  cursor: pointer;
  margin-left: -14px;
}

.piano-black-key.active {
  background: #3b82f6 !important;
  border-color: #3b82f6;
}

/* Frosted Glass AI Overlay Section Dock */
.ai-dock {
  background: #1e1e1e;
  border: 1px solid #2d2d2d;
  border-radius: 12px;
  padding: 16px;
  position: relative;
  overflow: hidden;
}

.dock-row {
  display: flex;
  gap: 12px;
}

.ai-dock input {
  flex: 1;
  background: #121212;
  border: 1px solid #2d2d2d;
  border-radius: 8px;
  padding: 14px;
  color: white;
  font-size: 14px;
}

.send-prompt-btn {
  background: #252525;
  color: #777;
  border: 1px solid #2d2d2d;
  width: 50px;
  border-radius: 8px;
  font-size: 18px;
  cursor: not-allowed;
}

.premium-locked .ai-blur-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(18, 18, 18, 0.75);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lock-centerpiece {
  text-align: center;
  padding: 20px;
}

.lock-centerpiece h3 {
  margin: 8px 0 4px 0;
  font-size: 16px;
  font-weight: bold;
}

.lock-centerpiece p {
  margin: 0 0 15px 0;
  font-size: 13px;
  color: #aaa;
}

.upsell-cta {
  background: linear-gradient(135deg, #8b5cf6, #3b82f6);
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: bold;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3);
  transition: transform 0.2s;
}

.upsell-cta:hover {
  transform: scale(1.03);
}