/* ============================================================
   CSS Variables
   ============================================================ */
:root {
  --bg-base:       #f3f4f6;
  --bg-surface:    #ffffff;
  --border:        #e5e7eb;
  --border-subtle: #f3f4f6;

  --text-primary:  #111827;
  --text-secondary:#6b7280;
  --text-mono:     #1f2937;

  --accent:        #e05a1a;
  --accent-dark:   #c44d14;

  --green:         #16a34a;

  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

  --shadow: 0 1px 3px rgba(0,0,0,0.06), 0 4px 16px rgba(0,0,0,0.04);
}

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

body {
  background: var(--bg-base);
  color: var(--text-primary);
  font-family: var(--font-sans);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ============================================================
   Header
   ============================================================ */
.site-header {
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border);
  padding: 0.65rem 1.5rem;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

.header-inner {
  max-width: 480px;
  margin: 0 auto;
  display: flex;
  align-items: center;
}

.site-logo { height: 34px; width: auto; display: block; }

.site-title {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.site-title .separator {
  width: 1px;
  height: 22px;
  background: var(--border);
}

.site-title .label {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.site-title .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 5px var(--green);
  animation: pulse 2s infinite;
  flex-shrink: 0;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.4; }
}

/* ============================================================
   Main
   ============================================================ */
.main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.5rem;
}

/* ============================================================
   Card
   ============================================================ */
.card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow);
  width: 100%;
  max-width: 480px;
  overflow: hidden;
}

.card-body { padding: 0; }

.card-footer {
  padding: 1rem 1.25rem;
  border-top: 1px solid var(--border-subtle);
}

/* ── Section label ── */
.section-label {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-secondary);
  padding: 0.6rem 1.25rem 0.4rem;
  border-top: 1px solid var(--border-subtle);
  background: #fafafa;
}

.section-label:first-child {
  border-top: none;
}

.section-note {
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
  opacity: 0.8;
}

/* ── Status badges ── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.2rem 0.55rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 500;
  font-family: var(--font-sans);
  white-space: nowrap;
}

.badge-green  { background: rgba(22,163,74,0.1);  color: #16a34a; }
.badge-red    { background: rgba(220,38,38,0.1);   color: #dc2626; }
.badge-yellow { background: rgba(217,119,6,0.1);   color: #d97706; }
.badge-gray   { background: rgba(107,114,128,0.1); color: #6b7280; }

/* ── Custom URL row ── */
.data-row-input {
  flex-wrap: wrap;
  gap: 0.5rem;
  min-height: auto;
  padding: 0.65rem 1.25rem;
}

.custom-check {
  display: flex;
  gap: 0.4rem;
  flex: 1;
  min-width: 0;
  justify-content: flex-end;
}

.url-input {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  padding: 0.3rem 0.55rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg-base);
  color: var(--text-primary);
  width: 200px;
  min-width: 0;
  outline: none;
}

.url-input:focus {
  border-color: var(--accent);
}

.btn-check {
  padding: 0.3rem 0.7rem;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 6px;
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
}

.btn-check:hover { background: var(--accent-dark); }

/* ============================================================
   Data Rows
   ============================================================ */
.data-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 1.25rem;
  border-bottom: 1px solid var(--border-subtle);
  min-height: 48px;
}

.data-label {
  font-size: 0.82rem;
  color: var(--text-secondary);
  white-space: nowrap;
  flex-shrink: 0;
}

.data-value {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--text-mono);
  text-align: right;
}

.data-value.unavailable {
  color: var(--text-secondary);
  font-family: var(--font-sans);
  font-style: italic;
}

/* ============================================================
   Skeleton loader
   ============================================================ */
.skeleton {
  background: linear-gradient(90deg, var(--border) 25%, #f9fafb 50%, var(--border) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
  border-radius: 3px;
  height: 0.75rem;
  width: 100px;
  display: inline-block;
}

@keyframes shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ============================================================
   Send button
   ============================================================ */
.btn-send {
  width: 100%;
  padding: 0.7rem 1rem;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}

.btn-send:hover  { background: var(--accent-dark); }
.btn-send:active { transform: scale(0.99); }
