/* NearTap Modern Theme Design Tokens */
:root {
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --bg-dark: #0f172a;
  --bg-card: rgba(30, 41, 59, 0.7);
  --bg-card-border: rgba(255, 255, 255, 0.1);
  --primary-accent: #6366f1;
  --primary-glow: rgba(99, 102, 241, 0.35);
  --secondary-accent: #a855f7;
  --success-emerald: #10b981;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  --input-bg: rgba(15, 23, 42, 0.6);
  --radius-lg: 20px;
  --radius-md: 12px;
  --radius-sm: 8dp;
}

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

body {
  font-family: var(--font-family);
  background-color: var(--bg-dark);
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 2rem 1rem;
  background-image: 
    radial-gradient(circle at 15% 15%, rgba(99, 102, 241, 0.15) 0%, transparent 40%),
    radial-gradient(circle at 85% 75%, rgba(168, 85, 247, 0.15) 0%, transparent 40%);
  background-attachment: fixed;
}

.container {
  width: 100%;
  max-width: 900px;
}

/* Header & Hero */
header {
  text-align: center;
  margin-bottom: 2.5rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 1rem;
  border-radius: 9999px;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: var(--success-emerald);
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 1.25rem;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  background-color: var(--success-emerald);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--success-emerald);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { transform: scale(0.95); opacity: 0.8; }
  50% { transform: scale(1.2); opacity: 1; }
  100% { transform: scale(0.95); opacity: 0.8; }
}

h1 {
  font-size: 2.75rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #ffffff 0%, #cbd5e1 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 0.75rem;
}

h1 span {
  background: linear-gradient(135deg, var(--primary-accent) 0%, var(--secondary-accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.subtitle {
  color: var(--text-muted);
  font-size: 1.1rem;
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.6;
}

/* Main Grid Layout */
.grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 768px) {
  .grid {
    grid-template-columns: 3fr 2fr;
  }
}

/* Glassmorphism Cards */
.card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--bg-card-border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card-title {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

/* Interactive Testing Form */
.form-group {
  margin-bottom: 1.25rem;
}

label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

input, select {
  width: 100%;
  padding: 0.85rem 1rem;
  background: var(--input-bg);
  border: 1px solid var(--bg-card-border);
  border-radius: var(--radius-md);
  color: var(--text-main);
  font-size: 0.95rem;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input:focus {
  border-color: var(--primary-accent);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

.btn-group {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1.5rem;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  border: none;
  transition: all 0.2s ease;
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary-accent) 0%, #4f46e5 100%);
  color: #fff;
  box-shadow: 0 4px 15px var(--primary-glow);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px var(--primary-glow);
}

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

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

/* Preset Links */
.presets {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 0.75rem;
}

.preset-chip {
  padding: 0.4rem 0.8rem;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
  font-size: 0.82rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.preset-chip:hover {
  background: rgba(99, 102, 241, 0.15);
  color: #fff;
  border-color: var(--primary-accent);
}

/* Live Inspector Output */
.code-block {
  background: #090d16;
  border: 1px solid var(--bg-card-border);
  border-radius: var(--radius-md);
  padding: 1rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.85rem;
  color: #38bdf8;
  word-break: break-all;
  white-space: pre-wrap;
  max-height: 240px;
  overflow-y: auto;
}

/* Footer */
footer {
  margin-top: 3rem;
  text-align: center;
  color: var(--text-dim);
  font-size: 0.85rem;
}

footer a {
  color: var(--text-muted);
  text-decoration: underline;
}
