/* ============================================
   DJ GHOST FM — style.css
   Dark neon aesthetic, mobile-first
   ============================================ */

:root {
  --bg: #0a0a0f;
  --bg-card: #12121a;
  --bg-elevated: #1a1a28;
  --bg-input: #16161f;
  --purple: #a855f7;
  --purple-dim: #7c3aed;
  --blue: #3b82f6;
  --cyan: #06b6d4;
  --pink: #ec4899;
  --green: #22c55e;
  --red: #ef4444;
  --text: #e2e8f0;
  --text-dim: #64748b;
  --text-muted: #475569;
  --border: #1e1e2e;
  --glow-purple: 0 0 20px rgba(168, 85, 247, 0.3);
  --glow-blue: 0 0 20px rgba(59, 130, 246, 0.3);
  --radius: 12px;
  --radius-sm: 8px;
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

/* Ambient background glows */
.ambient-glow {
  position: fixed;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.15;
  pointer-events: none;
  z-index: 0;
}
.glow-1 {
  width: 600px; height: 600px;
  background: var(--purple);
  top: -200px; left: -200px;
  animation: drift 20s ease-in-out infinite alternate;
}
.glow-2 {
  width: 500px; height: 500px;
  background: var(--blue);
  bottom: -150px; right: -150px;
  animation: drift 25s ease-in-out infinite alternate-reverse;
}
.glow-3 {
  width: 400px; height: 400px;
  background: var(--pink);
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  animation: drift 30s ease-in-out infinite alternate;
  opacity: 0.07;
}

@keyframes drift {
  0% { transform: translate(0, 0); }
  100% { transform: translate(40px, -30px); }
}

/* ---- NAV ---- */
.nav {
  position: sticky; top: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 20px;
  background: rgba(10, 10, 15, 0.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}
.nav-brand {
  display: flex; align-items: center; gap: 8px;
  font-weight: 800; font-size: 1.2rem; letter-spacing: -0.02em;
}
.ghost-icon { font-size: 1.4rem; }
.brand-accent { color: var(--purple); }
.nav-live {
  display: flex; align-items: center; gap: 6px;
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.3);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.75rem; font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--red);
}
.live-dot {
  width: 8px; height: 8px;
  background: var(--red);
  border-radius: 50%;
  display: inline-block;
  animation: pulse-dot 1.5s ease-in-out infinite;
}
@keyframes pulse-dot {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.6); }
  50% { opacity: 0.7; box-shadow: 0 0 0 6px rgba(239, 68, 68, 0); }
}
.live-text { color: var(--red); }

/* ---- HERO TAGLINE ---- */
.hero-tagline {
  text-align: center;
  padding: 32px 16px 8px;
  position: relative;
  z-index: 1;
}
.hero-tagline h1 {
  font-size: 1.4rem;
  font-weight: 900;
  letter-spacing: -0.03em;
  text-transform: uppercase;
  background: linear-gradient(135deg, #fff 0%, var(--purple) 50%, var(--cyan) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
@media (min-width: 768px) {
  .hero-tagline h1 {
    font-size: 2.2rem;
  }
  .hero-tagline {
    padding: 40px 24px 12px;
  }
}

/* ---- MAIN LAYOUT ---- */
.main-layout {
  position: relative; z-index: 1;
  max-width: 1400px;
  margin: 0 auto;
  padding: 16px;
}

.stream-section {
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: auto auto;
  gap: 16px;
}

/* ---- STREAM PLAYER ---- */
.stream-container { min-width: 0; }
.stream-player {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  background: var(--bg-card);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
}
.stream-placeholder {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #0d0d18 0%, #151525 50%, #0d0d18 100%);
}
.placeholder-content {
  text-align: center;
}
.placeholder-ghost {
  font-size: 4rem;
  animation: float 3s ease-in-out infinite;
  margin-bottom: 12px;
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}
.placeholder-bars {
  display: flex; gap: 4px; justify-content: center;
  margin-bottom: 16px; height: 32px; align-items: flex-end;
}
.placeholder-bars span {
  width: 4px;
  background: var(--purple);
  border-radius: 2px;
  animation: bar-bounce 1.2s ease-in-out infinite;
}
.placeholder-bars span:nth-child(1) { height: 12px; animation-delay: 0s; }
.placeholder-bars span:nth-child(2) { height: 20px; animation-delay: 0.15s; }
.placeholder-bars span:nth-child(3) { height: 28px; animation-delay: 0.3s; }
.placeholder-bars span:nth-child(4) { height: 16px; animation-delay: 0.45s; }
.placeholder-bars span:nth-child(5) { height: 24px; animation-delay: 0.6s; }
@keyframes bar-bounce {
  0%, 100% { transform: scaleY(1); }
  50% { transform: scaleY(0.4); }
}
.placeholder-content h2 {
  font-size: 1.5rem; font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 4px;
}
.placeholder-content p {
  color: var(--text-dim); font-size: 0.9rem;
  margin-bottom: 16px;
}
.placeholder-badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.3);
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 0.8rem; font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--red);
}

.stream-info { padding: 12px 0 0; }
.stream-meta {
  display: flex; align-items: center; gap: 10px;
  flex-wrap: wrap;
}
.viewer-count {
  display: flex; align-items: center; gap: 5px;
  color: var(--text-dim); font-size: 0.85rem;
}
.stream-tag {
  font-size: 0.7rem; font-weight: 600;
  padding: 3px 10px;
  border-radius: 20px;
  background: var(--bg-elevated);
  color: var(--text-dim);
  border: 1px solid var(--border);
  letter-spacing: 0.02em;
}

/* ---- CHAT ---- */
.chat-section {
  min-width: 0;
  max-height: 500px;
}
.chat-container {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: flex; flex-direction: column;
  height: 100%;
  max-height: 500px;
  overflow: hidden;
}
.chat-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.chat-header h3 {
  font-size: 0.95rem; font-weight: 700;
}
.chat-online {
  display: flex; align-items: center; gap: 6px;
  font-size: 0.75rem; color: var(--text-dim);
}
.online-dot {
  width: 6px; height: 6px;
  background: var(--green);
  border-radius: 50%;
  display: inline-block;
}

.chat-messages {
  flex: 1; overflow-y: auto;
  min-height: 0;
  padding: 12px 16px;
  display: flex; flex-direction: column; gap: 10px;
  scroll-behavior: smooth;
}
.chat-messages::-webkit-scrollbar { width: 4px; }
.chat-messages::-webkit-scrollbar-track { background: transparent; }
.chat-messages::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }

/* Chat message */
.chat-msg {
  display: flex; gap: 10px;
  animation: msg-in 0.3s ease-out;
}
@keyframes msg-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
.msg-avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--bg-elevated);
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
  border: 1px solid var(--border);
}
.msg-body { min-width: 0; flex: 1; }
.msg-header {
  display: flex; align-items: center; gap: 6px;
  margin-bottom: 3px;
}
.msg-name {
  font-size: 0.82rem; font-weight: 700;
  color: var(--text);
}
.msg-badge {
  font-size: 0.6rem; font-weight: 700;
  padding: 1px 6px;
  border-radius: 4px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.badge-bot {
  background: rgba(168, 85, 247, 0.2);
  color: var(--purple);
  border: 1px solid rgba(168, 85, 247, 0.3);
}
.badge-human {
  background: rgba(59, 130, 246, 0.2);
  color: var(--blue);
  border: 1px solid rgba(59, 130, 246, 0.3);
}
.badge-mod {
  background: rgba(234, 179, 8, 0.2);
  color: #eab308;
  border: 1px solid rgba(234, 179, 8, 0.3);
}
.msg-time {
  font-size: 0.65rem; color: var(--text-muted);
  margin-left: auto;
}
.msg-text {
  font-size: 0.85rem; line-height: 1.5;
  color: var(--text);
  word-break: break-word;
}

/* Chat input */
.chat-input-area {
  border-top: 1px solid var(--border);
  padding: 12px 16px;
  flex-shrink: 0;
}
.chat-login-prompt {
  text-align: center;
  padding: 4px 0;
}
.chat-login-prompt p {
  font-size: 0.8rem; color: var(--text-dim);
  margin-bottom: 8px;
}
.btn-neon {
  background: linear-gradient(135deg, var(--purple), var(--blue));
  color: #fff;
  border: none;
  padding: 10px 24px;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  letter-spacing: 0.02em;
}
.btn-neon:hover {
  box-shadow: var(--glow-purple);
  transform: translateY(-1px);
}
.btn-full { width: 100%; }

.chat-input-row {
  display: flex; align-items: center; gap: 8px;
}
.chat-user-badge {
  font-size: 0.75rem; font-weight: 700;
  color: var(--purple);
  white-space: nowrap;
}
#chatInput {
  flex: 1;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  padding: 10px 14px;
  font-family: inherit;
  font-size: 0.85rem;
  outline: none;
  transition: border-color 0.2s;
}
#chatInput:focus {
  border-color: var(--purple);
}
#chatInput::placeholder { color: var(--text-muted); }
.btn-send {
  background: var(--purple);
  border: none;
  width: 38px; height: 38px;
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  color: #fff;
  transition: all 0.2s;
  flex-shrink: 0;
}
.btn-send:hover {
  background: var(--purple-dim);
  box-shadow: var(--glow-purple);
}

/* ---- GHOST'S MIND ---- */
.ghost-mind {
  position: relative; z-index: 1;
  max-width: 1400px;
  margin: 0 auto;
  padding: 48px 16px 32px;
  clear: both;
}
.section-header {
  margin-bottom: 24px;
}
.section-header h2 {
  font-size: 1.5rem; font-weight: 800;
  letter-spacing: -0.02em;
}
.section-sub {
  color: var(--text-dim); font-size: 0.9rem;
  margin-top: 4px;
}
.mind-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
  position: relative;
  overflow: hidden;
}
.mind-card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--purple), var(--cyan));
}
.mind-mood {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 16px;
}
.mind-mood-label {
  font-size: 0.75rem; font-weight: 600;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.mind-mood-value {
  font-size: 1rem; font-weight: 800;
  padding: 4px 14px;
  border-radius: 20px;
  background: rgba(168, 85, 247, 0.2);
  color: var(--purple);
  border: 1px solid rgba(168, 85, 247, 0.3);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.mind-vibe {
  font-size: 1.15rem; font-weight: 600;
  color: var(--text);
  margin-bottom: 16px;
  line-height: 1.5;
}
.mind-themes {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin-bottom: 20px;
}
.mind-theme-tag {
  font-size: 0.75rem; font-weight: 600;
  padding: 4px 12px;
  border-radius: 20px;
  background: var(--bg-elevated);
  color: var(--text-dim);
  border: 1px solid var(--border);
}
.mind-script {
  margin-bottom: 16px;
}
.mind-script-label {
  font-size: 0.8rem; font-weight: 700;
  color: var(--text-dim);
  margin-bottom: 8px;
}
.mind-quote {
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text);
  border-left: 3px solid var(--purple);
  padding-left: 16px;
  margin: 0;
  font-style: italic;
}
.mind-timestamp {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-align: right;
}

/* ---- MODAL ---- */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  display: flex; align-items: center; justify-content: center;
  z-index: 1000;
  padding: 20px;
}
.modal {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  width: 100%;
  max-width: 420px;
  position: relative;
}
.modal-close {
  position: absolute; top: 12px; right: 16px;
  background: none; border: none;
  color: var(--text-dim);
  font-size: 1.5rem;
  cursor: pointer;
  line-height: 1;
}
.modal-close:hover { color: var(--text); }
.modal h2 {
  font-size: 1.3rem; font-weight: 800;
  margin-bottom: 4px;
}
.modal-sub {
  color: var(--text-dim); font-size: 0.85rem;
  margin-bottom: 24px;
}
.form-group {
  margin-bottom: 16px;
}
.form-group label {
  display: block;
  font-size: 0.8rem; font-weight: 600;
  color: var(--text-dim);
  margin-bottom: 6px;
}
.optional { color: var(--text-muted); font-weight: 400; }
.form-group input {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  padding: 10px 14px;
  font-family: inherit;
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.2s;
}
.form-group input:focus {
  border-color: var(--purple);
}
.form-group input::placeholder { color: var(--text-muted); }
.modal-footer {
  margin-top: 16px; text-align: center;
}
.modal-footer p {
  font-size: 0.8rem; color: var(--text-dim);
}
.modal-footer a {
  color: var(--purple);
  text-decoration: none;
}
.modal-footer a:hover { text-decoration: underline; }

/* ---- TOP COMMENTS ---- */
.top-comments {
  position: relative; z-index: 1;
  max-width: 1400px;
  margin: 0 auto;
  padding: 32px 16px;
}
.comments-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}
.comment-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  position: relative;
  overflow: hidden;
  transition: border-color 0.2s, transform 0.2s;
}
.comment-card:hover {
  border-color: rgba(168, 85, 247, 0.3);
  transform: translateY(-2px);
}
.comment-card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--purple), var(--blue));
  opacity: 0;
  transition: opacity 0.2s;
}
.comment-card:hover::before { opacity: 1; }
.comment-top {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 10px;
}
.comment-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--bg-elevated);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem;
  border: 1px solid var(--border);
}
.comment-name { font-weight: 700; font-size: 0.9rem; }
.comment-fire { margin-left: auto; font-size: 1.2rem; }
.comment-text { font-size: 0.95rem; line-height: 1.6; color: var(--text); }

@media (min-width: 768px) {
  .comments-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
  .comments-grid { grid-template-columns: repeat(3, 1fr); }
}

/* ---- AI DISCLOSURE ---- */
.ai-disclosure {
  position: relative; z-index: 1;
  max-width: 720px;
  margin: 0 auto;
  padding: 48px 16px 32px;
}
.disclosure-content {
  text-align: center;
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.08), rgba(6, 182, 212, 0.08));
  border: 1px solid rgba(168, 85, 247, 0.2);
  border-radius: var(--radius);
  padding: 32px 28px;
}
.disclosure-icon {
  font-size: 2rem;
  margin-bottom: 12px;
}
.disclosure-content h3 {
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
  background: linear-gradient(135deg, #fff, var(--purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.disclosure-content p {
  font-size: 0.9rem;
  line-height: 1.7;
  color: var(--text-dim);
}

/* ---- FOOTER ---- */
.footer {
  position: relative; z-index: 1;
  border-top: 1px solid var(--border);
  margin-top: 32px;
}
.footer-content {
  max-width: 1400px;
  margin: 0 auto;
  padding: 32px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  text-align: center;
}
.footer-brand {
  font-weight: 800; font-size: 1.1rem;
  display: flex; align-items: center; gap: 8px;
}
.footer-links {
  display: flex; gap: 20px;
}
.footer-links a {
  color: var(--text-dim);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  transition: color 0.2s;
}
.footer-links a:hover { color: var(--purple); }
.footer-powered {
  font-size: 0.8rem; color: var(--text-muted);
}
.footer-powered a {
  color: var(--purple);
  text-decoration: none;
  font-weight: 600;
}
.footer-powered a:hover { text-decoration: underline; }

/* ---- UTILITY ---- */
.hidden { display: none !important; }

/* ---- DESKTOP (768px+) ---- */
@media (min-width: 768px) {
  .main-layout { padding: 24px; }

  .stream-section {
    grid-template-columns: 1fr 380px;
    grid-template-rows: auto;
  }

  .chat-container {
    height: auto;
    max-height: none;
  }

  .ghost-mind { padding: 64px 24px 48px; }

  .placeholder-ghost { font-size: 5rem; }
  .placeholder-content h2 { font-size: 2rem; }
}
