/* ==========================================================================
   ServerPulse — Minimalist Browser Extension Homepage Styles
   ========================================================================== */

:root {
  --bg-main: #0c0d10;
  --bg-card: #18191d;
  --bg-card-widget: #1c1e22;
  --bg-subtle: rgba(255, 255, 255, 0.03);
  --bg-hover: rgba(255, 255, 255, 0.06);

  --border-subtle: rgba(255, 255, 255, 0.07);
  --border-strong: rgba(255, 255, 255, 0.14);

  --text-main: #f3f4f6;
  --text-secondary: #9ca3af;
  --text-muted: #6b7280;
  
  --accent-cyan: #38bdf8;
  --accent-green: #10b981;

  --btn-widget-primary: #323742;
  --btn-widget-primary-hover: #3f4553;
  --btn-widget-secondary: #252830;
  --btn-widget-secondary-hover: #2e323c;

  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-full: 9999px;
}

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

html {
  font-family: var(--font-sans);
  background-color: var(--bg-main);
  color: var(--text-main);
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: 
    radial-gradient(ellipse 60% 40% at 50% -10%, rgba(56, 189, 248, 0.07), transparent 70%),
    radial-gradient(ellipse 50% 30% at 50% 100%, rgba(255, 255, 255, 0.02), transparent 70%),
    var(--bg-main);
  background-attachment: fixed;
  overflow-x: hidden;
}

/* ==========================================================================
   Navigation Bar
   ========================================================================== */

.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  background-color: rgba(12, 13, 16, 0.75);
  border-bottom: 1px solid var(--border-subtle);
}

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

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text-main);
}

.brand-logo {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.2), rgba(56, 189, 248, 0.05));
  border: 1px solid rgba(56, 189, 248, 0.3);
  display: grid;
  place-items: center;
  color: var(--accent-cyan);
}

.brand-logo svg {
  width: 18px;
  height: 18px;
}

.brand-name {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav-links a {
  text-decoration: none;
  font-size: 13.5px;
  color: var(--text-secondary);
  font-weight: 500;
  transition: color 0.15s ease;
}

.nav-links a:hover {
  color: var(--text-main);
}

.btn-install {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background-color: rgba(255, 255, 255, 0.08);
  color: var(--text-main);
  border: 1px solid var(--border-strong);
  padding: 7px 14px;
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-install:hover {
  background-color: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.25);
  transform: translateY(-1px);
}

.btn-icon {
  width: 14px;
  height: 14px;
}

/* ==========================================================================
   Hero Section
   ========================================================================== */

.main-wrapper {
  flex: 1;
  max-width: 1100px;
  margin: 0 auto;
  padding: 60px 24px 80px;
  width: 100%;
}

.hero-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding-bottom: 70px;
}

.hero-header {
  max-width: 640px;
  margin-bottom: 40px;
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 20px;
}

.pulse-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: var(--accent-green);
  box-shadow: 0 0 8px var(--accent-green);
}

.hero-title {
  font-size: clamp(34px, 5vw, 48px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-bottom: 16px;
}

.highlight-text {
  color: var(--text-secondary);
  font-weight: 500;
}

.hero-subtitle {
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-secondary);
  font-weight: 400;
}

/* ==========================================================================
   Extension Widget Card (Exact Reproduction of User Reference)
   ========================================================================== */

.widget-showcase-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  width: 100%;
}

.widget-card {
  width: 100%;
  max-width: 320px;
  background-color: var(--bg-card-widget);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 22px 20px 18px;
  box-shadow: 
    0 12px 36px -6px rgba(0, 0, 0, 0.6),
    0 0 0 1px rgba(255, 255, 255, 0.04);
  display: flex;
  flex-direction: column;
  gap: 14px;
  text-align: left;
  user-select: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.widget-card:hover {
  transform: translateY(-2px);
  box-shadow: 
    0 16px 44px -6px rgba(0, 0, 0, 0.7),
    0 0 0 1px rgba(255, 255, 255, 0.08);
}

/* Avatars Grid */
.avatars-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px 10px;
  justify-items: center;
  margin-bottom: 2px;
}

.avatar-item {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background-color: #2b2f38;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 2px solid #1c1e22;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
  cursor: pointer;
  transition: transform 0.15s ease;
}

.avatar-item:hover {
  transform: scale(1.06);
}

.avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.avatar-overflow {
  background-color: #383e4a;
  color: #f3f4f6;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

/* Capacity Headline */
.capacity-header {
  margin-top: 4px;
}

.capacity-count {
  font-size: 19px;
  font-weight: 600;
  color: #ffffff;
  letter-spacing: -0.02em;
}

/* Info List */
.info-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.info-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  font-weight: 500;
  color: #f1f3f7;
}

.info-icon {
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  flex-shrink: 0;
}

.info-icon svg {
  width: 18px;
  height: 18px;
}

.info-flag {
  font-size: 18px;
  line-height: 1;
  width: 22px;
  text-align: center;
  flex-shrink: 0;
}

.info-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.info-label strong {
  font-weight: 600;
  color: #ffffff;
}

/* Progress Track */
.progress-track {
  width: 100%;
  height: 6px;
  background-color: #2b2f38;
  border-radius: var(--radius-full);
  overflow: hidden;
  margin: 4px 0 2px;
}

.progress-fill {
  height: 100%;
  background-color: #b2b8c5;
  border-radius: var(--radius-full);
  transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Action Buttons */
.widget-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 2px;
}

.btn-widget {
  width: 100%;
  padding: 9px 12px;
  border-radius: 7px;
  font-size: 14px;
  font-weight: 600;
  border: 1px solid rgba(255, 255, 255, 0.05);
  cursor: pointer;
  transition: all 0.15s ease;
  text-align: center;
}

.btn-join {
  background-color: var(--btn-widget-primary);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.08);
}

.btn-join:hover {
  background-color: var(--btn-widget-primary-hover);
  border-color: rgba(255, 255, 255, 0.15);
}

.btn-join:active {
  transform: scale(0.98);
}

.btn-share {
  background-color: var(--btn-widget-secondary);
  color: #d1d5db;
}

.btn-share:hover {
  background-color: var(--btn-widget-secondary-hover);
  color: #ffffff;
}

.btn-share:active {
  transform: scale(0.98);
}

/* Server ID Footer */
.server-id-footer {
  display: flex;
  align-items: center;
  gap: 4px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: #8e95a5;
  margin-top: 2px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 3px 0;
  transition: color 0.15s ease;
}

.server-id-footer:hover {
  color: #cbd5e1;
}

.id-prefix {
  font-weight: 600;
}

.id-value {
  overflow: hidden;
  text-overflow: ellipsis;
}

.id-copy-badge {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  background-color: var(--accent-green);
  color: #000000;
  font-family: var(--font-sans);
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.id-copy-badge.visible {
  opacity: 1;
}

/* ==========================================================================
   Server Picker (Interactive Switcher)
   ========================================================================== */

.server-picker {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 4px;
}

.picker-label {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
}

.picker-pill {
  padding: 4px 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
}

.picker-pill:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.08);
}

.picker-pill.active {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.24);
  color: var(--text-main);
}

/* ==========================================================================
   Features Section
   ========================================================================== */

.features-section {
  padding: 80px 0 60px;
  border-top: 1px solid var(--border-subtle);
}

.section-heading {
  text-align: center;
  max-width: 500px;
  margin: 0 auto 50px;
}

.section-title {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}

.section-subtitle {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
}

.feature-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.feature-card:hover {
  border-color: var(--border-strong);
  transform: translateY(-2px);
}

.feature-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  display: grid;
  place-items: center;
  color: var(--accent-cyan);
}

.feature-icon svg {
  width: 18px;
  height: 18px;
}

.feature-title {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text-main);
}

.feature-desc {
  font-size: 13px;
  line-height: 1.55;
  color: var(--text-secondary);
}

/* ==========================================================================
   Call To Action (CTA) Section
   ========================================================================== */

.cta-section {
  padding: 40px 0 20px;
}

.cta-card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.03) 0%, rgba(255, 255, 255, 0.01) 100%);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 48px 24px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.cta-title {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.cta-subtitle {
  font-size: 14px;
  color: var(--text-secondary);
  max-width: 440px;
}

.cta-buttons {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
  flex-wrap: wrap;
  justify-content: center;
}

.btn-primary {
  background-color: var(--text-main);
  color: #000000;
  padding: 10px 20px;
  border-radius: var(--radius-full);
  font-size: 13.5px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-primary:hover {
  background-color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(255, 255, 255, 0.2);
}

.btn-secondary {
  text-decoration: none;
  background: transparent;
  color: var(--text-secondary);
  padding: 10px 18px;
  border-radius: var(--radius-full);
  font-size: 13.5px;
  font-weight: 500;
  border: 1px solid var(--border-subtle);
  transition: all 0.15s ease;
}

.btn-secondary:hover {
  color: var(--text-main);
  border-color: var(--border-strong);
}

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
  border-top: 1px solid var(--border-subtle);
  padding: 30px 24px;
  background-color: rgba(12, 13, 16, 0.6);
}

.footer-container {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.footer-brand {
  font-size: 13px;
  font-weight: 600;
}

.footer-muted {
  font-size: 12px;
  color: var(--text-muted);
}

.footer-links {
  display: flex;
  gap: 20px;
}

.footer-links a {
  text-decoration: none;
  font-size: 12px;
  color: var(--text-muted);
  transition: color 0.15s ease;
}

.footer-links a:hover {
  color: var(--text-secondary);
}

/* ==========================================================================
   Responsive Rules
   ========================================================================== */

@media (max-width: 640px) {
  .nav-links {
    display: none;
  }
  .main-wrapper {
    padding: 36px 16px 60px;
  }
  .hero-section {
    padding-bottom: 50px;
  }
  .widget-card {
    max-width: 100%;
  }
  .footer-container {
    flex-direction: column;
    align-items: flex-start;
  }
}
