/* ===== WildNDGo Tools - Design System ===== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

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

:root {
  --bg-body: #0a0a14;
  --bg-surface: #111122;
  --bg-card: rgba(255,255,255,0.03);
  --bg-input: #0d0d1a;
  --border: rgba(255,255,255,0.07);
  --border-focus: rgba(139,92,246,0.5);
  --text-1: #e2e8f0;
  --text-2: #94a3b8;
  --text-3: #64748b;
  --accent: #8b5cf6;
  --accent2: #06b6d4;
  --gradient: linear-gradient(135deg, #8b5cf6, #06b6d4);
  --success: #10b981;
  --danger: #ef4444;
  --radius: 12px;
  --radius-lg: 16px;
  --shadow: 0 8px 32px rgba(0,0,0,0.5);
  --transition: all 0.3s cubic-bezier(0.4,0,0.2,1);
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-body);
  color: var(--text-1);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

body::before {
  content: '';
  position: fixed; top: -50%; left: -50%;
  width: 200%; height: 200%;
  background: radial-gradient(ellipse at 20% 50%, rgba(139,92,246,0.08) 0%, transparent 50%),
              radial-gradient(ellipse at 80% 20%, rgba(6,182,212,0.06) 0%, transparent 50%);
  pointer-events: none; z-index: 0;
  animation: bgShift 20s ease-in-out infinite alternate;
}
@keyframes bgShift {
  0% { transform: translate(0, 0) rotate(0deg); }
  100% { transform: translate(-5%, 3%) rotate(3deg); }
}

.container { max-width: 1100px; margin: 0 auto; padding: 0 24px; position: relative; z-index: 1; }

/* ===== NAVBAR ===== */
.navbar {
  position: sticky; top: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 32px;
  background: rgba(10,10,20,0.8);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.logo-icon { font-size: 24px; filter: drop-shadow(0 0 8px rgba(139,92,246,0.5)); }
.logo-text {
  font-size: 20px; font-weight: 700; color: var(--text-1);
  background: var(--gradient); -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.logo-badge {
  font-size: 11px; font-weight: 600; padding: 2px 8px;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 20px; color: var(--text-2);
}
.nav-home {
  color: var(--text-2); text-decoration: none; font-size: 14px; font-weight: 500;
  padding: 6px 16px; border-radius: 8px; transition: var(--transition);
}
.nav-home:hover { color: var(--text-1); background: var(--bg-card); }

/* ===== HERO ===== */
.hero {
  text-align: center; padding: 80px 0 50px;
}
.hero h1 { font-size: clamp(2rem, 5vw, 3.2rem); font-weight: 700; margin-bottom: 16px; letter-spacing: -0.02em; }
.gradient-text {
  background: var(--gradient); -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.hero p { font-size: 18px; color: var(--text-2); max-width: 500px; margin: 0 auto; }

/* ===== TOOL GRID ===== */
.tools-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px; padding-bottom: 80px;
}
.tool-card {
  display: flex; flex-direction: column; gap: 10px;
  padding: 28px; border-radius: var(--radius-lg);
  background: var(--bg-card);
  border: 1px solid var(--border);
  text-decoration: none; color: var(--text-1);
  transition: var(--transition);
  position: relative; overflow: hidden;
}
.tool-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: var(--gradient); opacity: 0; transition: var(--transition);
}
.tool-card:hover {
  transform: translateY(-4px);
  border-color: rgba(139,92,246,0.3);
  box-shadow: 0 12px 40px rgba(139,92,246,0.1);
}
.tool-card:hover::before { opacity: 1; }
.tool-icon { font-size: 32px; margin-bottom: 4px; }
.tool-card h3 { font-size: 17px; font-weight: 600; }
.tool-card p { font-size: 13px; color: var(--text-2); line-height: 1.5; }

/* ===== TOOL PAGE ===== */
.tool-page { padding: 40px 0 80px; }
.tool-page h1 { font-size: 28px; font-weight: 700; margin-bottom: 8px; }
.tool-desc { color: var(--text-2); margin-bottom: 32px; font-size: 15px; }

.tool-container {
  display: flex; flex-direction: column; gap: 20px;
}
.tool-row {
  display: grid; grid-template-columns: 1fr 1fr; gap: 20px;
}
@media (max-width: 768px) { .tool-row { grid-template-columns: 1fr; } }

.tool-panel {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 24px;
}
.panel-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 14px;
}
.panel-label { font-size: 13px; font-weight: 600; color: var(--text-2); text-transform: uppercase; letter-spacing: 0.05em; }

/* ===== FORM ELEMENTS ===== */
textarea, input[type="text"], input[type="number"], select {
  width: 100%; padding: 14px 16px; font-size: 14px;
  font-family: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', monospace;
  background: var(--bg-input); color: var(--text-1);
  border: 1px solid var(--border); border-radius: var(--radius);
  outline: none; transition: var(--transition); resize: vertical;
}
textarea:focus, input:focus, select:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(139,92,246,0.15);
}
textarea { min-height: 200px; line-height: 1.6; }
textarea.short { min-height: 120px; }
select { cursor: pointer; appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%2394a3b8' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 36px; }

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 20px; font-size: 14px; font-weight: 500;
  border: none; border-radius: var(--radius); cursor: pointer;
  font-family: 'Inter', sans-serif; transition: var(--transition);
}
.btn-primary {
  background: var(--gradient); color: white;
  box-shadow: 0 4px 15px rgba(139,92,246,0.3);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(139,92,246,0.4); }
.btn-primary:active { transform: translateY(0); }

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

.btn-copy {
  padding: 6px 12px; font-size: 12px;
  background: transparent; color: var(--accent); border: 1px solid var(--accent);
  border-radius: 6px; cursor: pointer; font-family: 'Inter', sans-serif;
  transition: var(--transition);
}
.btn-copy:hover { background: rgba(139,92,246,0.1); }
.btn-copy.copied { background: var(--success); color: white; border-color: var(--success); }

.btn-group { display: flex; gap: 10px; flex-wrap: wrap; }

/* ===== STATS ROW ===== */
.stats-row {
  display: flex; gap: 16px; flex-wrap: wrap;
}
.stat-card {
  flex: 1; min-width: 120px; padding: 16px;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); text-align: center;
}
.stat-value { font-size: 28px; font-weight: 700; background: var(--gradient); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.stat-label { font-size: 12px; color: var(--text-3); margin-top: 4px; text-transform: uppercase; letter-spacing: 0.05em; }

/* ===== COLOR PREVIEW ===== */
.color-preview {
  width: 100%; height: 80px; border-radius: var(--radius);
  border: 1px solid var(--border); transition: var(--transition);
}
.color-inputs { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }
@media (max-width: 600px) { .color-inputs { grid-template-columns: 1fr; } }
.color-field label { display: block; font-size: 12px; color: var(--text-3); margin-bottom: 6px; text-transform: uppercase; }

/* ===== MARKDOWN PREVIEW ===== */
.md-preview {
  padding: 20px; min-height: 200px; line-height: 1.8;
  background: var(--bg-input); border: 1px solid var(--border); border-radius: var(--radius);
}
.md-preview h1, .md-preview h2, .md-preview h3 { margin: 16px 0 8px; color: var(--text-1); }
.md-preview p { margin-bottom: 12px; color: var(--text-2); }
.md-preview code { background: rgba(139,92,246,0.15); padding: 2px 6px; border-radius: 4px; font-size: 13px; }
.md-preview pre { background: var(--bg-surface); padding: 16px; border-radius: 8px; overflow-x: auto; margin: 12px 0; }
.md-preview pre code { background: none; padding: 0; }
.md-preview a { color: var(--accent); }
.md-preview ul, .md-preview ol { padding-left: 24px; margin-bottom: 12px; color: var(--text-2); }
.md-preview blockquote { border-left: 3px solid var(--accent); padding-left: 16px; color: var(--text-3); margin: 12px 0; }

/* ===== QR CODE ===== */
.qr-output { display: flex; justify-content: center; padding: 32px; background: white; border-radius: var(--radius); }
.qr-output img { border-radius: 4px; }

/* ===== TOAST ===== */
.toast {
  position: fixed; bottom: 30px; left: 50%; transform: translateX(-50%) translateY(20px);
  padding: 12px 24px; background: var(--success); color: white;
  border-radius: 8px; font-size: 14px; font-weight: 500;
  opacity: 0; transition: all 0.3s ease; z-index: 9999;
  box-shadow: 0 8px 30px rgba(16,185,129,0.3);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ===== FOOTER ===== */
.footer {
  text-align: center; padding: 40px 0;
  border-top: 1px solid var(--border);
  color: var(--text-3); font-size: 13px;
}

/* ===== 404 ===== */
.page-404 { text-align: center; padding: 120px 0; }
.page-404 h1 { font-size: 80px; background: var(--gradient); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.page-404 p { color: var(--text-2); margin: 16px 0 32px; }

/* ===== ANIMATIONS ===== */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
.tool-card { animation: fadeInUp 0.5s ease both; }
.tool-card:nth-child(1) { animation-delay: 0.05s; }
.tool-card:nth-child(2) { animation-delay: 0.1s; }
.tool-card:nth-child(3) { animation-delay: 0.15s; }
.tool-card:nth-child(4) { animation-delay: 0.2s; }
.tool-card:nth-child(5) { animation-delay: 0.25s; }
.tool-card:nth-child(6) { animation-delay: 0.3s; }
.tool-card:nth-child(7) { animation-delay: 0.35s; }
.tool-card:nth-child(8) { animation-delay: 0.4s; }
.tool-card:nth-child(9) { animation-delay: 0.45s; }
.tool-card:nth-child(10) { animation-delay: 0.5s; }

.tool-page .tool-container { animation: fadeInUp 0.4s ease both; }
