/* =========================================================================
   GOD-TIER "DARK SPACE" UI: Floating Navbar, Grid BG, Giant Panels
   ========================================================================= */
@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=Inter:wght@400;500;600&display=swap');

:root {
  --bg-color: #000000;
  --text-main: #ffffff;
  --text-muted: #888888;
  --border-soft: rgba(255, 255, 255, 0.1);
  --border-hover: rgba(255, 255, 255, 0.25);
  
  --panel-bg: rgba(15, 15, 15, 0.6);
  --accent: #5e6ad2;
  --danger: #ff3366;
}

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

html, body {
  height: 100%;
  background-color: var(--bg-color);
  color: var(--text-main);
  font-family: 'Inter', sans-serif;
  overflow-x: hidden;
}

/* Custom Scrollbar Ultra Premium */
::-webkit-scrollbar {
  width: 5px;
  height: 5px;
}
::-webkit-scrollbar-track {
  background: transparent; 
}
::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.1); 
  border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(255,255,255,0.25); 
}
* {
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.1) transparent;
}

h1, h2, h3, h4, .wow-title {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  letter-spacing: -0.04em;
}

/* =======================================
   Background System (Ultra Premium)
   ======================================= */
body {
  background-color: transparent;
  color: #fff; text-align: center; overflow-x: hidden;
  margin: 0; padding: 0;
}

/* Subtly animated dot grid (Vercel Style) */
.grid-bg {
  position: fixed; inset: 0; z-index: -2; pointer-events: none;
  background-image: radial-gradient(rgba(255, 255, 255, 0.15) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: radial-gradient(ellipse 80% 80% at 50% 30%, black 20%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 80% 80% at 50% 30%, black 20%, transparent 100%);
  animation: dotDrift 40s linear infinite;
}

@keyframes dotDrift {
  0% { transform: translateY(0); }
  100% { transform: translateY(-32px); }
}

/* Subtle accent ambient light instead of cheap glowing blobs */
.core-glow {
  position: fixed; top: -150px; left: 50%; transform: translateX(-50%);
  width: 80vw; height: 300px;
  background: radial-gradient(ellipse at top, rgba(255, 255, 255, 0.08) 0%, transparent 70%);
  z-index: -1; pointer-events: none;
}

/* =======================================
   Typography
   ======================================= */
.wow-title {
  font-size: clamp(3.5rem, 8vw, 6rem);
  line-height: 1;
  background: linear-gradient(90deg, #ffffff 0%, #a4b1ff 25%, #ffffff 50%, #00f0ff 75%, #ffffff 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: textShine 6s linear infinite;
  text-align: center;
}

@keyframes textShine { to { background-position: 200% center; } }

.subtitle {
  font-size: 1.25rem; color: var(--text-muted);
  max-width: 600px; margin: 0 auto; text-align: center; line-height: 1.6;
}

/* =======================================
   Full-Width Navbar
   ======================================= */
.floating-nav {
  position: fixed; top: 0; left: 0; width: 100%;
  background: rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  box-shadow: none;
  padding: 18px 48px;
  display: flex; justify-content: space-between; align-items: center;
  z-index: 1000; transition: all 0.3s;
}

@media (max-width: 768px) {
  .floating-nav { padding: 12px 24px; }
}
.nav-brand {
  display: flex; align-items: center; gap: 12px;
  font-family: 'Space Grotesk', sans-serif; font-size: 1.4rem; font-weight: 700;
  color: #fff; text-decoration: none;
}
.nav-actions {
  display: flex; align-items: center; gap: 16px;
}

/* =======================================
   Buttons (Sharp Edition)
   ======================================= */
.btn-pill {
  font-family: 'Inter', sans-serif; font-weight: 600; font-size: 0.9rem;
  padding: 10px 24px; border-radius: 12px;
  display: inline-flex; align-items: center; gap: 8px;
  text-decoration: none; cursor: pointer; transition: all 0.3s;
}
.btn-pill:active { transform: scale(0.95); }

.btn-primary {
  background: #ffffff; color: #000; border: 1px solid #fff;
  box-shadow: 0 0 20px rgba(255,255,255,0.2);
}
.btn-primary:hover {
  box-shadow: 0 0 30px rgba(255,255,255,0.4); background: #e0e0e0;
}

.btn-ghost {
  background: transparent; color: #fff; border: 1px solid var(--border-soft);
}
.btn-ghost:hover {
  background: rgba(255,255,255,0.05); border-color: var(--border-hover);
}

.btn-danger {
  background: rgba(255, 51, 102, 0.1); color: var(--danger); border: 1px solid rgba(255, 51, 102, 0.3);
}
.btn-danger:hover {
  background: rgba(255, 51, 102, 0.2); border-color: var(--danger);
  box-shadow: 0 0 20px rgba(255, 51, 102, 0.2); color: #fff;
}

/* =======================================
   Main Content Layout
   ======================================= */
.main-layout {
  padding-top: 150px; padding-bottom: 100px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  min-height: 100vh;
}

/* ============================================
   DASHBOARD — HEXTECH COMMAND INTERFACE
   Horizontal command rows, not cards
   ============================================ */

.dashboard-header {
  width: 100%;
  max-width: 860px;
  padding-top: 16px;
  padding-bottom: 36px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.dashboard-greeting {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.22);
  margin-bottom: 10px;
}
.dashboard-title {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  color: rgba(255, 255, 255, 0.92);
  margin: 0;
  font-family: 'Space Grotesk', sans-serif;
}

/* Panel list — vertical stack, not grid */
.server-panel-list {
  width: 100%;
  max-width: 860px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Scroll-reveal base state */
.server-panel {
  position: relative;
  overflow: hidden;
  border-radius: 14px;
  padding: 20px 24px;
  display: flex;
  align-items: center;
  gap: 18px;
  background: rgba(12, 13, 18, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.06);
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity 0.55s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.55s cubic-bezier(0.16, 1, 0.3, 1),
    border-color 0.25s ease,
    box-shadow 0.25s ease;
}
.server-panel.panel-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Active: left accent bar */
.server-panel.active-panel {
  border-color: rgba(255, 255, 255, 0.09);
  padding-left: 28px;
}
.server-panel.active-panel::before {
  content: "";
  position: absolute;
  left: 0;
  top: 22%;
  bottom: 22%;
  width: 2px;
  background: rgba(255, 255, 255, 0.55);
  border-radius: 2px;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}

/* Hover */
.server-panel:hover {
  border-color: rgba(255, 255, 255, 0.14);
  box-shadow: 0 0 28px rgba(255, 255, 255, 0.03), 0 10px 28px rgba(0, 0, 0, 0.4);
}

/* Avatar */
.server-avatar {
  width: 48px;
  height: 48px;
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  font-weight: 800;
  color: rgba(255, 255, 255, 0.7);
  flex-shrink: 0;
  overflow: hidden;
}
.server-avatar img {
  width: 100%; height: 100%;
  object-fit: cover; border-radius: 10px;
}

/* Panel content area */
.sp-content { flex: 1; min-width: 0; }

.server-name {
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: -0.015em;
  color: rgba(255, 255, 255, 0.88);
  margin: 0 0 5px 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sp-meta {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 0.75rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.3);
  letter-spacing: 0.02em;
}
.sp-dot {
  width: 6px; height: 6px;
  border-radius: 50%; flex-shrink: 0;
}
.sp-dot.ok   { background: #00ff88; box-shadow: 0 0 7px #00ff88; }
.sp-dot.off  { background: rgba(255, 255, 255, 0.15); }
.sp-id {
  font-family: 'Courier New', monospace;
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.18);
  letter-spacing: 0.05em;
}

/* Action buttons */
.sp-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.sp-btn-icon {
  width: 38px; height: 38px;
  border-radius: 9px;
  border: 1px solid rgba(255, 51, 102, 0.25);
  background: rgba(255, 51, 102, 0.07);
  color: rgba(255, 51, 102, 0.6);
  display: flex; align-items: center; justify-content: center;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
  flex-shrink: 0;
}
.sp-btn-icon:hover {
  background: rgba(255, 51, 102, 0.18);
  border-color: rgba(255, 51, 102, 0.5);
  color: rgba(255, 51, 102, 0.9);
}

.sp-btn-primary {
  height: 38px; padding: 0 18px;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.82rem; font-weight: 600;
  display: flex; align-items: center; gap: 7px;
  text-decoration: none; white-space: nowrap;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}
.sp-btn-primary:hover {
  background: rgba(255, 255, 255, 0.11);
  border-color: rgba(255, 255, 255, 0.2);
  color: white;
}

.sp-btn-ghost {
  height: 38px; padding: 0 18px;
  border-radius: 9px;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.4);
  font-size: 0.82rem; font-weight: 600;
  display: flex; align-items: center; gap: 7px;
  text-decoration: none; white-space: nowrap;
  transition: border-color 0.2s, color 0.2s;
}
.sp-btn-ghost:hover {
  border-color: rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.75);
}

/* Inactive label */
.inactive-label {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.18);
  padding: 36px 0 12px;
  width: 100%;
  max-width: 860px;
}

/* Responsive */
@media (max-width: 640px) {
  .sp-actions { flex-direction: column; gap: 6px; }
  .sp-btn-primary, .sp-btn-ghost { height: 34px; font-size: 0.78rem; }
}

/* ============================================
   TRUST BAR
   ============================================ */
.trust-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin-top: 16px;
  margin-bottom: 0;
  padding: 22px 40px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.03);
  width: fit-content;
  max-width: 760px;
  margin-left: auto;
  margin-right: auto;
}

.trust-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 36px;
  gap: 5px;
}

.trust-num {
  font-size: 1.5rem;
  font-weight: 900;
  color: rgba(255, 255, 255, 0.97);
  letter-spacing: -0.04em;
  line-height: 1;
  text-shadow: 0 0 24px rgba(255, 255, 255, 0.25), 0 0 60px rgba(255, 255, 255, 0.08);
}

.trust-plus {
  font-size: 1.1rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.4);
  margin-left: 2px;
  vertical-align: super;
  font-size: 0.9em;
}

.trust-label {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.3);
  white-space: nowrap;
}

.trust-divider {
  width: 1px;
  height: 40px;
  background: rgba(255, 255, 255, 0.12);
  flex-shrink: 0;
}

.trust-section-divider {
  width: 100%;
  max-width: 600px;
  height: 1px;
  background: linear-gradient(to right, transparent, rgba(255,255,255,0.08) 30%, rgba(255,255,255,0.08) 70%, transparent);
  margin: 48px auto 0;
}

/* Comet spin — used by feature cards */
@keyframes cometSpin {
  0%   { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* ============================================
   FEATURE CARDS (unauthenticated landing)
   ============================================ */
.feature-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 20px;
  max-width: 1000px;
  width: 100%;
  margin-top: 48px;
}

.feature-card {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 20px;
  padding: 28px 32px;
  border-radius: 14px;
  background: transparent; /* transparent so ::after handles bg */
  overflow: hidden;        /* clips the rotating comet layer */
  cursor: default;
  transform: translateZ(0);
  transition:
    transform 0.35s cubic-bezier(0.16, 1, 0.3, 1),
    box-shadow 0.35s ease;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

/* Rotating comet layer — same proven pattern as .server-panel */
.feature-card::before {
  content: "";
  position: absolute;
  top: -50%; left: -50%; width: 200%; height: 200%;
  background: conic-gradient(
    from 0deg,
    transparent 0%,
    transparent 86%,
    rgba(255, 255, 255, 0.06) 92%,
    rgba(255, 255, 255, 0.55) 97%,
    rgba(255, 255, 255, 0.95) 100%
  );
  animation: cometSpin 4.8s linear infinite;
  will-change: transform;
  z-index: -2;
}

/* Solid inner card — covers center, leaves 1px comet edge */
.feature-card::after {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: 13px;
  background: rgb(14, 15, 20);
  z-index: -1;
}

/* Hover: Lift + glow shadow */
.feature-card:hover {
  transform: translateY(-6px);
  box-shadow:
    0 0 20px rgba(255, 255, 255, 0.06),
    0 24px 50px rgba(0, 0, 0, 0.6);
}

/* Async speed per card so they never look synchronised */
.feature-card:nth-child(2)::before {
  animation-duration: 6.3s;
  animation-delay: -2.7s;
}
.feature-card:nth-child(3)::before {
  animation-duration: 3.9s;
  animation-delay: -1.4s;
}

/* Icon wrapper */
.feature-icon {
  flex-shrink: 0;
  width: 46px;
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.09);
  color: rgba(255, 255, 255, 0.75);
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), background 0.3s, color 0.3s;
}

.feature-card:hover .feature-icon {
  transform: scale(1.14) rotate(-4deg);
  background: rgba(255, 255, 255, 0.10);
  color: rgba(255, 255, 255, 1);
}

.feature-card-body {
  flex: 1;
  min-width: 0;
}

.feature-card-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.95);
  margin: 0 0 8px;
  letter-spacing: -0.01em;
  transition: color 0.3s;
}

.feature-card-desc {
  font-size: 0.9rem;
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.48);
  margin: 0;
  transition: color 0.3s;
}

.feature-card:hover .feature-card-desc {
  color: rgba(255, 255, 255, 0.68);
}

/* Arrow that slides in on hover */
.feature-card-arrow {
  flex-shrink: 0;
  align-self: center;
  color: rgba(255, 255, 255, 0.2);
  opacity: 0;
  transform: translateX(-8px);
  transition: opacity 0.3s ease, transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), color 0.3s;
}

.feature-card:hover .feature-card-arrow {
  opacity: 1;
  transform: translateX(0);
  color: rgba(255, 255, 255, 0.7);
}

/* Status */
.status-pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 16px; border-radius: 12px; font-size: 0.85rem; font-weight: 600;
  background: rgba(255,255,255,0.05); border: 1px solid var(--border-soft);
  margin-bottom: 32px;
}
.status-dot { width: 8px; height: 8px; border-radius: 50%; }
.status-ok .status-dot { background: #00ff88; box-shadow: 0 0 12px #00ff88; }
.status-offline .status-dot { background: var(--text-muted); }

/* Animation Classes */
@keyframes fadeScaleUp {
  0% { opacity: 0; transform: scale(0.95) translateY(20px); }
  100% { opacity: 1; transform: scale(1) translateY(0); }
}
.anim-1 { animation: fadeScaleUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) calc(0.1s) both; }
.anim-2 { animation: fadeScaleUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) calc(0.3s) both; }
.anim-3 { animation: fadeScaleUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) calc(0.5s) both; }

/* Alerts */
.glass-alert {
  background: rgba(255, 51, 102, 0.1); border: 1px solid rgba(255, 51, 102, 0.2);
  border-radius: 16px; padding: 20px 32px; color: #fff;
  display: inline-flex; align-items: center; gap: 16px; backdrop-filter: blur(20px);
}

@media (max-width: 768px) {
  .wow-title { font-size: 2.8rem; }
  .server-panel-container { grid-template-columns: 1fr; }
  .floating-nav { width: calc(100% - 24px); padding: 12px 16px; }
  .nav-brand span { display: none; }
}
