/* Modern Dark Glassmorphism Design System for PWA PoC */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@500;600;700;800&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  /* Color Palette - HSL Tailored Obsidian & Electric Violet */
  --bg-dark: hsl(224, 28%, 7%);
  --bg-card: hsla(224, 25%, 12%, 0.7);
  --bg-card-hover: hsla(224, 25%, 16%, 0.85);
  --bg-surface: hsla(224, 20%, 18%, 0.6);
  
  --border-subtle: hsla(224, 20%, 90%, 0.08);
  --border-active: hsla(265, 90%, 65%, 0.4);

  --text-main: hsl(210, 20%, 98%);
  --text-muted: hsl(215, 15%, 65%);
  --text-dim: hsl(215, 12%, 45%);

  --color-primary: hsl(265, 90%, 65%);
  --color-primary-dark: hsl(265, 80%, 55%);
  --color-accent: hsl(190, 95%, 50%);
  --color-success: hsl(152, 75%, 48%);
  --color-warning: hsl(38, 95%, 55%);
  --color-danger: hsl(355, 85%, 60%);

  --gradient-brand: linear-gradient(135deg, hsl(265, 90%, 65%) 0%, hsl(315, 85%, 60%) 50%, hsl(190, 95%, 50%) 100%);
  --gradient-surface: linear-gradient(180deg, hsla(224, 25%, 16%, 0.5) 0%, hsla(224, 28%, 10%, 0.7) 100%);
  --gradient-glow: radial-gradient(circle at 50% 0%, hsla(265, 90%, 65%, 0.18), transparent 70%);

  /* Radius & Shadows */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;

  --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.25);
  --shadow-card: 0 12px 36px rgba(0, 0, 0, 0.4), inset 0 1px 0 hsla(0, 0%, 100%, 0.08);
  --shadow-btn: 0 6px 24px hsla(265, 90%, 65%, 0.35);

  --backdrop-blur: blur(16px);
}

/* Reset & Base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  color-scheme: dark;
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: var(--bg-dark);
  color: var(--text-main);
  line-height: 1.6;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
}

/* Background Ambient Glow */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100vw;
  height: 600px;
  background: var(--gradient-glow);
  pointer-events: none;
  z-index: 0;
}

/* App Container */
.app-container {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 860px;
  margin: 0 auto;
  padding: 24px 20px 48px;
  display: flex;
  flex-direction: column;
  gap: 28px;
  flex: 1;
}

/* Header & Status Bar */
header.app-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border-subtle);
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  background: var(--gradient-brand);
  padding: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px hsla(265, 90%, 65%, 0.3);
}

.brand-icon img {
  width: 100%;
  height: 100%;
  border-radius: 6px;
  object-fit: cover;
}

.brand-info h1 {
  font-family: 'Outfit', sans-serif;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-info .tagline {
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* Status Indicators */
.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  transition: all 0.3s ease;
}

.status-pill .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--color-danger);
}

.status-pill.online .dot {
  background-color: var(--color-success);
  box-shadow: 0 0 10px var(--color-success);
  animation: pulse-dot 2s infinite ease-in-out;
}

.status-pill.offline .dot {
  background-color: var(--color-danger);
  box-shadow: 0 0 10px var(--color-danger);
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.85); }
}

/* Main Hero Card */
.hero-card {
  background: var(--bg-card);
  backdrop-filter: var(--backdrop-blur);
  -webkit-backdrop-filter: var(--backdrop-blur);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  gap: 20px;
  position: relative;
  overflow: hidden;
}

.hero-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--gradient-brand);
}

.hero-header {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.hero-title {
  font-family: 'Outfit', sans-serif;
  font-size: 1.85rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-main);
  line-height: 1.2;
}

.hero-desc {
  color: var(--text-muted);
  font-size: 0.98rem;
  max-width: 620px;
}

/* Call to Action & Install Button */
.install-section {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  padding-top: 12px;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 26px;
  font-family: 'Outfit', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  color: #ffffff;
  background: var(--gradient-brand);
  border: none;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-btn);
  cursor: pointer;
  transition: transform 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.25s ease;
  user-select: none;
}

.btn-primary:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 8px 30px hsla(265, 90%, 65%, 0.55);
}

.btn-primary:active {
  transform: translateY(0) scale(0.98);
}

.btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text-main);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-secondary:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-active);
  transform: translateY(-1px);
}

.install-note {
  font-size: 0.84rem;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Feature Matrix Grid */
.grid-section-title {
  font-family: 'Outfit', sans-serif;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: -0.01em;
  margin-top: 8px;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}

.feature-card {
  background: var(--bg-card);
  backdrop-filter: var(--backdrop-blur);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 20px;
  transition: transform 0.25s ease, border-color 0.25s ease;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

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

.feature-icon {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  background: hsla(265, 90%, 65%, 0.12);
  color: var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  margin-bottom: 4px;
}

.feature-card h3 {
  font-family: 'Outfit', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-main);
}

.feature-card p {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* Diagnostics & Verification Panel */
.diagnostics-panel {
  background: var(--bg-card);
  backdrop-filter: var(--backdrop-blur);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.panel-header h2 {
  font-family: 'Outfit', sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}

.diag-table {
  width: 100%;
  border-collapse: collapse;
}

.diag-table tr {
  border-bottom: 1px solid var(--border-subtle);
}

.diag-table tr:last-child {
  border-bottom: none;
}

.diag-table td {
  padding: 12px 6px;
  font-size: 0.88rem;
}

.diag-table td:first-child {
  color: var(--text-muted);
  font-weight: 500;
  width: 45%;
}

.diag-table td:last-child {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.82rem;
  text-align: right;
  color: var(--text-main);
}

.badge-tag {
  display: inline-block;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.badge-tag.pass {
  background: hsla(152, 75%, 48%, 0.15);
  color: var(--color-success);
  border: 1px solid hsla(152, 75%, 48%, 0.3);
}

.badge-tag.pending {
  background: hsla(38, 95%, 55%, 0.15);
  color: var(--color-warning);
  border: 1px solid hsla(38, 95%, 55%, 0.3);
}

.badge-tag.fail {
  background: hsla(355, 85%, 60%, 0.15);
  color: var(--color-danger);
  border: 1px solid hsla(355, 85%, 60%, 0.3);
}

/* Console Event Logger */
.event-logger {
  background: hsl(224, 30%, 5%);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.78rem;
  max-height: 180px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.log-entry {
  display: flex;
  gap: 8px;
  color: var(--text-muted);
}

.log-entry .time {
  color: var(--text-dim);
}

.log-entry.info .msg {
  color: var(--color-accent);
}

.log-entry.success .msg {
  color: var(--color-success);
}

.log-entry.warn .msg {
  color: var(--color-warning);
}

/* App Footer */
footer.app-footer {
  text-align: center;
  font-size: 0.82rem;
  color: var(--text-dim);
  padding-top: 24px;
  border-top: 1px solid var(--border-subtle);
}

/* Responsive adjustments */
@media (max-width: 640px) {
  .hero-title {
    font-size: 1.5rem;
  }
  .app-container {
    padding: 16px 14px 32px;
  }
  .diag-table td:first-child {
    width: 40%;
  }
}
