/* ============================================
   PINGUI ALERT - UNIFIED DESIGN SYSTEM
   ============================================ */

/* CSS Variables - Design Tokens */
:root {
  /* Colors - Background */
  --bg-color: #0a0a0c;
  --bg-gradient: linear-gradient(135deg, #0a0a0c 0%, #1a1a2e 100%);

  /* Colors - Text */
  --text-primary: #ffffff;
  --text-secondary: #a1a1aa;
  --text-muted: #71717a;

  /* Colors - Accent */
  --accent-primary: #3b82f6;
  --accent-secondary: #8b5cf6;
  --accent-success: #10b981;
  --accent-warning: #f59e0b;
  --accent-error: #ef4444;
  --accent-glow: rgba(59, 130, 246, 0.5);

  /* Colors - Card & Surface */
  --card-bg: rgba(255, 255, 255, 0.03);
  --card-bg-hover: rgba(255, 255, 255, 0.08);
  --border-color: rgba(255, 255, 255, 0.1);
  --code-bg: rgba(0, 0, 0, 0.3);
  --code-border: rgba(139, 92, 246, 0.3);

  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.2);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.3);
  --shadow-glow: 0 0 20px var(--accent-glow);

  /* Typography */
  --font-main: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'Courier New', monospace;

  /* Spacing & Sizing */
  --border-radius: 12px;
  --border-radius-lg: 16px;
  --border-radius-sm: 8px;

  /* Transitions */
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-fast: all 0.15s ease;
}

/* ============================================
   RESET & BASE STYLES
   ============================================ */

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

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg-color);
  color: var(--text-primary);
  font-family: var(--font-main);
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  padding-top: 80px; /* Space for fixed navbar */
}

/* ============================================
   LAYOUT COMPONENTS
   ============================================ */

/* Background Glow Effect */
.background-glow {
  position: fixed;
  top: -20%;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
  opacity: 0.2;
  z-index: -1;
  pointer-events: none;
  filter: blur(80px);
}

/* Container */
.container {
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 2rem;
  min-height: auto; /* Changed from 100vh to auto since body has min-height */
}

/* ============================================
   NAVIGATION
   ============================================ */

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 5%;
  width: 100%;
  max-width: 100%; /* Ensure full width */
  margin: 0;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1000;
  background: rgba(10, 10, 12, 0.8); /* Semi-transparent background */
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
}

.logo {
  font-weight: 700;
  font-size: 1.5rem;
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  height: 48px; /* Fixed height for container */
}

.logo img {
  height: 100%; /* Constrain image to container height */
  width: auto !important; /* Override inline styles */
  object-fit: contain;
}

.badge {
  font-size: 0.75rem;
  background: rgba(255, 255, 255, 0.1);
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  color: var(--text-secondary);
  font-weight: 400;
}

.badge {
  font-size: 0.75rem;
  background: rgba(255, 255, 255, 0.1);
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  color: var(--text-secondary);
  font-weight: 400;
}

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

.nav-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.95rem;
  transition: color 0.2s;
}

.nav-link:hover {
  color: var(--text-primary);
}

.nav-link.active {
  color: var(--text-primary);
  position: relative;
}

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: -0.5rem;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--accent-primary);
}

/* ============================================
   TYPOGRAPHY
   ============================================ */

h1 {
  font-size: 3.5rem;
  line-height: 1.1;
  font-weight: 700;
  margin-bottom: 1.5rem;
  letter-spacing: -0.03em;
}

h2 {
  font-size: 2.5rem;
  line-height: 1.2;
  font-weight: 700;
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
}

h3 {
  font-size: 1.5rem;
  line-height: 1.3;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.title {
  font-size: 2rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
}

.subtitle {
  font-size: 0.95rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.gradient-text {
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.text-center {
  text-align: center;
}

/* ============================================
   BUTTONS
   ============================================ */

.btn {
  padding: 0.8rem 1.5rem;
  border-radius: var(--border-radius-sm);
  font-weight: 600;
  text-decoration: none;
  transition: var(--transition);
  cursor: pointer;
  border: none;
  font-family: var(--font-main);
  font-size: 0.95rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.btn-primary {
  background: var(--text-primary);
  color: var(--bg-color);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(255, 255, 255, 0.2);
}

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

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
}

.btn-gradient {
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  color: white;
  box-shadow: var(--shadow-sm);
}

.btn-gradient:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md), var(--shadow-glow);
}

.btn-gradient:active {
  transform: translateY(0);
}

/* ============================================
   CARDS
   ============================================ */

.card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: 1.5rem;
  transition: var(--transition);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.card:hover {
  background: var(--card-bg-hover);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.card-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.card-value {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-primary);
  word-break: break-word;
}

.card-value-large {
  font-size: 2.5rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
}

/* Info Cards (for user data page) */
.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1rem;
}

.info-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: 1.25rem;
  transition: var(--transition);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  position: relative;
  overflow: hidden;
}

.info-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
  opacity: 0;
  transition: var(--transition);
}

.info-card:hover {
  background: var(--card-bg-hover);
  border-color: var(--accent-primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.info-card:hover::before {
  opacity: 1;
}

.info-card.highlight {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(139, 92, 246, 0.1));
  border-color: var(--accent-primary);
}

/* ============================================
   FORMS
   ============================================ */

.form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  max-width: 500px;
  margin: 0 auto;
  width: 100%;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form label {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-primary);
}

.form input,
.form textarea,
.form select {
  padding: 0.875rem 1rem;
  border-radius: var(--border-radius-sm);
  border: 1px solid var(--border-color);
  background: var(--card-bg);
  color: var(--text-primary);
  font-family: var(--font-main);
  font-size: 0.95rem;
  transition: var(--transition);
}

.form input:focus,
.form textarea:focus,
.form select:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form input::placeholder,
.form textarea::placeholder {
  color: var(--text-muted);
}

/* Legacy form classes for compatibility */
.login-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  max-width: 500px;
  margin: 0 auto;
  width: 100%;
  padding: 2rem;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  backdrop-filter: blur(10px);
}

.login-form label {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-primary);
}

.login-form input {
  padding: 0.875rem 1rem;
  border-radius: var(--border-radius-sm);
  border: 1px solid var(--border-color);
  background: var(--card-bg);
  color: var(--text-primary);
  font-family: var(--font-main);
  font-size: 0.95rem;
  transition: var(--transition);
}

.login-form input:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.login-form button {
  padding: 0.875rem 1.5rem;
  border-radius: var(--border-radius-sm);
  border: none;
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  color: white;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: var(--transition);
  font-family: var(--font-main);
}

.login-form button:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md), var(--shadow-glow);
}

/* ============================================
   CODE & SYNTAX
   ============================================ */

code {
  background: rgba(255, 255, 255, 0.05);
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 0.9em;
  color: var(--accent-primary);
  border: 1px solid var(--border-color);
}

pre {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: #e2e8f0;
  background: #1a1a1c;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-sm);
  padding: 1.5rem;
  overflow-x: auto;
  margin: 1.5rem 0;
  line-height: 1.6;
}

pre code {
  background: none;
  padding: 0;
  border: none;
  color: #e2e8f0;
  font-size: 0.95rem;
}

.keyword {
  color: #c678dd;
}

.string {
  color: #98c379;
}

.property {
  color: #e06c75;
}

/* Code Window Component */
.code-window {
  background: #1e1e20;
  border-radius: var(--border-radius);
  border: 1px solid var(--border-color);
  width: 100%;
  max-width: 650px;
  margin: auto;
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.window-header {
  background: rgba(255, 255, 255, 0.03);
  padding: 0.8rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  border-bottom: 1px solid var(--border-color);
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.red {
  background: #ff5f56;
}

.yellow {
  background: #ffbd2e;
}

.green {
  background: #27c93f;
}

.window-title {
  margin-left: 1rem;
  font-size: 0.8rem;
  color: var(--text-secondary);
  font-family: var(--font-mono);
}

.code-content {
  padding: 1.5rem;
  overflow-x: auto;
}

.code-snippet-small {
  background: #111;
  padding: 1rem;
  border-radius: var(--border-radius-sm);
  border: 1px solid var(--border-color);
  font-family: var(--font-mono);
  color: var(--accent-primary);
  font-size: 0.9rem;
}

/* Secret Code Component */
.secret-section {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-lg);
  padding: 1.5rem;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: var(--shadow-md);
}

.secret-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.secret-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.icon {
  width: 1.25rem;
  height: 1.25rem;
  color: var(--accent-secondary);
}

.secret-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.75rem;
  background: rgba(139, 92, 246, 0.2);
  border: 1px solid var(--accent-secondary);
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--accent-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.secret-code-container {
  display: flex;
  gap: 0.75rem;
  align-items: stretch;
  background: var(--code-bg);
  border: 1px solid var(--code-border);
  border-radius: var(--border-radius);
  padding: 0.75rem;
  margin-bottom: 1rem;
  transition: var(--transition);
}

.secret-code-container:hover {
  border-color: var(--accent-secondary);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
}

.secret-code {
  flex: 1;
  font-family: var(--font-mono);
  font-size: 0.875rem;
  color: var(--accent-primary);
  background: transparent;
  border: none;
  padding: 0.5rem;
  word-break: break-all;
  display: flex;
  align-items: center;
  line-height: 1.5;
  transition: var(--transition);
  user-select: none;
}

.secret-code.blurred {
  filter: blur(8px);
  -webkit-filter: blur(8px);
  text-shadow: 0 0 8px var(--accent-primary);
  cursor: pointer;
}

.secret-code:not(.blurred) {
  user-select: text;
}

.reveal-button {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  border-radius: calc(var(--border-radius) - 4px);
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition);
  min-width: 2.5rem;
}

.reveal-button:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--accent-secondary);
  color: var(--accent-secondary);
  transform: translateY(-1px);
}

.reveal-button:active {
  transform: translateY(0);
}

.reveal-button.active {
  background: rgba(139, 92, 246, 0.2);
  border-color: var(--accent-secondary);
  color: var(--accent-secondary);
}

.eye-icon {
  width: 1.25rem;
  height: 1.25rem;
  transition: var(--transition);
}

.copy-button {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  border: none;
  border-radius: calc(var(--border-radius) - 4px);
  color: white;
  font-family: var(--font-main);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
  box-shadow: var(--shadow-sm);
}

.copy-button:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md), var(--shadow-glow);
}

.copy-button:active {
  transform: translateY(0);
}

.copy-button.copied {
  background: linear-gradient(135deg, var(--accent-success), var(--accent-success));
}

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

.secret-warning {
  font-size: 0.8rem;
  color: var(--accent-warning);
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  line-height: 1.5;
  padding: 0.75rem;
  background: rgba(245, 158, 11, 0.1);
  border-left: 3px solid var(--accent-warning);
  border-radius: 4px;
}

/* ============================================
   MAIN LAYOUT
   ============================================ */

main {
  flex: 1;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
  padding: 0 5%;
}

.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

/* ============================================
   HERO SECTION
   ============================================ */

.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 6rem 0 4rem;
  gap: 3rem;
}

@media (min-width: 900px) {
  .hero {
    flex-direction: row;
    text-align: left;
    padding: 8rem 0;
    gap: 4rem;
  }

  .hero-content {
    flex: 1;
  }

  .hero-visual {
    flex: 1;
    display: flex;
    justify-content: center;
  }
}

.hero h1 {
  font-size: 3.5rem;
  line-height: 1.1;
  font-weight: 700;
  margin-bottom: 1.5rem;
  letter-spacing: -0.03em;
}

.hero .subtitle {
  font-size: 1.25rem;
  color: var(--text-secondary);
  margin-bottom: 2.5rem;
  max-width: 600px;
}

.cta-group {
  display: flex;
  gap: 1rem;
  justify-content: center;
}

@media (min-width: 900px) {
  .cta-group {
    justify-content: flex-start;
  }
}

/* ============================================
   FEATURES SECTION
   ============================================ */

.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  padding: 4rem 0;
  border-top: 1px solid var(--border-color);
  margin-top: 2rem;
}

.feature-card {
  background: var(--card-bg);
  padding: 2rem;
  border-radius: var(--border-radius);
  border: 1px solid var(--border-color);
  transition: var(--transition);
}

.feature-card:hover {
  transform: translateY(-5px);
  border-color: rgba(255, 255, 255, 0.2);
  background: var(--card-bg-hover);
}

.feature-card .icon {
  font-size: 2rem;
  margin-bottom: 1rem;
}

.feature-card h3 {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}

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

/* ============================================
   INTEGRATION OPTIONS
   ============================================ */

.integration-options {
  padding: 6rem 0;
  border-top: 1px solid var(--border-color);
}

.section-header {
  text-align: center;
  margin-bottom: 4rem;
}

.section-header h2 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.section-header p {
  color: var(--text-secondary);
  font-size: 1.1rem;
}

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

.option-card {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.03) 0%, rgba(255, 255, 255, 0.01) 100%);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-lg);
  padding: 2.5rem;
  position: relative;
  overflow: hidden;
}

.option-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at top right, rgba(59, 130, 246, 0.1), transparent 60%);
  pointer-events: none;
}

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

.icon-small {
  font-size: 1.5rem;
  background: rgba(255, 255, 255, 0.05);
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--border-radius);
}

.option-card h3 {
  font-size: 1.5rem;
}

.option-card p {
  color: var(--text-secondary);
  margin-bottom: 2rem;
  line-height: 1.7;
}

.check-list {
  list-style: none;
}

.check-list li {
  margin-bottom: 0.8rem;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* ============================================
   DOCUMENTATION
   ============================================ */

.docs-container {
  display: grid;
  grid-template-columns: 250px 1fr;
  gap: 4rem;
  max-width: 1400px;
  margin: 0 auto;
  padding: 4rem 5% 2rem; /* Increased top padding to 4rem */
  min-height: calc(100vh - 200px);
}

@media (max-width: 900px) {
  .docs-container {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

/* Sidebar */
.sidebar {
  position: sticky;
  top: 8rem; /* Adjusted for wider spacing */
  height: fit-content;
  padding: 1.5rem;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
}

@media (max-width: 900px) {
  .sidebar {
    position: relative;
    top: 0;
  }
}

.sidebar-group {
  margin-bottom: 2rem;
}

.sidebar-group:last-child {
  margin-bottom: 0;
}

.sidebar-group h3 {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
  margin-bottom: 1rem;
  font-weight: 600;
}

.sidebar-link {
  display: block;
  padding: 0.6rem 0.8rem;
  color: var(--text-secondary);
  text-decoration: none;
  border-radius: 6px;
  font-size: 0.95rem;
  transition: var(--transition-fast);
  margin-bottom: 0.3rem;
}

.sidebar-link:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
}

.sidebar-link.active {
  background: rgba(59, 130, 246, 0.15);
  color: var(--accent-primary);
  font-weight: 500;
}

/* Documentation Content */
.docs-content {
  max-width: 800px;
}

.docs-content section {
  margin-bottom: 4rem;
  scroll-margin-top: 150px; /* Large offset to clear navbar */
}

/* Ensure headings also have the offset in case they are targeted directly */
.docs-content h1,
.docs-content h2,
.docs-content h3 {
  scroll-margin-top: 150px;
}

.docs-content h1 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 1rem;
}

.docs-content h2 {
  font-size: 2rem;
  margin-bottom: 1.5rem;
  margin-top: 2rem;
  color: var(--text-primary);
}

.docs-content h3 {
  font-size: 1.4rem;
  margin-bottom: 1rem;
  margin-top: 2rem;
  color: var(--text-primary);
}

.docs-content p {
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 1.5rem;
  padding: 0 2rem;
  font-size: 1.05rem;
}

/* Steps List */
.steps-list {
  padding-left: 1.5rem;
  margin: 1.5rem 0;
}

.steps-list li {
  color: var(--text-secondary);
  margin-bottom: 1rem;
  line-height: 1.7;
  font-size: 1.05rem;
}

.steps-list li strong {
  color: var(--text-primary);
}

/* Info Box */
.info-box {
  background: rgba(59, 130, 246, 0.1);
  border-left: 4px solid var(--accent-primary);
  padding: 1rem 1.5rem;
  border-radius: 6px;
  margin: 1.5rem 0;
  color: var(--text-secondary);
}

.info-box strong {
  color: var(--accent-primary);
  font-weight: 600;
}

/* Endpoint Badge */
.endpoint-badge {
  display: inline-block;
  background: rgba(34, 197, 94, 0.15);
  color: #22c55e;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 0.95rem;
  margin: 1rem 0;
  border: 1px solid rgba(34, 197, 94, 0.3);
}

/* Documentation Table */
.docs-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.95rem;
}

.docs-table thead {
  background: rgba(255, 255, 255, 0.03);
}

.docs-table th {
  text-align: left;
  padding: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  border-bottom: 2px solid var(--border-color);
}

.docs-table td {
  padding: 1rem;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-secondary);
}

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

.docs-table code {
  font-size: 0.85rem;
}

/* ============================================
   FOOTER
   ============================================ */

footer {
  text-align: center;
  padding: 3rem 0;
  color: var(--text-secondary);
  font-size: 0.9rem;
  border-top: 1px solid var(--border-color);
  margin-top: auto;
}

footer a {
  color: var(--text-primary);
  text-decoration: none;
  transition: color 0.2s;
}

footer a:hover {
  color: var(--accent-primary);
}

.footer {
  padding: 1rem 0;
  display: flex;
  justify-content: center;
}

.close-button {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.875rem 2rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  color: var(--text-primary);
  font-family: var(--font-main);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.close-button:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--text-secondary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.close-button:active {
  transform: translateY(0);
}

.button-icon {
  width: 1.125rem;
  height: 1.125rem;
}

/* ============================================
   HEADER COMPONENT
   ============================================ */

.header {
  text-align: center;
  padding: 1rem 0;
}

.header-content {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

/* ============================================
   ANIMATIONS
   ============================================ */

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

.fade-in-down {
  animation: fadeInDown 0.6s ease-out;
}

.fade-in-up {
  animation: fadeInUp 0.6s ease-out;
}

/* ============================================
   DETAILS & SUMMARY
   ============================================ */

details {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  margin-bottom: 1rem;
  overflow: hidden;
  transition: var(--transition);
}

details[open] {
  border-color: rgba(59, 130, 246, 0.5);
  background: var(--card-bg-hover);
}

summary {
  padding: 1rem 1.5rem;
  cursor: pointer;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: space-between;
  list-style: none;
  background: rgba(255, 255, 255, 0.02);
  transition: var(--transition);
  color: var(--text-primary);
}

summary::-webkit-details-marker {
  display: none;
}

summary:hover {
  background: rgba(255, 255, 255, 0.05);
}

summary::after {
  content: '+';
  font-family: var(--font-mono);
  font-size: 1.5rem;
  color: var(--accent-primary);
  transition: transform 0.3s ease;
  line-height: 1;
}

details[open] summary::after {
  transform: rotate(45deg);
}

details[open] summary {
  border-bottom: 1px solid var(--border-color);
}

details > *:not(summary) {
  padding: 1.5rem;
  animation: fadeInDown 0.3s ease-out;
}

/* Sidebar Details Overrides */
details.sidebar-group {
  background: transparent;
  border: none;
  border-radius: 0;
  margin-bottom: 2rem;
  overflow: visible;
}

details.sidebar-group[open] {
  background: transparent;
  border-color: transparent;
}

details.sidebar-group summary {
  padding: 0;
  margin-bottom: 0.5rem;
  background: transparent;
  border: none;
  justify-content: flex-start;
  gap: 0.5rem;
  color: var(--text-secondary);
}

details.sidebar-group summary:hover {
  background: transparent;
  color: var(--text-primary);
}

details.sidebar-group summary h3 {
  margin: 0;
  display: inline-block;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
}

details.sidebar-group summary::after {
  content: '›';
  font-size: 1.2rem;
  order: -1;
  transition: transform 0.2s ease;
  line-height: 0.8;
  color: var(--text-secondary);
}

details.sidebar-group[open] summary::after {
  transform: rotate(90deg);
}

details.sidebar-group[open] summary {
  border-bottom: none;
}

details.sidebar-group > *:not(summary) {
  padding: 0;
  animation: none;
  margin-bottom: 0.3rem;
  display: block;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

@media (max-width: 640px) {
  .container {
    padding: 1rem;
    gap: 1.5rem;
  }

  h1 {
    font-size: 2.5rem;
  }

  .title {
    font-size: 1.5rem;
  }

  .subtitle {
    font-size: 0.875rem;
  }

  .info-grid {
    grid-template-columns: 1fr;
  }

  .secret-code-container {
    flex-wrap: wrap;
  }

  .secret-code {
    flex: 1 1 100%;
    min-width: 100%;
  }

  .reveal-button,
  .copy-button {
    flex: 1;
    justify-content: center;
  }

  .card-value-large {
    font-size: 2rem;
  }

  .navbar {
    padding: 1.5rem 5%;
  }

  .nav-links {
    gap: 1rem;
  }

  .nav-link {
    font-size: 0.85rem;
  }
}

@media (max-width: 400px) {
  .secret-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .secret-code {
    font-size: 0.75rem;
  }

  .cta-group {
    flex-direction: column;
  }

  .btn {
    width: 100%;
  }
}
