@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Outfit:wght@600;700;800&display=swap');

:root {
  /* Premium Dark Palette */
  --bg: #030305;
  --surface: rgba(18, 18, 23, 0.6);
  --border: rgba(255, 255, 255, 0.06);
  --text: #ffffff;
  --text-muted: #a1a1aa;
  --text-dim: #71717a;
  
  /* Accents */
  --accent: #6d28d9;
  --accent2: #c084fc;
  --green: #22c55e;
  --red: #ef4444;
  
  /* Layout */
  --sidebar-w: 260px;
  --transition: all 0.2s ease;
}

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

body {
  font-family: 'Inter', system-ui, sans-serif;
  background-color: var(--bg);
  color: var(--text);
  overflow-x: hidden;
  background-image: radial-gradient(circle at 0% 0%, rgba(109, 40, 217, 0.1), transparent 50%);
}

.hidden { display: none !important; }

/* ─── APP WRAPPER ─── */
.app-wrapper {
  display: flex;
  min-height: 100vh;
  width: 100vw;
}

/* ─── SIDEBAR ─── */
.sidebar {
  width: var(--sidebar-w);
  background: rgba(10, 10, 12, 0.95);
  backdrop-filter: blur(20px);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  height: 100vh;
  position: sticky;
  top: 0;
  z-index: 999;
}

.sidebar-header { padding: 32px 24px; }
.sidebar-logo { display: flex; align-items: center; gap: 12px; font-weight: 800; font-family: 'Outfit'; font-size: 20px; }

.nav-item {
  display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: 8px;
  color: var(--text-muted); font-size: 14px; margin: 2px 12px; cursor: pointer; transition: var(--transition);
}
.nav-item:hover { color: #fff; background: rgba(255,255,255,0.05); }
.nav-item.active { color: #fff; background: rgba(168, 85, 247, 0.1); border: 1px solid rgba(168, 85, 247, 0.2); }
.nav-item svg { width: 18px; height: 18px; }

/* ─── MAIN CONTAINER ─── */
.main-view {
  flex: 1;
  display: block; /* Important: don't use flex here to avoid layout collapses */
  min-width: 0;
}

/* ─── LANDING VIEW ─── */
#view-landing {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  width: 100%;
}

.setup-card {
  width: 100%;
  max-width: 440px;
  background: var(--surface);
  backdrop-filter: blur(40px);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 40px;
  margin: 20px;
}

.setup-logo h1 { font-family: 'Outfit'; font-size: 32px; background: linear-gradient(135deg, #fff, #a855f7); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }

/* ─── APP VIEW (DASHBOARD) ─── */
#view-app {
  width: 100%;
}

.app-header {
  padding: 24px 40px;
  border-bottom: 1px solid var(--border);
  background: rgba(3, 3, 5, 0.8);
  backdrop-filter: blur(20px);
  position: sticky;
  top: 0;
  z-index: 100;
}

.view-content {
  padding: 40px;
  max-width: 1400px;
  margin: 0 auto;
}

/* ─── DASHBOARD GRID ─── */
.grid-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 32px;
  margin-top: 32px;
}

@media (max-width: 1100px) {
  .grid-layout { grid-template-columns: 1fr; }
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
}

/* ─── TABLES ─── */
.video-table { width: 100%; border-collapse: collapse; text-align: left; }
.video-table th { padding: 12px 16px; font-size: 11px; color: var(--text-dim); text-transform: uppercase; border-bottom: 1px solid var(--border); }
.video-table td { padding: 16px; border-bottom: 1px solid var(--border); font-size: 14px; }

/* ─── STATS PILLS ─── */
.stat-pill {
  display: inline-flex; align-items: center; gap: 8px; background: rgba(255,255,255,0.04);
  padding: 8px 16px; border-radius: 30px; border: 1px solid var(--border); font-size: 13px; font-weight: 600;
}

/* ─── UTILS ─── */
.btn-primary {
  width: 100%; background: #fff; color: #000; border: none; padding: 14px; border-radius: 10px;
  font-weight: 700; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 10px;
}

input {
  width: 100%; background: rgba(0,0,0,0.3); border: 1px solid var(--border);
  padding: 14px; border-radius: 10px; color: #fff; margin-bottom: 20px; font-family: inherit;
}

.seo-pill { padding: 4px 10px; border-radius: 6px; font-weight: 800; font-size: 11px; }
.seo-great { background: rgba(34, 197, 94, 0.15); color: #86efac; }
.seo-good { background: rgba(245, 158, 11, 0.15); color: #fcd34d; }
.seo-low { background: rgba(239, 68, 68, 0.15); color: #fca5a5; }

/* Modal */
.report-modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.9); backdrop-filter: blur(10px);
  display: none; align-items: center; justify-content: center; z-index: 2000;
}
.report-modal-overlay.active { display: flex; }
.report-modal-content {
  background: #0a0a0c; border: 1px solid var(--border); border-radius: 24px;
  width: 90%; max-width: 800px; max-height: 85vh; overflow-y: auto; padding: 40px;
}

/* Channel Hero */
.channel-hero {
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.1), rgba(0,0,0,0));
  border: 1px solid var(--border); border-radius: 20px; padding: 32px; display: flex; gap: 32px; align-items: center;
}
.channel-avatar { width: 80px; height: 80px; border-radius: 50%; border: 3px solid var(--border); }
