/* ==========================================================================
   PremiumMod Design System — v3.0.0 TITAN
   Ultra-modern Cyber Dark & Frosted Glassmorphism Theme
   ========================================================================== */

:root {
  --bg-dark: #070a13;
  --bg-surface: #0c1222;
  --bg-card: rgba(16, 24, 44, 0.7);
  --bg-card-hover: rgba(24, 36, 66, 0.85);

  --glass: rgba(13, 20, 38, 0.65);
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-glow: rgba(99, 102, 241, 0.15);

  --primary: #6366f1;
  --primary-light: #818cf8;
  --primary-dark: #4f46e5;
  --primary-glow: rgba(99, 102, 241, 0.35);

  --accent-cyan: #06b6d4;
  --accent-pink: #ec4899;
  --accent-emerald: #10b981;
  --accent-amber: #f59e0b;
  --danger: #f43f5e;

  --text-main: #f8fafc;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;

  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.45);
  --shadow-glow: 0 0 30px rgba(99, 102, 241, 0.25);

  --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
  scroll-behavior: smooth;
  color-scheme: dark;
}

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

/* Background Ambient Lighting */
body::before {
  content: '';
  position: fixed;
  top: -15%;
  left: 20%;
  width: 60vw;
  height: 60vw;
  max-width: 800px;
  max-height: 800px;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.18) 0%, rgba(6, 182, 212, 0.08) 50%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
  filter: blur(80px);
  z-index: -1;
  animation: ambientFloat 18s ease-in-out infinite alternate;
}

body::after {
  content: '';
  position: fixed;
  bottom: -10%;
  right: 10%;
  width: 50vw;
  height: 50vw;
  max-width: 700px;
  max-height: 700px;
  background: radial-gradient(circle, rgba(236, 72, 153, 0.12) 0%, rgba(99, 102, 241, 0.06) 50%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
  filter: blur(90px);
  z-index: -1;
  animation: ambientFloat 22s ease-in-out infinite alternate-reverse;
}

@keyframes ambientFloat {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(40px, -30px) scale(1.08); }
  100% { transform: translate(-30px, 40px) scale(0.95); }
}

a {
  color: var(--primary-light);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: #fff;
}

/* Glassmorphism Classes */
.glass {
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-normal);
}

.glass:hover {
  border-color: rgba(255, 255, 255, 0.14);
}

.glass-glow {
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(99, 102, 241, 0.25);
  box-shadow: var(--shadow-glow);
}

.gradient-text {
  background: linear-gradient(135deg, #a5b4fc 0%, #6366f1 40%, #06b6d4 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.gradient-text-pink {
  background: linear-gradient(135deg, #f472b6 0%, #ec4899 50%, #8b5cf6 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Navigation */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  border-bottom: 1px solid var(--glass-border);
  background: rgba(7, 10, 19, 0.85);
  backdrop-filter: blur(16px);
}

.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0.9rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-size: 1.35rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.5px;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.logo span {
  color: var(--primary-light);
}

.nav-desktop {
  display: flex;
  align-items: center;
  gap: 1.75rem;
}

.nav-desktop a {
  color: var(--text-secondary);
  font-size: 0.92rem;
  font-weight: 500;
  transition: color var(--transition-fast);
}

.nav-desktop a:hover {
  color: #fff;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0.4rem;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-main);
  border-radius: 2px;
  transition: 0.3s;
}

.nav-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  padding: 1.5rem;
  flex-direction: column;
  gap: 1rem;
  background: rgba(12, 18, 34, 0.98);
  border-bottom: 1px solid var(--glass-border);
}

.nav-menu.open {
  display: flex;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.65rem 1.4rem;
  font-size: 0.92rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  transition: all var(--transition-normal);
  text-decoration: none !important;
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: #fff;
  box-shadow: 0 4px 14px var(--primary-glow);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.5);
  color: #fff;
}

.btn-outline {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-main);
  border: 1px solid var(--glass-border);
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
  color: #fff;
}

.btn-sm {
  padding: 0.4rem 0.85rem;
  font-size: 0.8rem;
  border-radius: var(--radius-sm);
}

/* Hero Section */
.hero {
  padding: 8.5rem 1.5rem 4rem;
  text-align: center;
  max-width: 900px;
  margin: 0 auto;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 1rem;
  border-radius: var(--radius-full);
  background: rgba(99, 102, 241, 0.12);
  border: 1px solid rgba(99, 102, 241, 0.3);
  color: #a5b4fc;
  font-size: 0.82rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  letter-spacing: 0.3px;
}

.hero h1 {
  font-size: 3.2rem;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -1.2px;
  margin-bottom: 1.25rem;
}

.hero p {
  font-size: 1.15rem;
  color: var(--text-secondary);
  max-width: 680px;
  margin: 0 auto 2.25rem;
}

.hero-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

/* Stats Section */
.stats-section {
  padding: 2.5rem 0;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
}

.stat-card {
  padding: 1.75rem 1.25rem;
  border-radius: var(--radius-lg);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--primary-light), transparent);
  opacity: 0.7;
}

.stat-card h3 {
  font-size: 2.2rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 0.3rem;
  letter-spacing: -0.5px;
}

.stat-card p {
  color: var(--text-muted);
  font-size: 0.88rem;
  font-weight: 500;
}

/* Features Grid */
.section {
  padding: 5rem 0;
}

.section h2 {
  text-align: center;
  font-size: 2.2rem;
  font-weight: 800;
  margin-bottom: 3rem;
  letter-spacing: -0.5px;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.5rem;
}

.feature-card {
  padding: 2rem;
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  transition: transform var(--transition-normal), border-color var(--transition-normal);
}

.feature-card:hover {
  transform: translateY(-4px);
  border-color: rgba(99, 102, 241, 0.3);
}

.feature-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: rgba(99, 102, 241, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.feature-card h3 {
  font-size: 1.25rem;
  font-weight: 700;
  color: #fff;
}

.feature-card p {
  color: var(--text-secondary);
  font-size: 0.92rem;
}

/* Dashboard Preview */
.dashboard-preview {
  padding: 4rem 0 6rem;
}

.preview-box {
  padding: 2.5rem;
  border-radius: var(--radius-lg);
}

.preview-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 2rem;
}

.dot-green {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent-emerald);
  box-shadow: 0 0 10px var(--accent-emerald);
}

.preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}

.preview-panel {
  background: rgba(0, 0, 0, 0.25);
  padding: 1.5rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--glass-border);
}

.preview-panel .label {
  font-size: 0.82rem;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.5px;
  margin-bottom: 1rem;
}

.log-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.log-list li {
  padding: 0.6rem 0.8rem;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.04);
  font-size: 0.85rem;
  color: var(--text-secondary);
  font-family: monospace;
}

/* ==========================================================================
   Documentation Portal Styling (Stripe / Vercel Developer Style)
   ========================================================================== */
.doc-page {
  padding-top: 5.5rem;
  display: flex;
  min-height: 100vh;
}

.doc-sidebar {
  width: 280px;
  position: fixed;
  top: 5.5rem;
  bottom: 0;
  left: 0;
  padding: 1.5rem 1.25rem 3rem;
  overflow-y: auto;
  border-right: 1px solid var(--glass-border);
  background: rgba(7, 10, 19, 0.7);
  backdrop-filter: blur(12px);
  z-index: 10;
}

.doc-sidebar-section {
  margin-bottom: 1.5rem;
}

.doc-sidebar-title {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-muted);
  margin-bottom: 0.6rem;
  padding-left: 0.5rem;
}

.doc-nav-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.6rem;
  border-radius: var(--radius-sm);
  font-size: 0.86rem;
  color: var(--text-secondary);
  font-weight: 500;
  transition: all var(--transition-fast);
}

.doc-nav-link:hover, .doc-nav-link.active {
  color: #fff;
  background: rgba(99, 102, 241, 0.12);
  border-left: 2px solid var(--primary);
}

.doc-main {
  margin-left: 280px;
  padding: 2.5rem 3rem 6rem;
  flex: 1;
  max-width: 960px;
}

.doc-card {
  padding: 1.75rem;
  border-radius: var(--radius-lg);
  margin-bottom: 2rem;
  border: 1px solid var(--glass-border);
}

.endpoint-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.badge-method {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  font-family: monospace;
}

.badge-get { background: rgba(6, 182, 212, 0.18); color: #22d3ee; border: 1px solid rgba(6, 182, 212, 0.3); }
.badge-post { background: rgba(16, 185, 129, 0.18); color: #34d399; border: 1px solid rgba(16, 185, 129, 0.3); }
.badge-patch { background: rgba(245, 158, 11, 0.18); color: #fbbf24; border: 1px solid rgba(245, 158, 11, 0.3); }
.badge-delete { background: rgba(244, 63, 94, 0.18); color: #fda4af; border: 1px solid rgba(244, 63, 94, 0.3); }

.endpoint-path {
  font-family: monospace;
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
}

.code-box {
  background: #04060c;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  margin: 1rem 0;
  overflow-x: auto;
  font-family: 'Fira Code', monospace;
  font-size: 0.84rem;
  color: #93c5fd;
  line-height: 1.5;
}

.param-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
  font-size: 0.88rem;
}

.param-table th {
  text-align: left;
  padding: 0.6rem 0.8rem;
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-muted);
  border-bottom: 1px solid var(--glass-border);
  font-weight: 600;
}

.param-table td {
  padding: 0.65rem 0.8rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  color: var(--text-secondary);
}

.param-table td code {
  color: #a5b4fc;
  font-family: monospace;
  font-weight: 600;
}

/* ==========================================================================
   Live Monitoring Tables & Search Box
   ========================================================================== */
.table-wrap {
  width: 100%;
  overflow-x: auto;
  margin-top: 1rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--glass-border);
  background: rgba(0, 0, 0, 0.25);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.86rem;
  white-space: nowrap;
}

.data-table th {
  padding: 0.75rem 1rem;
  background: rgba(16, 24, 44, 0.8);
  color: var(--text-muted);
  text-align: left;
  font-weight: 600;
  border-bottom: 1px solid var(--glass-border);
}

.data-table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  color: var(--text-secondary);
}

.data-table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

.search-input {
  width: 100%;
  max-width: 340px;
  padding: 0.55rem 1rem;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  color: #fff;
  font-size: 0.88rem;
  outline: none;
  transition: border-color var(--transition-fast);
}

.search-input:focus {
  border-color: var(--primary);
}

/* Footer */
.footer {
  padding: 3rem 0;
  border-top: 1px solid var(--glass-border);
  background: rgba(7, 10, 19, 0.95);
  text-align: center;
}

.footer p {
  color: var(--text-muted);
  font-size: 0.88rem;
  margin-bottom: 1rem;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.footer-links a {
  color: var(--text-secondary);
  font-size: 0.88rem;
}

.footer-links a:hover {
  color: #fff;
}

/* Responsive */
@media (max-width: 900px) {
  .doc-sidebar { display: none; }
  .doc-main { margin-left: 0; padding: 2rem 1.25rem 4rem; }
}

@media (max-width: 768px) {
  .nav-desktop { display: none; }
  .nav-toggle { display: flex; }
  .hero h1 { font-size: 2.2rem; }
  .hero p { font-size: 1rem; }
  .section h2 { font-size: 1.8rem; }
  .preview-box { padding: 1.5rem; }
}
