:root {
  --bg: linear-gradient(135deg, #0a0a0a 0%, #1a0a0a 50%, #0f0f0f 100%);
  --panel: linear-gradient(145deg, #1a1a1a 0%, #2a1515 50%, #1e1e1e 100%);
  --accent: #ff3030;
  --accent-2: #ffaa00;
  --accent-3: #ff6600;
  --text: #f0f0f0;
  --muted: #cc9999;
  --border: #441111;
  --metal: linear-gradient(145deg, #666666 0%, #333333 50%, #888888 100%);
  --shadow-red: 0 0 20px rgba(255, 48, 48, 0.3);
  --shadow-orange: 0 0 15px rgba(255, 170, 0, 0.2);

  /* ad sizes */
  --ad-top-h: 90px;    /* reserved height for top banner on desktop */
  --ad-rail-w: 300px;  /* typical 300x250/600 */
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 14px/1.5 'Segoe UI', system-ui, -apple-system, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  display: flex; flex-direction: column;
  position: relative;
}

/* Add some rock texture */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: 
    radial-gradient(circle at 20% 80%, rgba(255, 48, 48, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(255, 170, 0, 0.08) 0%, transparent 50%),
    radial-gradient(circle at 40% 40%, rgba(255, 102, 0, 0.05) 0%, transparent 50%);
  pointer-events: none;
  z-index: -1;
  animation: rockPulse 4s ease-in-out infinite alternate;
}

@keyframes rockPulse {
  0% { opacity: 0.7; }
  100% { opacity: 1; }
}

/* Layout */
.site-header { 
  padding: 16px 12px; 
  border-bottom: 2px solid var(--accent);
  background: linear-gradient(135deg, #1a0a0a 0%, #2a1010 100%);
  box-shadow: var(--shadow-red);
}
.header-inner { max-width: 1200px; margin: 0 auto; }
h1 { 
  margin: 0 0 6px; 
  font-size: 26px; 
  font-weight: 800;
  background: linear-gradient(45deg, var(--accent) 0%, var(--accent-2) 50%, var(--accent-3) 100%);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
  letter-spacing: 1px;
}
.sub { 
  margin: 0; 
  color: var(--muted); 
  font-style: italic;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7);
}

.layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  padding: 12px;
}
@media (min-width: 1024px) {
  .layout {
    grid-template-columns: minmax(0, 1fr) var(--ad-rail-w);
    align-items: start;
  }
}

.content-col { min-width: 0; }
.rail-col { display: none; }
@media (min-width: 1024px) {
  .rail-col { display: block; }
}

.panel {
  background: var(--panel);
  border: 2px solid var(--border);
  border-radius: 16px;
  padding: 18px;
  box-shadow: 
    0 8px 24px rgba(0,0,0,.6), 
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    var(--shadow-orange);
  position: relative;
  overflow: hidden;
}

.panel::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent) 0%, var(--accent-2) 50%, var(--accent-3) 100%);
}

.rail-panel h3 { 
  margin: 0 0 10px;
  color: var(--accent);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  text-shadow: 0 0 8px rgba(255, 48, 48, 0.6);
}
.rail-list { 
  margin: 0 0 14px 18px; 
  color: var(--muted);
}
.rail-list li {
  margin: 6px 0;
  position: relative;
}
.rail-list li::before {
  content: "🎸";
  position: absolute;
  left: -20px;
  top: 0;
}

.practice-tips {
  margin: 14px 0;
}

.practice-tips-link {
  display: inline-block;
  color: var(--accent);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  text-shadow: 0 0 8px rgba(255, 48, 48, 0.6);
  text-decoration: underline;
  text-decoration-color: var(--accent-2);
  transition: all 0.3s ease;
}

.practice-tips-link:hover {
  color: var(--accent-2);
  text-shadow: 0 0 12px rgba(255, 170, 0, 0.8);
  text-decoration-color: var(--accent-3);
}

.file-row {
  display: grid;
  grid-template-columns: auto 50px 1fr auto;
  gap: 12px;
  align-items: center;
}
.file-btn {
  background: linear-gradient(145deg, #2a1515 0%, #1a0a0a 50%, #2a1010 100%);
  color: white; 
  padding: 12px 18px; 
  border-radius: 12px;
  border: 2px solid var(--accent);
  cursor: pointer; 
  display: inline-block;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: all 0.3s ease;
  box-shadow: var(--shadow-red);
}
.file-btn:hover { 
  transform: translateY(-2px);
  box-shadow: 
    var(--shadow-red),
    0 6px 20px rgba(255, 48, 48, 0.4);
  border-color: var(--accent-2);
}
.or { text-align: center; color: var(--muted); }
.drop {
  border: 2px dashed var(--accent); 
  border-radius: 12px; 
  padding: 12px;
  text-align: center; 
  color: var(--muted);
  transition: all 0.3s ease;
  background: linear-gradient(145deg, rgba(255, 48, 48, 0.1) 0%, rgba(255, 170, 0, 0.05) 100%);
}
.drop.dragover { 
  border-color: var(--accent-2); 
  color: var(--accent-2);
  background: linear-gradient(145deg, rgba(255, 170, 0, 0.2) 0%, rgba(255, 48, 48, 0.1) 100%);
  box-shadow: var(--shadow-orange);
}
.filename { justify-self: end; color: var(--muted); font-style: italic; }

.wave { 
  height: 160px; 
  margin: 10px 0 8px; 
  border-radius: 12px; 
  overflow: hidden;
  border: 2px solid var(--border);
  box-shadow: 
    inset 0 2px 10px rgba(0, 0, 0, 0.5),
    var(--shadow-orange);
  background: linear-gradient(135deg, #1a1a1a 0%, #2a1515 100%);
}
.ws-region { 
  background: rgba(255, 48, 48, 0.3) !important; 
  border: 2px dashed rgba(255, 170, 0, 0.8) !important;
  box-shadow: 
    0 0 10px rgba(255, 48, 48, 0.5),
    inset 0 0 10px rgba(255, 170, 0, 0.2) !important;
}

.controls, .loop-controls {
  display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 8px;
}
.controls > * { margin-right: 8px; }

button {
  border: 2px solid var(--border); 
  background: linear-gradient(145deg, #2a1515 0%, #1a0a0a 50%, #2a1010 100%);
  color: var(--text);
  padding: 10px 16px; 
  border-radius: 12px; 
  cursor: pointer;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}
button:hover:not([disabled]) { 
  border-color: var(--accent); 
  background: linear-gradient(145deg, #3a1515 0%, #2a1010 50%, #3a1515 100%);
  transform: translateY(-1px);
  box-shadow: 
    0 6px 12px rgba(0, 0, 0, 0.4),
    var(--shadow-red);
}
button[disabled] { 
  opacity: .4; 
  cursor: not-allowed;
  filter: grayscale(0.8);
}

.reset-btn {
  padding: 6px 10px !important;
  font-size: 16px;
  min-width: auto;
  background: linear-gradient(145deg, #3a1515 0%, #2a1010 50%, #3a1515 100%) !important;
  border-color: var(--accent-2) !important;
  cursor: pointer !important;
  pointer-events: auto !important;
}

.reset-btn:hover:not([disabled]) {
  background: linear-gradient(145deg, #4a1515 0%, #3a1515 50%, #4a1515 100%) !important;
  border-color: var(--accent) !important;
  transform: translateY(-2px) scale(1.05);
  cursor: pointer !important;
}

/* Tab capture buttons */
.capture-btn {
  padding: 8px 12px !important;
  font-size: 14px !important;
  background: linear-gradient(145deg, #1a2a1a 0%, #0a1a0a 50%, #1a2010 100%) !important;
  border-color: var(--accent-3) !important;
  color: var(--text) !important;
}

.capture-btn:hover:not([disabled]) {
  background: linear-gradient(145deg, #2a3a2a 0%, #1a2a1a 50%, #2a3010 100%) !important;
  border-color: var(--accent-2) !important;
  transform: translateY(-1px) scale(1.02);
}

.capture-btn:disabled {
  opacity: 0.5;
  background: linear-gradient(145deg, #1a1a1a 0%, #0a0a0a 50%, #1a1010 100%) !important;
  border-color: var(--border) !important;
}

/* Help icon for tab capture feature */
.help-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  background: linear-gradient(145deg, var(--accent-2) 0%, var(--accent-3) 100%);
  color: #000;
  border-radius: 50%;
  font-size: 12px;
  font-weight: bold;
  cursor: help;
  margin: 0 5px;
  position: relative;
  transition: all 0.3s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.help-icon:hover {
  box-shadow: 
    0 4px 8px rgba(0, 0, 0, 0.4),
    var(--shadow-orange);
}

.help-icon::before {
  content: attr(title);
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(145deg, #2a1a0a 0%, #1a1010 50%, #2a1510 100%);
  color: var(--text);
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: normal;
  white-space: nowrap;
  max-width: 320px;
  white-space: normal;
  width: max-content;
  max-width: 320px;
  line-height: 1.4;
  border: 2px solid var(--accent-2);
  box-shadow: 
    0 6px 12px rgba(0, 0, 0, 0.6),
    var(--shadow-orange);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 1000;
  text-align: left;
}

.help-icon::after {
  content: '';
  position: absolute;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-top: 8px solid var(--accent-2);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 1001;
}

.help-icon:hover::before,
.help-icon:hover::after {
  opacity: 1;
  visibility: visible;
}

/* Button feedback effects */
.button-clicked {
  animation: buttonPulse 0.3s ease-out;
  background: linear-gradient(145deg, var(--accent) 0%, var(--accent-2) 50%, var(--accent-3) 100%) !important;
  color: #000 !important;
  transform: scale(0.95);
}

@keyframes buttonPulse {
  0% { 
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(255, 48, 48, 0.7);
  }
  50% { 
    transform: scale(0.95);
    box-shadow: 0 0 0 10px rgba(255, 48, 48, 0);
  }
  100% { 
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(255, 48, 48, 0);
  }
}

/* Special styling for Set A/B buttons when active */
.marker-set {
  background: linear-gradient(145deg, var(--accent-2) 0%, var(--accent) 50%, var(--accent-3) 100%) !important;
  color: #000 !important;
  border-color: var(--accent) !important;
  box-shadow: 
    var(--shadow-orange),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.marker-set:hover:not([disabled]) {
  background: linear-gradient(145deg, var(--accent-3) 0%, var(--accent-2) 50%, var(--accent) 100%) !important;
  transform: translateY(-1px) scale(1.02);
}

.ctrl-group { display: inline-flex; align-items: center; gap: 10px; }
#speed, #transpose { 
  width: 220px; 
  height: 8px;
  background: linear-gradient(90deg, #1a1a1a 0%, #2a1515 100%);
  border-radius: 4px;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
  border: 1px solid var(--border);
}
#speed::-webkit-slider-thumb, #transpose::-webkit-slider-thumb {
  -webkit-appearance: none;
  height: 20px;
  width: 20px;
  border-radius: 50%;
  background: linear-gradient(145deg, var(--accent) 0%, var(--accent-2) 100%);
  cursor: pointer;
  border: 2px solid #000;
  box-shadow: var(--shadow-red);
}
#speed::-moz-range-thumb, #transpose::-moz-range-thumb {
  height: 20px;
  width: 20px;
  border-radius: 50%;
  background: linear-gradient(145deg, var(--accent) 0%, var(--accent-2) 100%);
  cursor: pointer;
  border: 2px solid #000;
  box-shadow: var(--shadow-red);
}
#speedVal { 
  color: var(--accent); 
  min-width: 48px; 
  display: inline-block; 
  text-align: right;
  font-weight: 700;
  text-shadow: 0 0 5px rgba(255, 48, 48, 0.5);
}

.checkbox { display: inline-flex; gap: 8px; align-items: center; color: var(--muted); }

.time-readout { display: inline-flex; gap: 14px; color: var(--muted); margin-left: auto; }
.time-readout span { color: var(--text); }

kbd {
  background: linear-gradient(145deg, #1a0a0a 0%, #2a1515 100%);
  padding: 4px 8px; 
  border-radius: 8px; 
  border: 2px solid var(--accent);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  font-size: 12px; 
  color: var(--accent-2);
  font-weight: 700;
  text-shadow: 0 0 3px rgba(255, 170, 0, 0.5);
  box-shadow: 
    0 2px 4px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}
.hint { 
  color: var(--muted); 
  margin: 10px 0 0;
  font-style: italic;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.site-footer { 
  text-align: center; 
  padding: 20px 12px; 
  border-top: 2px solid var(--accent);
  background: linear-gradient(135deg, #1a0a0a 0%, #2a1010 100%);
  box-shadow: var(--shadow-red);
}
.site-footer small { color: var(--muted); }

.footer-nav {
  margin-bottom: 10px;
}
.footer-nav a {
  color: var(--accent-2);
  text-decoration: none;
  margin: 0 5px;
  font-size: 14px;
  transition: color 0.3s ease;
}
.footer-nav a:hover {
  color: var(--accent);
  text-shadow: 0 0 5px rgba(255, 170, 0, 0.5);
}

/* Ad slots: reserve space to avoid CLS */
.ad-slot {
  background: #0d1117;
  border: 1px dashed #263042;
  border-radius: 10px;
  color: #5e6a82;
  display: block;
  position: relative;
  overflow: hidden;
}
.ad-slot::after {
  content: "Ad";
  position: absolute; top: 8px; right: 10px;
  font-size: 11px; color: #3c465c;
}
.ad-top { height: var(--ad-top-h); margin-top: 10px; }
@media (max-width: 640px) {
  .ad-top { height: 60px; } /* smaller mobile banner */
}
.ad-inline { height: 280px; margin-top: 12px; } /* room for in-article/rectangle */
.ad-rail { width: 100%; min-height: 250px; margin-top: 12px; }

/* Support box */
.support { 
  margin-top: 12px; 
  padding: 12px; 
  background: linear-gradient(145deg, #2a1515 0%, #1a0a0a 100%);
  border: 2px solid var(--border); 
  border-radius: 12px;
  box-shadow: var(--shadow-orange);
}
.support-title { 
  color: var(--accent-2); 
  margin-bottom: 8px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.support-btn { 
  display: inline-block; 
  padding: 10px 16px; 
  border: 2px solid var(--accent); 
  border-radius: 12px; 
  color: var(--text); 
  text-decoration: none;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: all 0.3s ease;
  background: linear-gradient(145deg, #2a1515 0%, #1a0a0a 100%);
}
.support-btn:hover { 
  background: linear-gradient(145deg, #3a1515 0%, #2a1010 100%);
  border-color: var(--accent-2);
  transform: translateY(-2px);
  box-shadow: var(--shadow-red);
}

/* Consent banner */
.consent.hidden { display: none; }
.consent {
  position: fixed; inset: 0; background: rgba(0,0,0,.55);
  display: grid; place-items: end center; padding: 12px;
  z-index: 9999;
}
.consent-box {
  width: min(680px, 100%);
  background: #0e1420; border: 1px solid var(--border); border-radius: 14px;
  padding: 14px;
}
.consent-title { font-weight: 600; margin-bottom: 6px; }
.consent-actions { display: flex; gap: 8px; justify-content: end; margin-top: 8px; }
.consent-actions .primary { background: #1d2430; }

#transpose {
  width: 220px; /* same as speed for consistency */
}
#transposeVal { 
  min-width: 24px; 
  display: inline-block; 
  text-align: right;
  color: var(--accent-2);
  font-weight: 700;
  text-shadow: 0 0 5px rgba(255, 170, 0, 0.5);
}

/* Instrument Focus Dropdown */
#instrumentFocus {
  background: linear-gradient(135deg, #2a2a2a 0%, #1a1a1a 100%);
  border: 2px solid var(--accent-3);
  border-radius: 8px;
  color: var(--text);
  padding: 8px 12px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  min-width: 160px;
  text-shadow: 0 0 5px rgba(255, 102, 0, 0.3);
}

#instrumentFocus:hover {
  border-color: var(--accent-2);
  box-shadow: var(--shadow-orange);
  transform: translateY(-1px);
}

#instrumentFocus:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 20px rgba(255, 48, 48, 0.4);
}

#instrumentFocus option {
  background: #1a1a1a;
  color: var(--text);
  padding: 8px;
  border: none;
  font-weight: 600;
}

#instrumentFocus:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  border-color: #666;
  box-shadow: none;
  transform: none;
  pointer-events: none;
}

#instrumentFocus:not(:disabled) {
  pointer-events: auto;
}

/* Blog Styles */
.blog-nav {
  margin: 15px 0;
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
}

.blog-nav .nav-link {
  color: var(--accent-2);
  text-decoration: none;
  padding: 8px 15px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: rgba(255, 170, 0, 0.1);
  transition: all 0.3s ease;
}

.blog-nav .nav-link:hover {
  background: rgba(255, 170, 0, 0.2);
  box-shadow: var(--shadow-orange);
  transform: translateY(-2px);
}

.post-meta {
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 20px;
  font-style: italic;
}

.tip-box, .warning-box, .cta-box {
  margin: 25px 0;
  padding: 20px;
  border-radius: 8px;
  border-left: 4px solid var(--accent-2);
}

.tip-box {
  background: rgba(255, 170, 0, 0.1);
  border-left-color: var(--accent-2);
}

.warning-box {
  background: rgba(255, 48, 48, 0.1);
  border-left-color: var(--accent);
}

.cta-box {
  background: rgba(255, 102, 0, 0.1);
  border-left-color: var(--accent-3);
  text-align: center;
}

.tip-box h3, .warning-box h4, .cta-box h3 {
  margin-top: 0;
  color: var(--accent-2);
}

.blog-posts {
  display: grid;
  gap: 20px;
  margin-top: 20px;
}

.blog-post-preview {
  padding: 20px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  transition: all 0.3s ease;
}

.blog-post-preview:hover {
  box-shadow: var(--shadow-orange);
  transform: translateY(-3px);
}

.blog-post-preview h3 {
  margin-top: 0;
  margin-bottom: 10px;
}

.blog-post-preview h3 a {
  color: var(--text);
  text-decoration: none;
}

.blog-post-preview h3 a:hover {
  color: var(--accent-2);
}

.blog-post-preview .excerpt {
  color: var(--muted);
  margin-bottom: 15px;
  line-height: 1.6;
}

.read-more {
  color: var(--accent-2);
  text-decoration: none;
  font-weight: 600;
}

.read-more:hover {
  text-decoration: underline;
}

/* Save Loops Feature */
.saved-loops-section {
  margin-top: 12px;
  padding: 16px;
  background: var(--panel);
  border-radius: 8px;
  border: 1px solid var(--border);
  box-shadow: 0 2px 8px rgba(255, 48, 48, 0.1);
}

.saved-loops-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.saved-loops-section h3 {
  margin: 0;
  color: var(--accent);
  font-size: 16px;
  font-weight: 700;
}

.close-saved-loops {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 20px;
  cursor: pointer;
  padding: 0;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.3s ease;
}

.close-saved-loops:hover {
  color: var(--accent);
  background: rgba(255, 48, 48, 0.1);
}

.saved-loops-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.saved-loop-item {
  background: linear-gradient(145deg, #2a2a2a 0%, #1a1a1a 100%);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.3s ease;
}

.saved-loop-item:hover {
  border-color: var(--accent);
  box-shadow: 0 0 8px rgba(255, 48, 48, 0.3);
}

.loop-item-info {
  flex: 1;
}

.loop-item-name {
  color: var(--text);
  font-weight: 600;
  margin-bottom: 4px;
}

.loop-item-details {
  color: var(--muted);
  font-size: 12px;
}

.loop-item-actions {
  display: flex;
  gap: 8px;
}

.loop-action-btn {
  background: var(--accent);
  color: white;
  border: none;
  padding: 4px 8px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
  transition: background 0.3s ease;
}

.loop-action-btn:hover {
  background: var(--accent-2);
}

.loop-action-btn.delete {
  background: #cc3333;
}

.loop-action-btn.delete:hover {
  background: #ff4444;
}

/* Modal Styles */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.modal.hidden {
  display: none;
}

.modal-content {
  background: var(--panel);
  border: 2px solid var(--accent);
  border-radius: 12px;
  width: 90%;
  max-width: 400px;
  box-shadow: var(--shadow-red);
}

.modal-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header h3 {
  margin: 0;
  color: var(--accent);
}

.modal-close {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 24px;
  cursor: pointer;
  padding: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-close:hover {
  color: var(--accent);
}

.modal-body {
  padding: 20px;
}

.modal-body label {
  display: block;
  margin-bottom: 8px;
  color: var(--text);
  font-weight: 600;
}

.modal-body input[type="text"] {
  width: 100%;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #1a1a1a;
  color: var(--text);
  font-size: 14px;
  margin-bottom: 16px;
}

.modal-body input[type="text"]:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 8px rgba(255, 48, 48, 0.3);
}

.loop-info {
  background: #1a1a1a;
  padding: 12px;
  border-radius: 6px;
  border: 1px solid var(--border);
}

.loop-info p {
  margin: 4px 0;
  color: var(--muted);
  font-size: 14px;
}

.modal-footer {
  padding: 16px 20px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

.btn-secondary {
  background: #555;
  color: var(--text);
  border: none;
  padding: 10px 16px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  transition: background 0.3s ease;
}

.btn-secondary:hover {
  background: #666;
}

.btn-primary {
  background: var(--accent);
  color: white;
  border: none;
  padding: 10px 16px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  transition: background 0.3s ease;
}

.btn-primary:hover {
  background: var(--accent-2);
}

/* Button feedback styles */
.button-clicked {
  transform: scale(0.95);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
}

.marker-set {
  background: var(--accent) !important;
  box-shadow: 0 0 8px rgba(255, 48, 48, 0.5);
}

#saveLoop {
  background: var(--accent-2);
  color: white;
}

#saveLoop:hover:not(:disabled) {
  background: var(--accent-3);
}

#saveLoop:disabled {
  background: #666;
  color: #999;
  cursor: not-allowed;
}

.show-saved-btn {
  background: var(--accent-3);
  color: white;
  border: none;
  padding: 8px 12px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
  transition: all 0.3s ease;
}

.show-saved-btn:hover {
  background: var(--accent-2);
}

.show-saved-btn.active {
  background: var(--accent);
  box-shadow: 0 0 8px rgba(255, 48, 48, 0.5);
}

.related-posts {
  list-style: none;
  padding: 0;
}

.related-posts li {
  margin-bottom: 10px;
}

.related-posts a {
  color: var(--accent-2);
  text-decoration: none;
}

.related-posts a:hover {
  text-decoration: underline;
}

.author-bio {
  background: rgba(255, 170, 0, 0.05);
  padding: 15px;
  border-radius: 6px;
  font-style: italic;
  color: var(--muted);
}