:root {
  /* Brand Colors */
  --color-primary: #083046;
  --color-secondary: #187aa6;
  --color-accent: #1fb6b3;
  
  /* State Colors */
  --color-alert: #DA291C;
  --color-success: #088C97;
  --color-warning: #F2CD00;
  --color-disabled: #D4D2C8;
  
  /* Background Colors */
  --color-alert-bg: #DA291C;
  --color-success-bg: #088C97;
  --color-warning-bg: #F2CD00;
  --color-disabled-bg: #D4D2C8;
  
  /* Neutrals */
  --bg: #f1f7fa;
  --card: #ffffff;
  --muted: #68727a;
  --text: #0b1220;
  --glass: rgba(255,255,255,0.6);
  --radius: 14px;
  
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
}

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

html, body { height: 100%; }

body {
  background: linear-gradient(180deg, var(--bg) 0%, #e9f2f6 100%);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.6;
}

/* Layout */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.wrap {
  width: 100%;
  max-width: 1100px;
  background: linear-gradient(180deg, rgba(255,255,255,0.9), rgba(255,255,255,0.95));
  border-radius: 18px;
  padding: 32px;
  box-shadow: 0 10px 30px rgba(16,38,49,0.12);
  margin: 40px auto;
}

/* Header */
/* Updated Header Styles */
.header {
  display: flex;
  align-items: center;
  gap: 20px;
  margin: -32px -32px 32px -32px; /* Remove margins and extend to container edges */
  padding: 40px 32px; /* Increased padding for height */
  background: 
    linear-gradient(rgba(8, 48, 70, 0.85), rgba(8, 48, 70, 0.9)),
    url('/images/header-bg.jpg') center/cover no-repeat;
  border-radius: 18px 18px 0 0;
  min-height: 180px; /* Increased height by ~30% */
  position: relative;
  overflow: hidden;
}

/* Optional: Add a subtle pattern overlay */
.header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    radial-gradient(circle at 20% 80%, rgba(24, 122, 166, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(31, 182, 179, 0.1) 0%, transparent 50%);
  pointer-events: none;
}

.header h1 {
  font-size: 36px; /* Slightly larger for emphasis */
  color: #ffffff; /* Pure white for better contrast */
  margin: 0;
  letter-spacing: -0.5px;
  font-weight: 700;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.header .small {
  color: rgba(255, 255, 255, 0.9); /* Lighter muted text */
  font-size: 16px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.logo {
  width: 60px; /* Slightly larger logo */
  height: 60px;
  border-radius: 12px;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
  transition: transform 0.3s ease;
}

.logo:hover {
  transform: scale(1.05);
}

/* Update main wrap to accommodate header changes */
.wrap {
  width: 100%;
  max-width: 1100px;
  background: linear-gradient(180deg, rgba(255,255,255,0.9), rgba(255,255,255,0.95));
  border-radius: 18px;
  padding: 32px;
  box-shadow: 0 10px 30px rgba(16,38,49,0.12);
  margin: 40px auto;
  position: relative;
}

/* Responsive adjustments for header */
@media (max-width: 768px) {
  .header {
    margin: -20px -20px 32px -20px;
    padding: 30px 20px;
    min-height: 160px;
    flex-direction: column;
    gap: 16px;
    text-align: center;
  }
  
  .header h1 {
    font-size: 28px;
  }
  
  .header .small {
    font-size: 14px;
  }
  
  .logo {
    width: 50px;
    height: 50px;
  }
}

@media (max-width: 480px) {
  .header {
    padding: 25px 20px;
    min-height: 140px;
  }
  
  .header h1 {
    font-size: 24px;
  }
}

/* Navigation */
.nav {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.nav-btn {
  background: var(--card);
  border: 1px solid rgba(10,30,40,0.08);
  padding: 10px 16px;
  border-radius: 10px;
  text-decoration: none;
  color: var(--color-secondary);
  font-weight: 600;
  font-size: 14px;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-btn:hover {
  background: var(--color-secondary);
  color: white;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(24,122,166,0.3);
}

.nav-btn.active {
  background: var(--color-secondary);
  color: white;
}

/* Cards */
.card {
  background: var(--card);
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 6px 18px rgba(9,23,30,0.04);
  margin-bottom: 20px;
}

.card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(8,48,70,0.05);
}

.card-icon {
  width: 24px;
  height: 24px;
  background: var(--color-secondary);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: bold;
}

/* Grid Layout */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 16px;
  margin: 20px 0;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

/* Status Indicators */
.status-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.status {
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: space-between;
  padding: 12px;
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(8,59,80,0.02), rgba(8,59,80,0.01));
}

.status-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--color-success);
  box-shadow: 0 1px 0 rgba(255,255,255,0.2) inset;
}

.status-dot.alert { background: var(--color-alert); }
.status-dot.warning { background: var(--color-warning); }
.status-dot.disabled { background: var(--color-disabled); }

/* Badges */
.badges {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.badge {
  background: var(--card);
  border-radius: 999px;
  padding: 8px 12px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--muted);
  box-shadow: 0 4px 10px rgba(12,34,44,0.04);
}

.badge .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--color-accent);
  box-shadow: 0 1px 0 rgba(255,255,255,0.2) inset;
}

/* Buttons */
.btn {
  background: linear-gradient(180deg, var(--color-secondary), #0e6d93);
  border: none;
  color: white;
  padding: 10px 16px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(24,122,166,0.4);
}

.btn.secondary {
  background: transparent;
  border: 1px solid rgba(10,30,40,0.06);
  color: var(--color-secondary);
  font-weight: 600;
}

.btn.alert { background: var(--color-alert); }
.btn.success { background: var(--color-success); }
.btn.warning { background: var(--color-warning); }

/* Typography */
.mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, "Roboto Mono", monospace;
  font-size: 13px;
  color: var(--text);
}

.small {
  font-size: 13px;
  color: var(--muted);
}

.lead {
  font-size: 16px;
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 20px;
}

/* Connection Grid */
.connection-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 12px;
  margin: 16px 0;
}

.connection-item {
  background: rgba(8,59,80,0.02);
  border-radius: 8px;
  padding: 12px;
  border-left: 3px solid var(--color-secondary);
}

/* Code Samples */
.code-block {
  background: rgba(10,30,40,0.03);
  padding: 12px;
  border-radius: 8px;
  font-family: ui-monospace, monospace;
  font-size: 13px;
  line-height: 1.4;
  margin: 8px 0;
  overflow-x: auto;
}

/* Footer */
footer {
  margin-top: 32px;
  color: var(--muted);
  font-size: 13px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding-top: 20px;
  border-top: 1px solid rgba(8,48,70,0.05);
}

/* Responsive */
@media (max-width: 768px) {
  .wrap { padding: 20px; margin: 20px auto; }
  .grid-2 { grid-template-columns: 1fr; }
  .header { flex-direction: column; text-align: center; }
  .header h1 { font-size: 24px; }
  footer { flex-direction: column; text-align: center; }
  .nav { justify-content: center; }
}

/* Visual Elements */
/* Dark Visual Blocks */
.visual {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 32px 24px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--color-primary) 0%, #0a2a3a 100%);
  margin: 24px 0;
  position: relative;
  overflow: hidden;
}

.visual::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    radial-gradient(circle at 20% 80%, rgba(24, 122, 166, 0.2) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(31, 182, 179, 0.15) 0%, transparent 50%);
  pointer-events: none;
}

.visual > div {
  position: relative;
  z-index: 2;
  text-align: center;
}

.visual .emoji-icon {
  font-size: 48px;
  margin-bottom: 16px;
  display: block;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.visual h3 {
  color: #ffffff;
  margin-bottom: 8px;
  font-size: 24px;
  font-weight: 600;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.visual p.small {
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 20px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.visual .btn {
  font-size: 16px;
  padding: 12px 24px;
  background: linear-gradient(180deg, var(--color-secondary), #0e6d93);
  border: none;
  color: white;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 8px;
  font-weight: 600;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.visual .btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
}

.visual .small:last-of-type {
  color: rgba(255, 255, 255, 0.7);
  margin-top: 12px;
  font-size: 13px;
}

/* Alternative visual style with subtle border */
.visual.bordered {
  background: linear-gradient(135deg, rgba(8, 48, 70, 0.95) 0%, rgba(10, 42, 58, 0.95) 100%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .visual {
    padding: 24px 20px;
    margin: 20px 0;
  }
  
  .visual .emoji-icon {
    font-size: 40px;
  }
  
  .visual h3 {
    font-size: 20px;
  }
  
  .visual .btn {
    font-size: 14px;
    padding: 10px 20px;
  }
}