/* ============================================================================
   NEXUS AUDIO — GLOBAL DESIGN SYSTEM
   Deep Purple #7b2ff7 | Cyan #00f0ff | Void Black #0a0a0f
   Glassmorphism, particle backgrounds, fluid animations
   ============================================================================ */

:root {
  --primary: #7b2ff7;
  --primary-dim: rgba(123, 47, 247, 0.3);
  --primary-glow: rgba(123, 47, 247, 0.6);
  --secondary: #00f0ff;
  --magenta: #ff007f;
  --success: #00ff88;
  --error: #ff4d4d;
  --bg-void: #0a0a0f;
  --bg-card: rgba(20, 20, 30, 0.80);
  --bg-sidebar: #0d0d16;
  --text-primary: #e0e0e0;
  --text-secondary: #8899aa;
  --border-subtle: rgba(123, 47, 247, 0.25);
  --border-hover: rgba(123, 47, 247, 0.7);
  --radius: 14px;
  --radius-sm: 10px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
  font-family: 'Inter', -apple-system, sans-serif;
  background: var(--bg-void);
  color: var(--text-primary);
  display: flex;
  height: 100vh;
  overflow: hidden;
}

h1, h2, h3 { font-family: 'Space Grotesk', sans-serif; }

::selection { background: var(--primary); color: white; }

/* ===== PARTICLES ===== */
.particles { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.particle {
  position: absolute;
  width: 3px; height: 3px;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 6px var(--primary), 0 0 12px var(--primary-dim);
  animation: particleFloat linear infinite;
  opacity: 0;
}
.particle:nth-child(odd) { background: var(--secondary); box-shadow: 0 0 6px var(--secondary); }
.particle:nth-child(3n) { width: 2px; height: 2px; }

@keyframes particleFloat {
  0% { transform: translateY(0) translateX(0); opacity: 0; }
  10% { opacity: 0.8; }
  90% { opacity: 0.6; }
  100% { transform: translateY(-100vh) translateX(30px); opacity: 0; }
}

/* ===== SIDEBAR ===== */
.sidebar {
  width: 240px;
  min-width: 240px;
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border-subtle);
  box-shadow: inset -4px 0 25px rgba(123, 47, 247, 0.08);
  display: flex;
  flex-direction: column;
  padding: 1.5rem;
  z-index: 100;
  position: relative;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 2.5rem;
  padding: 0 0.5rem;
}
.logo-icon { font-size: 1.8rem; }
.logo-text {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.6rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--secondary), var(--primary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: 2px;
}

.nav-links { list-style: none; flex: 1; }
.nav-links li { margin-bottom: 0.5rem; }
.nav-links a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  transition: var(--transition);
  border: 1px solid transparent;
}
.nav-links a svg { opacity: 0.6; transition: var(--transition); }
.nav-links a:hover {
  color: white;
  background: rgba(123, 47, 247, 0.15);
  transform: translateX(6px);
  border-color: var(--border-subtle);
}
.nav-links a:hover svg { opacity: 1; }
.nav-links a.active {
  color: white;
  background: rgba(123, 47, 247, 0.25);
  border-color: var(--primary-dim);
  box-shadow: 0 0 15px rgba(123, 47, 247, 0.2);
}
.nav-links a.active svg { opacity: 1; color: var(--secondary); }

.sidebar-footer { padding: 0.5rem; }
.sidebar-version { color: var(--text-secondary); font-size: 0.75rem; text-align: center; }

/* ===== MOBILE NAV ===== */
.mobile-nav-toggle {
  display: none;
  position: fixed;
  top: 15px; left: 15px;
  z-index: 200;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 10px;
  cursor: pointer;
  flex-direction: column;
  gap: 4px;
}
.mobile-nav-toggle span {
  display: block; width: 22px; height: 2px;
  background: var(--text-primary);
  transition: var(--transition);
}

@media (max-width: 768px) {
  .mobile-nav-toggle { display: flex; }
  .sidebar {
    position: fixed;
    left: -260px;
    top: 0; bottom: 0;
    transition: left 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 4px 0 30px rgba(0,0,0,0.5);
  }
  .sidebar.open { left: 0; }
  .content { margin-left: 0 !important; }
}

/* ===== MAIN CONTENT ===== */
.content {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 2.5rem;
  position: relative;
  z-index: 1;
}

.tab-panel {
  display: none;
  animation: fadeSlideIn 0.45s ease forwards;
}
.active-panel { display: block; }

@keyframes fadeSlideIn {
  from { opacity: 0; transform: translateY(15px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ===== PAGE HEADERS ===== */
.page-header { margin-bottom: 2rem; }
.page-header h1 {
  font-size: 2rem;
  background: linear-gradient(135deg, #fff, var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.subtitle { color: var(--text-secondary); margin-top: 0.5rem; font-size: 1rem; }

/* ===== GLASS CARDS ===== */
.glass-card {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: var(--transition);
}
.glass-card:hover { border-color: var(--border-hover); }

/* ===== INPUTS & BUTTONS ===== */
.hero-card { margin-bottom: 2rem; }
.hero-input-group { display: flex; gap: 12px; }

input[type="text"], .form-input {
  flex: 1;
  padding: 14px 18px;
  background: rgba(10, 10, 15, 0.8);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: white;
  font-size: 1rem;
  font-family: 'Inter', sans-serif;
  outline: none;
  transition: var(--transition);
}
input[type="text"]:focus, .form-input:focus {
  border-color: var(--secondary);
  box-shadow: 0 0 10px rgba(0, 240, 255, 0.15);
}
.form-textarea {
  width: 100%;
  min-height: 100px;
  padding: 14px 18px;
  background: rgba(10, 10, 15, 0.8);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: white;
  font-size: 1rem;
  font-family: 'Inter', sans-serif;
  outline: none;
  resize: vertical;
  transition: var(--transition);
}

.btn-primary {
  padding: 14px 28px;
  border: none;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--primary), var(--magenta));
  color: white;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(255, 0, 127, 0.4);
}
.btn-primary:active { transform: translateY(0); }

.btn-secondary {
  padding: 10px 20px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-primary);
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  cursor: pointer;
  transition: var(--transition);
}
.btn-secondary:hover { border-color: var(--primary); color: white; }

.source-dropdown {
  padding: 10px 14px;
  background: rgba(10, 10, 15, 0.9);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: white;
  font-family: 'Inter', sans-serif;
  outline: none;
  cursor: pointer;
}

/* ===== EQUALIZER ===== */
.equalizer {
  display: flex;
  gap: 4px;
  height: 35px;
  align-items: flex-end;
  margin: 1.5rem 0;
  opacity: 0;
  transition: opacity 0.3s;
}
.equalizer.active { opacity: 1; }
.equalizer .bar {
  width: 6px;
  border-radius: 3px;
  background: linear-gradient(to top, var(--primary), var(--secondary));
  animation: eq 0.5s ease infinite alternate;
  height: 8px;
}
.equalizer.active .bar { animation-play-state: running; }
.bar:nth-child(2) { animation-delay: 0.08s; }
.bar:nth-child(3) { animation-delay: 0.16s; }
.bar:nth-child(4) { animation-delay: 0.24s; }
.bar:nth-child(5) { animation-delay: 0.32s; }
.bar:nth-child(6) { animation-delay: 0.40s; }
.bar:nth-child(7) { animation-delay: 0.48s; }
.bar:nth-child(8) { animation-delay: 0.56s; }
@keyframes eq { 0% { height: 6px; } 100% { height: 35px; } }

/* ===== STATUS MESSAGES ===== */
.status-message { margin-top: 1rem; font-size: 0.95rem; }
.status-message .info { color: var(--secondary); }
.status-message .success { color: var(--success); }
.status-message .error { color: var(--error); }
.download-link {
  display: inline-block;
  margin-top: 8px;
  padding: 10px 22px;
  background: linear-gradient(135deg, var(--primary), var(--magenta));
  color: white;
  text-decoration: none;
  border-radius: var(--radius-sm);
  font-weight: 600;
  transition: var(--transition);
}
.download-link:hover { transform: translateY(-2px); box-shadow: 0 4px 15px rgba(123, 47, 247, 0.4); }

/* ===== FEATURES GRID ===== */
.features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1.5rem; }
.feature-card { text-align: center; padding: 2rem 1.5rem; }
.feature-icon { font-size: 2.5rem; margin-bottom: 1rem; }
.feature-card h3 { color: var(--secondary); margin-bottom: 0.5rem; font-size: 1.1rem; }
.feature-card p { color: var(--text-secondary); font-size: 0.9rem; line-height: 1.5; }

/* ===== MOVIES ===== */
.movie-player { margin-top: 1.5rem; }
.player-controls { display: flex; gap: 12px; align-items: center; margin-bottom: 1rem; }
#movie-iframe {
  width: 100%;
  height: 500px;
  border: none;
  border-radius: var(--radius-sm);
  background: #000;
}

/* ===== FORUMS ===== */
.forum-toolbar { display: flex; gap: 12px; align-items: center; margin-bottom: 1.5rem; }
.new-post-form { flex-direction: column; gap: 12px; margin-bottom: 1.5rem; }
.forum-post { margin-bottom: 1rem; cursor: pointer; }
.forum-post:hover { border-color: var(--primary); }
.post-meta { display: flex; gap: 12px; align-items: center; margin-bottom: 0.5rem; flex-wrap: wrap; }
.post-cat {
  background: var(--primary-dim);
  color: var(--secondary);
  padding: 2px 10px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
}
.post-author { color: var(--text-secondary); font-size: 0.85rem; }
.post-time { color: var(--text-secondary); font-size: 0.8rem; }
.post-replies { color: var(--primary); font-size: 0.8rem; margin-left: auto; }
.post-title { font-size: 1.1rem; color: white; margin-bottom: 0.3rem; }
.post-body { color: var(--text-secondary); font-size: 0.9rem; line-height: 1.5; }

/* ===== UPDATES ===== */
.update-card { margin-bottom: 1.5rem; }
.update-version { font-family: 'Space Grotesk'; font-size: 1.3rem; color: var(--secondary); }
.update-date { color: var(--text-secondary); font-size: 0.85rem; margin-bottom: 1rem; }
.update-list { list-style: none; }
.update-list li {
  padding: 6px 0 6px 20px;
  position: relative;
  color: var(--text-secondary);
  font-size: 0.9rem;
}
.update-list li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--primary);
}

/* ===== CHAT ===== */
.chat-bubble {
  position: fixed;
  bottom: 25px; right: 25px;
  width: 56px; height: 56px;
  background: linear-gradient(135deg, var(--primary), var(--magenta));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 1000;
  box-shadow: 0 4px 20px rgba(123, 47, 247, 0.5);
  transition: var(--transition);
}
.chat-bubble:hover { transform: scale(1.1); }
.chat-badge {
  position: absolute;
  top: -2px; right: -2px;
  width: 18px; height: 18px;
  background: var(--error);
  border-radius: 50%;
  font-size: 0.7rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
}

.chat-window {
  position: fixed;
  bottom: 90px; right: 25px;
  width: 360px;
  height: 480px;
  background: var(--bg-card);
  backdrop-filter: blur(15px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  display: none;
  flex-direction: column;
  z-index: 999;
  box-shadow: 0 10px 40px rgba(0,0,0,0.6);
  overflow: hidden;
}
.chat-header {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-subtle);
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
}
.online-dot { width: 8px; height: 8px; background: var(--success); border-radius: 50%; }
.chat-close {
  margin-left: auto;
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 1.1rem;
}
.chat-messages { flex: 1; padding: 12px; overflow-y: auto; font-size: 0.88rem; }
.chat-msg { margin-bottom: 8px; line-height: 1.4; word-break: break-word; }
.chat-time { color: #555; font-size: 0.75rem; margin-right: 6px; }
.chat-input-area {
  display: flex;
  padding: 10px;
  gap: 8px;
  border-top: 1px solid var(--border-subtle);
}
.chat-input-area input {
  flex: 1;
  padding: 10px 14px;
  background: rgba(0,0,0,0.5);
  border: 1px solid var(--border-subtle);
  color: white;
  border-radius: 8px;
  outline: none;
  font-family: 'Inter', sans-serif;
}
.chat-send-btn {
  padding: 10px 14px;
  background: var(--primary);
  border: none;
  border-radius: 8px;
  color: white;
  cursor: pointer;
  font-size: 1.1rem;
  transition: var(--transition);
}
.chat-send-btn:hover { background: var(--magenta); }

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--primary-dim); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--primary); }

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .content { padding: 1.5rem; padding-top: 60px; }
  .hero-input-group { flex-direction: column; }
  .features-grid { grid-template-columns: 1fr; }
  #movie-iframe { height: 250px; }
  .chat-window { width: calc(100vw - 30px); right: 15px; bottom: 85px; height: 60vh; }
}
