@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  --bg-primary: #f1f5f9;
  --bg-card: rgba(255, 255, 255, 0.8);
  --bg-card-hover: rgba(255, 255, 255, 0.95);
  --border-color: rgba(148, 163, 184, 0.2);
  --border-glow: rgba(79, 70, 229, 0.2);
  
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;
  
  --color-primary: dodgerblue; /* dodgerblue */
  --color-secondary: #7c3aed; /* Purple */
  --color-accent: #0891b2; /* Cyan */
  --color-success: #10b981; /* Emerald */
  --color-error: #ef4444; /* Red */
  
  --gradient-glow: linear-gradient(135deg, var(--color-primary), var(--color-secondary), var(--color-accent));
}

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

body {
  font-family: 'Outfit', sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow-x: hidden;
  position: relative;
  padding: 2rem 1rem;
}

/* Background decorative blur shapes */
body::before, body::after {
  content: '';
  position: absolute;
  width: 350px;
  height: 350px;
  border-radius: 50%;
  filter: blur(100px);
  z-index: -1;
  opacity: 0.25;
  pointer-events: none;
}

body::before {
  top: 10%;
  left: 15%;
  background: #c7d2fe; /* Light indigo */
  animation: float 20s infinite alternate;
}

body::after {
  bottom: 10%;
  right: 15%;
  background: #c5f2f7; /* Light cyan */
  animation: float 25s infinite alternate-reverse;
}

@keyframes float {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(50px, 30px) scale(1.1); }
}

.container {
  width: 100%;
  max-width: 800px;
  z-index: 10;
}

header {
  text-align: center;
  margin-bottom: 2.5rem;
  animation: fadeInDown 0.8s ease-out;
}

.title-gradient {
  font-size: 3rem;
  font-weight: 700;
  background: linear-gradient(135deg, #1e1b4b 20%, #4f46e5 60%, #0891b2 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 0.5rem;
  letter-spacing: -0.02em;
}

header p {
  color: var(--text-secondary);
  font-size: 1.1rem;
  font-weight: 400;
}

/* Glassmorphism Card styling */
.card {
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-color);
  border-radius: 24px;
  padding: 2.5rem;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.05), 
              0 1px 3px rgba(15, 23, 42, 0.02),
              inset 0 1px 0 rgba(255, 255, 255, 0.6);
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
  margin-bottom: 2rem;
}

.card:hover {
  transform: translateY(-4px);
  border-color: rgba(79, 70, 229, 0.3);
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.1), 
              0 0 30px rgba(79, 70, 229, 0.05),
              inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: var(--gradient-glow);
}

/* Grid Layout for details */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.info-box {
  background: rgba(0, 0, 0, 0.02);
  border: 1px solid rgba(0, 0, 0, 0.04);
  padding: 1.25rem;
  border-radius: 16px;
  transition: all 0.3s ease;
}

.info-box:hover {
  background: rgba(0, 0, 0, 0.03);
  border-color: rgba(0, 0, 0, 0.08);
  transform: scale(1.02);
}

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

.info-value {
  font-size: 1.1rem;
  color: var(--text-primary);
  font-weight: 600;
}

.mono {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.95rem;
  color: var(--color-primary);
}

/* Action controls */
.controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 2rem;
  flex-wrap: wrap;
  gap: 1rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.btn {
  background: var(--color-primary);
  color: #fff;
  border: none;
  padding: 0.8rem 1.6rem;
  border-radius: 12px;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.2);
}

.btn:hover {
  background: #4338ca;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(79, 70, 229, 0.3);
}

.btn:active {
  transform: translateY(1px);
}

.btn-secondary {
  background: rgba(0, 0, 0, 0.04);
  border: 1px solid rgba(0, 0, 0, 0.08);
  color: var(--text-primary);
  box-shadow: none;
}

.btn-secondary:hover {
  background: rgba(0, 0, 0, 0.08);
  border-color: rgba(0, 0, 0, 0.12);
  box-shadow: none;
}

.toggle-container {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
  user-select: none;
}

.checkbox-switch {
  position: relative;
  width: 44px;
  height: 24px;
  background: rgba(0, 0, 0, 0.1);
  border-radius: 12px;
  transition: background 0.3s;
}

.checkbox-switch::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.3s;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

input[type="checkbox"] {
  display: none;
}

input[type="checkbox"]:checked + .checkbox-switch {
  background: var(--color-success);
}

input[type="checkbox"]:checked + .checkbox-switch::after {
  transform: translateX(20px);
}

.toggle-label {
  font-size: 0.9rem;
  color: var(--text-secondary);
  font-weight: 600;
}

/* Spinner and Loaders */
.spinner {
  width: 20px;
  height: 20px;
  border: 2.5px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: #fff;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Skeleton Loading State */
.skeleton {
  background: linear-gradient(90deg, 
    rgba(0,0,0,0.03) 25%, 
    rgba(0,0,0,0.06) 50%, 
    rgba(0,0,0,0.03) 75%
  );
  background-size: 200% 100%;
  animation: loading 1.5s infinite;
  border-radius: 8px;
}

.skeleton-text {
  height: 1.25rem;
  margin-bottom: 0.75rem;
}

.skeleton-title {
  height: 2.5rem;
  width: 70%;
  margin-bottom: 1.5rem;
}

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

/* JSON visualizer */
.json-container {
  background: #0f172a;
  border: 1px solid rgba(0, 0, 0, 0.05);
  border-radius: 16px;
  padding: 1.5rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
  line-height: 1.5;
  overflow-x: auto;
  color: #38bdf8;
  max-height: 300px;
  margin-top: 1.5rem;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
}

.json-key { color: #f43f5e; }
.json-value { color: #34d399; }
.json-string { color: #38bdf8; }
.json-number { color: #fbbf24; }
.json-boolean { color: #60a5fa; }

/* Tabs for switching views */
.tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  padding-bottom: 0.5rem;
}

.tab-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 0.5rem 1rem;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  border-radius: 8px;
  transition: all 0.2s;
}

.tab-btn.active {
  color: var(--color-primary);
  background: rgba(79, 70, 229, 0.08);
}

.tab-btn:hover:not(.active) {
  color: var(--text-secondary);
}

/* Animations */
@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

footer a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color 0.2s;
}

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

.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  background: rgba(79, 70, 229, 0.1);
  border: 1px solid rgba(79, 70, 229, 0.2);
  color: var(--color-primary);
}
.badge-secondary {
  background: rgba(8, 145, 178, 0.1);
  border: 1px solid rgba(8, 145, 178, 0.2);
  color: var(--color-accent);
}
