/* PackSwap Studio - Official Website & Admin Portal Design System */
/* shadcn/ui Dark Zinc Theme + Tailwind Catalyst Precision */

:root {
  --background: #09090b;
  --foreground: #fafafa;
  --card: #121215;
  --card-elevated: #18181b;
  --card-foreground: #fafafa;
  --popover: #121215;
  --popover-foreground: #fafafa;
  --primary: #fafafa;
  --primary-foreground: #09090b;
  --secondary: #27272a;
  --secondary-hover: #3f3f46;
  --secondary-foreground: #fafafa;
  --muted: #18181b;
  --muted-foreground: #a1a1aa;
  --accent: #27272a;
  --accent-foreground: #fafafa;
  --destructive: #ef4444;
  --destructive-foreground: #fafafa;
  --border: #27272a;
  --border-subtle: #1f1f23;
  --input: #1e1e24;
  --ring: #38bdf8;
  --radius: 8px;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'Geist Mono', 'Cascadia Code', monospace;
}

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

body {
  background-color: var(--background);
  color: var(--foreground);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
  min-height: 100vh;
  overflow-x: hidden;
  background-image: 
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(56, 189, 248, 0.12), transparent),
    radial-gradient(circle at 100% 30%, rgba(139, 92, 246, 0.06), transparent 500px);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  letter-spacing: -0.025em;
  color: #fff;
}

a {
  color: inherit;
  text-decoration: none;
}

/* Header & Navigation */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  background: rgba(9, 9, 11, 0.8);
  border-bottom: 1px solid var(--border);
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  font-size: 16px;
  color: #fff;
}

.brand-icon {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, #38bdf8, #818cf8);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  box-shadow: 0 0 16px rgba(56, 189, 248, 0.35);
}

.brand-logo-img {
  width: 30px;
  height: 30px;
  border-radius: 7px;
  object-fit: contain;
  display: block;
  box-shadow: 0 0 16px rgba(56, 189, 248, 0.35);
}

.brand-version {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(56, 189, 248, 0.12);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.25);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--muted-foreground);
}

.nav-links a:hover {
  color: #fff;
  transition: color 0.15s ease;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}

.btn-primary {
  background: #ffffff;
  color: #09090b;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
}

.btn-primary:hover {
  background: #f4f4f5;
  box-shadow: 0 4px 14px rgba(255,255,255,0.2);
}

.btn-outline {
  background: transparent;
  border-color: var(--border);
  color: var(--foreground);
}

.btn-outline:hover {
  background: var(--secondary);
  color: #fff;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 12px;
  border-radius: 6px;
}

.btn-xs {
  padding: 4px 8px;
  font-size: 11px;
  border-radius: 4px;
}

.btn-danger {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
  border-color: rgba(239, 68, 68, 0.25);
}

.btn-danger:hover {
  background: rgba(239, 68, 68, 0.25);
}

/* Hero Section */
.hero {
  max-width: 1100px;
  margin: 0 auto;
  padding: 90px 24px 60px;
  text-align: center;
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(24, 24, 27, 0.8);
  border: 1px solid var(--border);
  font-size: 12.5px;
  font-weight: 500;
  color: var(--muted-foreground);
  margin-bottom: 28px;
}

.hero-pill .dot {
  width: 7px;
  height: 7px;
  background: #10b981;
  border-radius: 50%;
  box-shadow: 0 0 8px #10b981;
}

.hero h1 {
  font-size: clamp(38px, 6vw, 64px);
  line-height: 1.08;
  margin-bottom: 24px;
  letter-spacing: -0.04em;
}

.hero h1 .gradient-text {
  background: linear-gradient(135deg, #38bdf8 0%, #818cf8 50%, #c084fc 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero p {
  font-size: clamp(16px, 2vw, 19px);
  color: var(--muted-foreground);
  max-width: 680px;
  margin: 0 auto 36px;
  line-height: 1.6;
}

.hero-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 50px;
}

.hero-cta .btn {
  padding: 12px 24px;
  font-size: 14px;
  border-radius: 8px;
}

.hero-meta {
  font-size: 12px;
  color: var(--muted-foreground);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
}

/* App Mockup Preview - Authentic PackSwap Studio UI */
.preview-wrapper {
  max-width: 1140px;
  margin: 0 auto 90px;
  padding: 0 16px;
}

.mockup-window {
  background: #09090b;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.8), 0 0 50px rgba(56, 189, 248, 0.12);
}

.app-titlebar {
  height: 44px;
  background: #09090b;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  font-size: 12px;
}

.titlebar-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  color: #fff;
}

.titlebar-center {
  display: flex;
  align-items: center;
  gap: 10px;
}

.vps-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #18181b;
  border: 1px solid var(--border);
  padding: 3px 10px;
  border-radius: 6px;
  font-size: 11.5px;
  color: #e4e4e7;
}

.conn-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #34d399;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 6px;
}

.conn-pill .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 6px #10b981;
}

.window-controls-mock {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted-foreground);
  font-size: 13px;
}

.app-layout-mock {
  display: grid;
  grid-template-columns: 260px 1fr;
  min-height: 580px;
  background: #09090b;
}

.app-sidebar-mock {
  background: #0c0c0e;
  border-right: 1px solid var(--border);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.mcswap-box-mock {
  background: #121215;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px;
}

.mcswap-box-mock .tag {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--muted-foreground);
  background: rgba(255,255,255,0.04);
  padding: 2px 6px;
  border-radius: 4px;
}

.server-card-mock {
  background: #121215;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
  transition: all 0.15s ease;
}

.server-card-mock.active-server {
  border-color: rgba(56, 189, 248, 0.5);
  background: #18181b;
  box-shadow: 0 0 14px rgba(56, 189, 248, 0.1);
}

.sidebar-nav-mock {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.sidebar-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 6px;
  font-size: 12.5px;
  color: var(--muted-foreground);
  font-weight: 500;
}

.sidebar-nav-item.active {
  background: #18181b;
  color: #fff;
  border: 1px solid var(--border);
  font-weight: 600;
}

.app-main-mock {
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  overflow-y: auto;
}

.hero-control-bar {
  background: #121215;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.metric-gauges-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.metric-card-mock {
  background: #121215;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.progress-track {
  width: 100%;
  height: 6px;
  background: #1f1f23;
  border-radius: 999px;
  overflow: hidden;
  margin: 10px 0 6px;
}

.progress-fill {
  height: 100%;
  border-radius: 999px;
}

.dashboard-split-mock {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 14px;
}

.terminal-box-mock {
  background: #000000;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: #a1a1aa;
  height: 220px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 5px;
  box-shadow: inset 0 2px 6px rgba(0,0,0,0.6);
}

/* Feature Cards Grid */
.features-section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 80px 24px;
}

.section-header {
  text-align: center;
  margin-bottom: 56px;
}

.section-tag {
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #38bdf8;
  margin-bottom: 12px;
}

.section-header h2 {
  font-size: 36px;
  margin-bottom: 14px;
}

.section-header p {
  color: var(--muted-foreground);
  font-size: 16px;
  max-width: 580px;
  margin: 0 auto;
}

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

.feature-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 28px;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

.feature-card:hover {
  border-color: rgba(56, 189, 248, 0.4);
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(0,0,0,0.4);
}

.feature-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: rgba(56, 189, 248, 0.1);
  color: #38bdf8;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  margin-bottom: 20px;
  border: 1px solid rgba(56, 189, 248, 0.2);
}

.feature-card h3 {
  font-size: 18px;
  margin-bottom: 10px;
}

.feature-card p {
  font-size: 13.5px;
  color: var(--muted-foreground);
  line-height: 1.6;
}

/* Changelog Accordion */
.changelog-section {
  max-width: 900px;
  margin: 0 auto;
  padding: 80px 24px;
}

.changelog-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.changelog-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 20px 24px;
}

.changelog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.changelog-badge {
  font-size: 12px;
  font-weight: 700;
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.12);
  padding: 3px 10px;
  border-radius: 999px;
}

.changelog-date {
  font-size: 12px;
  color: var(--muted-foreground);
}

.changelog-highlights {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 13px;
  color: #d4d4d8;
}

.changelog-highlights li {
  position: relative;
  padding-left: 20px;
  line-height: 1.5;
}

.changelog-highlights li::before {
  content: "•";
  position: absolute;
  left: 6px;
  color: #38bdf8;
  font-size: 16px;
}

/* Admin Portal Overlay / View */
.admin-view {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 100;
  background: #09090b;
  overflow-y: auto;
}

.admin-view.active {
  display: block;
}

.admin-header {
  border-bottom: 1px solid var(--border);
  background: #121215;
  padding: 14px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 20;
}

.admin-content {
  max-width: 1400px;
  margin: 0 auto;
  padding: 28px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}

.stat-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 20px;
}

.stat-label {
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted-foreground);
  margin-bottom: 6px;
}

.stat-val {
  font-size: 26px;
  font-weight: 700;
  color: #fff;
}

/* Tables */
.table-wrapper {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
  text-align: left;
}

.data-table th {
  background: #18181b;
  padding: 12px 16px;
  font-weight: 600;
  color: var(--muted-foreground);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.data-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-subtle);
}

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

/* Modals */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(6px);
  z-index: 150;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-card {
  background: #121215;
  border: 1px solid var(--border);
  border-radius: 12px;
  max-width: 480px;
  width: 100%;
  padding: 24px;
  box-shadow: 0 20px 50px rgba(0,0,0,0.6);
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}

.form-group label {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted-foreground);
}

.input {
  background: var(--input);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 9px 12px;
  color: #fff;
  font-size: 13px;
  outline: none;
  font-family: inherit;
}

.input:focus {
  border-color: #38bdf8;
  box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.2);
}

/* Badges */
.badge {
  display: inline-block;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 600;
  border-radius: 4px;
}

.badge-active {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
}

.badge-revoked {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
}

.badge-plan {
  background: rgba(56, 189, 248, 0.15);
  color: #38bdf8;
}

/* Toast notifications */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  background: #18181b;
  border: 1px solid var(--border);
  padding: 12px 18px;
  border-radius: 8px;
  font-size: 13px;
  color: #fff;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
  animation: slideIn 0.2s ease;
}

.toast.toast-error {
  border-color: rgba(239, 68, 68, 0.5);
  color: #fca5a5;
}

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

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 40px 24px;
  text-align: center;
  font-size: 12.5px;
  color: var(--muted-foreground);
}
