:root {
  --background: #030303;
  --foreground: #f5f5f7;
  --card: rgba(18, 18, 22, 0.65);
  --card-border: rgba(255, 255, 255, 0.08);
  --accent-primary: #6366f1;
  --accent-secondary: #06b6d4;
  --accent-glow: rgba(99, 102, 241, 0.15);
  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
}

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

body {
  background-color: var(--background);
  color: var(--foreground);
  font-family: var(--font-sans);
  overflow-x: hidden;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-image: 
    radial-gradient(at 0% 0%, rgba(99, 102, 241, 0.08) 0px, transparent 50%),
    radial-gradient(at 100% 100%, rgba(6, 182, 212, 0.05) 0px, transparent 50%),
    radial-gradient(at 50% 50%, rgba(168, 85, 247, 0.03) 0px, transparent 50%);
  background-attachment: fixed;
  line-height: 1.5;
}

/* Glassmorphism card */
.card {
  background: var(--card);
  backdrop-filter: blur(16px) saturate(120%);
  -webkit-backdrop-filter: blur(16px) saturate(120%);
  border: 1px solid var(--card-border);
  border-radius: 1rem;
}

.glass-interactive {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass-interactive:hover {
  background: rgba(24, 24, 28, 0.8);
  border-color: rgba(99, 102, 241, 0.3);
  box-shadow: 0 0 25px rgba(99, 102, 241, 0.1);
  transform: translateY(-2px);
}

/* Header styling */
.header {
  top: 0;
  z-index: 50;
  background: var(--card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--card-border);
}

.sticky {
  position: sticky;
}

.header-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 4rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
}

.logo-box {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.75rem;
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.2);
}

.logo-icon {
  width: 1.25rem;
  height: 1.25rem;
  color: white;
}

.brand-text {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.025em;
  color: white;
}

.brand-sub {
  color: var(--accent-secondary);
}

.nav-links {
  display: flex;
  gap: 0.25rem;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  color: #a1a1aa;
  transition: all 0.2s;
  border: 1px solid transparent;
}

.nav-link:hover {
  color: white;
  background: rgba(255, 255, 255, 0.05);
}

.nav-link.active {
  background: rgba(99, 102, 241, 0.1);
  color: #818cf8;
  border-color: rgba(99, 102, 241, 0.2);
}

.nav-icon {
  width: 1rem;
  height: 1rem;
}

.header-status {
  display: flex;
  align-items: center;
}

.status-indicator {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  color: #a1a1aa;
  background: rgba(16, 185, 129, 0.05);
  border: 1px solid rgba(16, 185, 129, 0.1);
  padding: 0.375rem 0.75rem;
  border-radius: 9999px;
}

.pulse-dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: #10b981;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { transform: scale(0.95); opacity: 0.5; }
  50% { transform: scale(1.05); opacity: 1; }
  100% { transform: scale(0.95); opacity: 0.5; }
}

/* Layout */
.main-container {
  flex: 1;
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  padding: 3rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 3rem;
}

/* Hero Section */
.hero-section {
  text-align: center;
  max-width: 48rem;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid rgba(99, 102, 241, 0.2);
  padding: 0.375rem 1rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  color: #818cf8;
}

.hero-tag-icon {
  width: 0.875rem;
  height: 0.875rem;
}

.hero-title {
  font-size: 3.5rem;
  font-weight: 800;
  letter-spacing: -0.05em;
  line-height: 1.1;
  color: white;
}

.glow-text {
  background: linear-gradient(to right, #818cf8, #c084fc, #22d3ee);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  font-size: 1.125rem;
  color: #a1a1aa;
  max-width: 38rem;
  line-height: 1.6;
}

.light-text {
  color: #f4f4f5;
}

/* Stats */
.stats-grid {
  display: grid;
  grid-template-cols: 1fr;
  gap: 1.5rem;
}

@media (min-width: 768px) {
  .stats-grid {
    grid-template-cols: repeat(3, 1fr);
  }
}

.stat-card {
  background: var(--card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--card-border);
  border-radius: 1rem;
  padding: 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.stat-icon-wrapper {
  padding: 0.75rem;
  border-radius: 0.75rem;
}

.stat-icon-wrapper.blue { background: rgba(99, 102, 241, 0.1); color: #818cf8; border: 1px solid rgba(99, 102, 241, 0.2); }
.stat-icon-wrapper.cyan { background: rgba(6, 182, 212, 0.1); color: #22d3ee; border: 1px solid rgba(6, 182, 212, 0.2); }
.stat-icon-wrapper.purple { background: rgba(168, 85, 247, 0.1); color: #c084fc; border: 1px solid rgba(168, 85, 247, 0.2); }

.stat-icon {
  width: 1.5rem;
  height: 1.5rem;
}

.stat-label {
  font-size: 0.75rem;
  color: #71717a;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
}

.stat-value {
  font-size: 1.25rem;
  font-weight: 700;
  color: white;
}

.text-emerald { color: #34d399; }
.stat-sub { font-size: 0.75rem; font-weight: 400; color: #71717a; }

/* Dashboard Columns */
.dashboard-row {
  display: grid;
  grid-template-cols: 1fr;
  gap: 2rem;
}

@media (min-width: 1024px) {
  .dashboard-row {
    grid-template-cols: 7fr 5fr;
  }
}

.p-8 { padding: 2rem; }
.flex-col { display: flex; flex-direction: column; }
.h-full { height: 100%; }

.card-header {
  margin-bottom: 1.5rem;
}

.card-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: white;
}

.flex-align {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.title-icon {
  width: 1.25rem;
  height: 1.25rem;
}

.text-indigo { color: #818cf8; }
.text-cyan { color: #22d3ee; }

.card-desc {
  font-size: 0.75rem;
  color: #71717a;
  margin-top: 0.25rem;
}

/* Forms */
.form-row {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.input-field {
  flex: 1;
  background: #09090b;
  border: 1px solid var(--card-border);
  border-radius: 0.75rem;
  padding: 0.625rem 1rem;
  font-size: 0.875rem;
  color: white;
  outline: none;
  transition: border-color 0.2s;
}

.input-field:focus {
  border-color: rgba(99, 102, 241, 0.6);
}

.btn {
  background: var(--accent-primary);
  color: white;
  border: none;
  border-radius: 0.75rem;
  padding: 0.625rem 1.25rem;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s;
}

.btn:hover {
  background: #4f46e5;
}

.btn-icon {
  width: 1rem;
  height: 1rem;
}

/* Key List */
.key-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.empty-state {
  text-align: center;
  padding: 2.5rem 0;
  border: 1px dashed var(--card-border);
  border-radius: 0.75rem;
}

.empty-state-icon {
  width: 2rem;
  height: 2rem;
  color: #27272a;
  margin: 0 auto 0.5rem auto;
}

.empty-state p {
  font-size: 0.875rem;
  color: #71717a;
}

.key-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem;
  background: rgba(9, 9, 11, 0.6);
  border: 1px solid var(--card-border);
  border-radius: 0.75rem;
  gap: 1rem;
}

.key-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.key-row-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.key-label-text {
  font-size: 0.875rem;
  font-weight: 600;
  color: #e4e4e7;
}

.key-date-badge {
  font-size: 0.625rem;
  color: #52525b;
  background: #18181b;
  padding: 0.125rem 0.5rem;
  border-radius: 4px;
}

.key-val-box {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.04);
  padding: 0.375rem 0.625rem;
  border-radius: 0.5rem;
  color: #a1a1aa;
}

.font-mono {
  font-family: var(--font-mono);
  font-size: 0.75rem;
}

.key-actions {
  display: flex;
  gap: 0.5rem;
}

.action-btn {
  background: #18181b;
  border: 1px solid var(--card-border);
  color: #a1a1aa;
  padding: 0.5rem;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: all 0.2s;
}

.action-btn:hover {
  color: white;
  background: #27272a;
}

.action-btn.text-red { color: #f87171; background: rgba(239, 68, 68, 0.05); border-color: rgba(239, 68, 68, 0.1); }
.action-btn.text-red:hover { color: #ef4444; background: rgba(239, 68, 68, 0.1); }

/* Code box & tabs */
.tabs-row {
  display: flex;
  border-bottom: 1px solid var(--card-border);
  margin-bottom: 1rem;
}

.tab-btn {
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  padding: 0.625rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: #71717a;
  cursor: pointer;
  transition: all 0.2s;
}

.tab-btn:hover {
  color: white;
}

.tab-btn.active {
  color: var(--accent-secondary);
  border-color: var(--accent-secondary);
}

.code-box-wrapper {
  position: relative;
  flex: 1;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--card-border);
  border-radius: 0.75rem;
  overflow: hidden;
}

.code-box {
  padding: 1rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: #d4d4d8;
  overflow: auto;
  white-space: pre;
  height: 250px;
}

.copy-btn-floating {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  background: #18181b;
  border: 1px solid var(--card-border);
  color: #a1a1aa;
  padding: 0.375rem;
  border-radius: 0.5rem;
  cursor: pointer;
}

.copy-btn-floating:hover {
  color: white;
  background: #27272a;
}

/* Highlights */
.highlights-grid {
  display: grid;
  grid-template-cols: 1fr;
  gap: 2rem;
  border-top: 1px solid var(--card-border);
  padding-top: 2rem;
}

@media (min-width: 768px) {
  .highlights-grid {
    grid-template-cols: repeat(3, 1fr);
  }
}

.highlight-item {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.highlight-title {
  font-size: 1.125rem;
  font-weight: 700;
  color: white;
}

.dot {
  width: 0.375rem;
  height: 0.375rem;
  border-radius: 50%;
}

.bg-indigo { background-color: var(--accent-primary); }
.bg-cyan { background-color: var(--accent-secondary); }
.bg-purple { background-color: #c084fc; }

.highlight-text {
  font-size: 0.875rem;
  color: #a1a1aa;
  line-height: 1.6;
}

/* Footer */
.footer-bar {
  border-top: 1px solid var(--card-border);
  padding: 2rem 0;
  text-align: center;
  font-size: 0.75rem;
  color: #52525b;
  background: rgba(0, 0, 0, 0.2);
}
