/* The Devil's Jukebox — Main Stylesheet */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

/* ─── CSS Variables ──────────────────────────────────────────────────────── */
:root {
  --accent:      #00d4c8;
  --accent-dim:  rgba(0,212,200,0.12);
  --accent-glow: rgba(0,212,200,0.25);
  --accent-hover:#00b8ad;
  --bg:          #0a0a0a;
  --card-bg:     #111111;
  --card-hover:  #161616;
  --text:        #ffffff;
  --muted:       #888888;
  --border:      #222222;
  --nav-bg:      #000000;
  --danger:      #ff4040;
  --warning:     #ffaa00;
  --success:     #00c87a;
  --font:        'Inter','Helvetica Neue',Arial,sans-serif;
  --radius:      8px;
  --radius-lg:   14px;
  --shadow:      0 8px 32px rgba(0,0,0,0.5);
  --transition:  0.18s ease;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { background: var(--bg); color: var(--text); font-family: var(--font); line-height: 1.65; min-height: 100vh; }
img { max-width: 100%; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ─── Admin bar ──────────────────────────────────────────────────────────── */
.admin-bar {
  background: rgba(0,212,200,0.08);
  border-bottom: 1px solid rgba(0,212,200,0.25);
  padding: 0.6rem 1.5rem;
  display: flex; align-items: center; justify-content: space-between;
  font-size: 0.8rem; color: var(--accent);
  position: sticky; top: 0; z-index: 200;
}
.admin-bar a { color: var(--accent); font-weight: 600; }
.admin-bar a:hover { text-decoration: underline; }

/* ─── Navigation ─────────────────────────────────────────────────────────── */
nav {
  background: var(--nav-bg);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 100;
}
nav.has-admin-bar { top: 38px; }
.nav-inner {
  max-width: 1280px; margin: 0 auto; padding: 0 1.5rem;
  display: flex; align-items: center; justify-content: space-between;
  height: 64px;
}
.site-title {
  font-size: 1.2rem; font-weight: 900;
  color: var(--text); text-decoration: none; letter-spacing: -0.02em;
}
.site-title .accent { color: var(--accent); }
.site-title:hover { text-decoration: none; }
.nav-links { display: flex; list-style: none; gap: 2px; align-items: center; }
.nav-links a {
  color: var(--muted); text-decoration: none; font-size: 0.875rem; font-weight: 500;
  padding: 0.4rem 0.75rem; border-radius: var(--radius);
  transition: color var(--transition), background var(--transition);
  white-space: nowrap;
}
.nav-links a:hover { color: var(--text); background: rgba(255,255,255,0.05); text-decoration: none; }
.nav-links a.active { color: var(--accent); }
.nav-admin-btn {
  background: var(--accent) !important; color: #000 !important;
  font-weight: 700 !important; padding: 0.4rem 1rem !important;
}
.nav-admin-btn:hover { background: var(--accent-hover) !important; }
.hamburger { display: none; background: none; border: none; cursor: pointer; color: var(--text); padding: 0.5rem; }
.hamburger svg { display: block; }
@media (max-width: 860px) {
  .hamburger { display: block; }
  .nav-links {
    display: none; flex-direction: column; gap: 0;
    position: absolute; top: 64px; left: 0; right: 0;
    background: var(--nav-bg); border-bottom: 1px solid var(--border);
    padding: 0.75rem 1.5rem 1rem;
  }
  .nav-links.open { display: flex; }
  .nav-links li { width: 100%; }
  .nav-links a { display: block; width: 100%; padding: 0.5rem 0.75rem; }
}

/* ─── Layout ─────────────────────────────────────────────────────────────── */
.container        { max-width: 1280px; margin: 0 auto; padding: 0 1.5rem; }
.container-narrow { max-width: 820px;  margin: 0 auto; padding: 0 1.5rem; }
.container-wide   { max-width: 1400px; margin: 0 auto; padding: 0 1.5rem; }
section { padding: 4rem 0; }
.section-inner { max-width: 1280px; margin: 0 auto; padding: 0 1.5rem; }

/* ─── Hero ───────────────────────────────────────────────────────────────── */
.hero {
  background: var(--bg);
  padding: 7rem 1.5rem 6rem;
  text-align: center;
  position: relative; overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute; top: -60%; left: 50%; transform: translateX(-50%);
  width: 800px; height: 800px;
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 65%);
  pointer-events: none;
}
.hero-label {
  display: inline-block;
  color: var(--accent); font-size: 0.7rem; font-weight: 700;
  letter-spacing: 0.25em; text-transform: uppercase;
  border: 1px solid var(--accent-dim); border-radius: 20px;
  padding: 0.3rem 0.9rem; margin-bottom: 1.5rem;
  background: var(--accent-dim);
}
.hero-title {
  font-size: clamp(2.75rem, 7vw, 5.5rem);
  font-weight: 900; line-height: 1.03; letter-spacing: -0.035em;
  margin-bottom: 1.5rem;
}
.hero-title .accent { color: var(--accent); }
.hero-subtitle {
  font-size: clamp(1rem, 2vw, 1.2rem); color: var(--muted);
  max-width: 600px; margin: 0 auto 2.5rem; line-height: 1.7;
}
.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; justify-content: center; }

/* ─── Buttons ────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.75rem 1.5rem; border-radius: var(--radius);
  font-family: var(--font); font-size: 0.875rem; font-weight: 600;
  text-decoration: none; cursor: pointer; border: none;
  transition: all var(--transition); white-space: nowrap;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--accent); color: #000; }
.btn-primary:hover { background: var(--accent-hover); transform: translateY(-1px); box-shadow: 0 6px 20px var(--accent-glow); }
.btn-outline { background: transparent; color: var(--text); border: 1px solid var(--border); }
.btn-outline:hover { border-color: var(--accent); color: var(--accent); }
.btn-ghost { background: transparent; color: var(--muted); padding: 0.5rem 0.875rem; }
.btn-ghost:hover { color: var(--text); background: rgba(255,255,255,0.05); }
.btn-sm { padding: 0.4rem 0.875rem; font-size: 0.8rem; }
.btn-lg { padding: 0.9rem 2rem; font-size: 1rem; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #cc2020; transform: translateY(-1px); }
.btn-success { background: var(--success); color: #000; }

/* ─── Cards ──────────────────────────────────────────────────────────────── */
.card {
  background: var(--card-bg); border: 1px solid var(--border);
  border-radius: var(--radius-lg); overflow: hidden;
  transition: all var(--transition); position: relative;
}
.card:hover { border-color: rgba(0,212,200,0.3); transform: translateY(-3px); box-shadow: var(--shadow); }
.card-img { width: 100%; aspect-ratio: 16/9; object-fit: cover; display: block; }
.card-img-placeholder {
  width: 100%; aspect-ratio: 16/9; background: linear-gradient(135deg, #1a1a1a, #0d0d0d);
  display: flex; align-items: center; justify-content: center; font-size: 2.5rem; color: var(--border);
}
.card-body { padding: 1.25rem; }
.card-tag {
  display: inline-flex; align-items: center; gap: 0.3rem;
  font-size: 0.68rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
  padding: 0.2rem 0.5rem; border-radius: 4px; margin-bottom: 0.75rem;
}
.card-tag-post    { background: rgba(255,170,0,0.12); color: #ffaa00; }
.card-tag-audio   { background: var(--accent-dim);    color: var(--accent); }
.card-tag-video   { background: rgba(255,80,80,0.12); color: #ff6060; }
.card-tag-youtube { background: rgba(255,80,80,0.12); color: #ff6060; }
.card-tag-gallery { background: rgba(130,80,255,0.12);color: #a070ff; }
.card-tag-mixed   { background: rgba(0,180,255,0.12); color: #00b4ff; }
.card-title { font-size: 1.1rem; font-weight: 700; line-height: 1.3; margin-bottom: 0.5rem; color: var(--text); }
.card-title a { color: var(--text); }
.card-title a:hover { color: var(--accent); text-decoration: none; }
.card-excerpt { font-size: 0.875rem; color: var(--muted); line-height: 1.6; margin-bottom: 0.75rem; }
.card-meta { font-size: 0.75rem; color: var(--muted); display: flex; gap: 0.75rem; align-items: center; flex-wrap: wrap; }

/* ─── Grid ───────────────────────────────────────────────────────────────── */
.grid { display: grid; gap: 1.5rem; }
.grid-3 { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.grid-2 { grid-template-columns: repeat(auto-fill, minmax(380px, 1fr)); }

/* ─── Section headers ────────────────────────────────────────────────────── */
.section-header { margin-bottom: 2.5rem; }
.section-label {
  color: var(--accent); font-size: 0.7rem; font-weight: 700;
  letter-spacing: 0.2em; text-transform: uppercase; margin-bottom: 0.5rem;
}
.section-title { font-size: clamp(1.75rem, 3vw, 2.5rem); font-weight: 800; letter-spacing: -0.02em; line-height: 1.15; }
.section-subtitle { color: var(--muted); margin-top: 0.5rem; font-size: 1rem; max-width: 600px; }

/* ─── Forms ──────────────────────────────────────────────────────────────── */
.form-group { margin-bottom: 1.25rem; }
.form-label { display: block; font-size: 0.85rem; font-weight: 600; margin-bottom: 0.4rem; color: var(--text); }
.form-help  { display: block; font-size: 0.75rem; color: var(--muted); margin-top: 0.3rem; }
.form-input, .form-textarea, .form-select {
  width: 100%; background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--radius); color: var(--text);
  font-family: var(--font); font-size: 0.9rem; padding: 0.625rem 0.875rem;
  transition: border-color var(--transition);
}
.form-input:focus, .form-textarea:focus, .form-select:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-dim);
}
.form-textarea { resize: vertical; min-height: 100px; line-height: 1.6; }
.form-select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23888' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 0.875rem center; padding-right: 2.5rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 640px) { .form-row { grid-template-columns: 1fr; } }

/* ─── Audio Player ───────────────────────────────────────────────────────── */
.audio-player {
  background: var(--card-bg); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 1.5rem;
  display: flex; gap: 1.5rem; align-items: flex-start;
}
@media (max-width: 520px) { .audio-player { flex-direction: column; } }
.audio-artwork {
  width: 110px; height: 110px; border-radius: var(--radius);
  object-fit: cover; flex-shrink: 0;
}
.audio-artwork-placeholder {
  width: 110px; height: 110px; border-radius: var(--radius);
  background: linear-gradient(135deg, var(--accent-dim) 0%, #1a1a1a 100%);
  border: 1px solid var(--border); flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; font-size: 2rem;
}
.audio-body { flex: 1; min-width: 0; }
.audio-title { font-weight: 700; font-size: 1rem; margin-bottom: 0.2rem; }
.audio-artist { color: var(--muted); font-size: 0.8rem; margin-bottom: 1rem; }
.audio-controls { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 0.75rem; }
.audio-play-btn {
  width: 42px; height: 42px; border-radius: 50%;
  background: var(--accent); border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: #000; font-size: 1rem; transition: all var(--transition); flex-shrink: 0;
}
.audio-play-btn:hover { background: var(--accent-hover); transform: scale(1.07); }
.audio-time { font-size: 0.72rem; color: var(--muted); font-variant-numeric: tabular-nums; min-width: 80px; }
.audio-waveform-wrap { position: relative; cursor: pointer; }
.audio-waveform { width: 100%; height: 56px; display: block; border-radius: 4px; }
.audio-progress { position: absolute; top: 0; left: 0; height: 100%; background: rgba(0,0,0,0.5); pointer-events: none; }

/* ─── YouTube embed ──────────────────────────────────────────────────────── */
.yt-embed { position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden; border-radius: var(--radius-lg); background: #000; }
.yt-embed iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: 0; }

/* ─── Video player ───────────────────────────────────────────────────────── */
.video-player { border-radius: var(--radius-lg); overflow: hidden; background: #000; }
.video-player video { width: 100%; display: block; }

/* ─── Photo gallery ──────────────────────────────────────────────────────── */
.photo-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 0.75rem; }
.photo-gallery img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: var(--radius); cursor: pointer; transition: transform var(--transition); }
.photo-gallery img:hover { transform: scale(1.03); }

/* ─── Lightbox ───────────────────────────────────────────────────────────── */
.lightbox { display: none; position: fixed; inset: 0; z-index: 1000; background: rgba(0,0,0,0.92); align-items: center; justify-content: center; }
.lightbox.open { display: flex; }
.lightbox img { max-width: 90vw; max-height: 90vh; border-radius: var(--radius-lg); box-shadow: var(--shadow); }
.lightbox-close { position: absolute; top: 1.5rem; right: 1.5rem; background: none; border: none; color: #fff; font-size: 2rem; cursor: pointer; opacity: 0.6; }
.lightbox-close:hover { opacity: 1; }

/* ─── Rich text ──────────────────────────────────────────────────────────── */
.rich-text { line-height: 1.75; font-size: 1.05rem; }
.rich-text h1,.rich-text h2,.rich-text h3 { font-weight: 800; letter-spacing: -0.02em; line-height: 1.2; margin: 2rem 0 0.75rem; }
.rich-text h1 { font-size: 2rem; }
.rich-text h2 { font-size: 1.5rem; }
.rich-text h3 { font-size: 1.2rem; }
.rich-text p { margin-bottom: 1.2rem; }
.rich-text a { color: var(--accent); }
.rich-text strong { font-weight: 700; color: var(--text); }
.rich-text blockquote {
  border-left: 3px solid var(--accent); padding: 0.75rem 1.25rem;
  margin: 1.5rem 0; background: var(--accent-dim);
  border-radius: 0 var(--radius) var(--radius) 0; color: var(--muted); font-style: italic;
}
.rich-text img { border-radius: var(--radius); margin: 1.5rem 0; }
.rich-text ul,.rich-text ol { padding-left: 1.5rem; margin-bottom: 1rem; }
.rich-text li { margin-bottom: 0.4rem; }
.rich-text hr { border: none; border-top: 1px solid var(--border); margin: 2rem 0; }
.rich-text pre { background: #0d0d0d; border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem; overflow-x: auto; font-size: 0.875rem; margin-bottom: 1rem; }
.rich-text code { background: rgba(255,255,255,0.06); border-radius: 4px; padding: 0.15rem 0.35rem; font-size: 0.875em; }

/* ─── Comments ───────────────────────────────────────────────────────────── */
.comments-section { border-top: 1px solid var(--border); padding-top: 2.5rem; margin-top: 3rem; }
.comment { background: var(--card-bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem 1.25rem; margin-bottom: 1rem; }
.comment-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.4rem; }
.comment-author { font-weight: 700; font-size: 0.9rem; }
.comment-date { font-size: 0.72rem; color: var(--muted); }
.comment-body { color: var(--muted); font-size: 0.9rem; line-height: 1.6; }
.comment-form { margin-top: 2rem; background: var(--card-bg); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 1.5rem; }
.comment-form h3 { font-size: 1rem; font-weight: 700; margin-bottom: 1rem; }

/* ─── Tags ───────────────────────────────────────────────────────────────── */
.tags { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.5rem; }
.tag { background: var(--accent-dim); color: var(--accent); font-size: 0.72rem; font-weight: 600; padding: 0.2rem 0.6rem; border-radius: 4px; }

/* ─── Divider ────────────────────────────────────────────────────────────── */
.divider { height: 1px; background: var(--border); margin: 2rem 0; }

/* ─── Toast ──────────────────────────────────────────────────────────────── */
.toast {
  position: fixed; bottom: 2rem; right: 2rem; z-index: 500;
  background: var(--card-bg); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 0.875rem 1.25rem;
  font-size: 0.875rem; box-shadow: var(--shadow);
  animation: slideInToast 0.25s ease;
}
.toast.success { border-color: var(--success); color: var(--success); }
.toast.error   { border-color: var(--danger);  color: var(--danger); }
@keyframes slideInToast { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

/* ─── Filter bar ─────────────────────────────────────────────────────────── */
.filter-bar { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 2rem; }
.filter-btn { background: var(--card-bg); border: 1px solid var(--border); color: var(--muted); padding: 0.4rem 0.875rem; border-radius: 20px; font-size: 0.8rem; font-weight: 600; cursor: pointer; transition: all var(--transition); }
.filter-btn:hover { border-color: var(--accent); color: var(--accent); }
.filter-btn.active { background: var(--accent); border-color: var(--accent); color: #000; }

/* ─── Empty state ────────────────────────────────────────────────────────── */
.empty-state { text-align: center; padding: 5rem 2rem; color: var(--muted); }
.empty-icon { font-size: 3rem; margin-bottom: 1rem; opacity: 0.35; }
.empty-title { font-size: 1.25rem; font-weight: 700; color: var(--text); margin-bottom: 0.5rem; }

/* ─── Post detail ────────────────────────────────────────────────────────── */
.post-header { padding: 3rem 0 2rem; }
.post-title { font-size: clamp(2rem, 5vw, 3.5rem); font-weight: 900; letter-spacing: -0.03em; line-height: 1.1; margin-bottom: 1rem; }
.post-meta { font-size: 0.85rem; color: var(--muted); display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.post-cover { width: 100%; aspect-ratio: 21/9; object-fit: cover; border-radius: var(--radius-lg); margin-bottom: 2.5rem; }
.post-media-section { margin: 2rem 0; }
.post-media-section + .post-media-section { margin-top: 3rem; }
.media-section-label { font-size: 0.7rem; font-weight: 700; letter-spacing: 0.15em; text-transform: uppercase; color: var(--muted); margin-bottom: 0.75rem; }

/* ─── Marquee strip ──────────────────────────────────────────────────────── */
.marquee-strip {
  background: var(--accent); color: #000;
  overflow: hidden; padding: 0.6rem 0; font-size: 0.8rem; font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase;
}
.marquee-inner { display: flex; white-space: nowrap; animation: marquee 30s linear infinite; }
.marquee-item { padding: 0 2rem; }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ─── Feature strip ──────────────────────────────────────────────────────── */
.feature-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; margin: 2rem 0; }
.feature-item { background: var(--card-bg); padding: 1.5rem; text-align: center; }
.feature-icon { font-size: 1.75rem; margin-bottom: 0.5rem; }
.feature-label { font-size: 0.8rem; font-weight: 600; color: var(--muted); }
.feature-value { font-size: 1.5rem; font-weight: 900; color: var(--text); }

/* ─── Footer ─────────────────────────────────────────────────────────────── */
footer {
  background: #050505; border-top: 1px solid var(--border);
  padding: 2.5rem 1.5rem; text-align: center; color: var(--muted); font-size: 0.85rem;
}
footer a { color: var(--muted); }
footer a:hover { color: var(--accent); }
.footer-inner { max-width: 1280px; margin: 0 auto; }
.footer-logo { font-size: 1.25rem; font-weight: 900; color: var(--text); margin-bottom: 0.75rem; }
.footer-logo .accent { color: var(--accent); }

/* ─── Utility ────────────────────────────────────────────────────────────── */
.text-accent { color: var(--accent); }
.text-muted  { color: var(--muted); }
.text-center { text-align: center; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.mt-auto { margin-top: auto; }
.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.hidden { display: none !important; }
