/* ===============
   DESIGN SYSTEM
   =============== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
  /* Colors */
  --c-primary: #6366f1; /* Indigo */
  --c-primary-hover: #4f46e5;
  --c-secondary: #ec4899; /* Pink */
  --c-accent: #14b8a6; /* Teal */
  
  /* Light Mode Variables */
  --bg-body: #f8fafc;
  --bg-card: rgba(255, 255, 255, 0.7);
  --bg-nav: rgba(255, 255, 255, 0.8);
  --t-main: #0f172a;
  --t-muted: #64748b;
  --border-color: rgba(15, 23, 42, 0.1);
  --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 10px 25px -3px rgba(0, 0, 0, 0.1);
  --glass-border: 1px solid rgba(255, 255, 255, 0.5);
  
  /* Layout */
  --radius: 16px;
  --radius-sm: 8px;
  --radius-lg: 24px;
  --max-w: 1200px;
  --nav-height: 70px;
  
  /* Transitions */
  --trans-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --trans-smooth: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Dark Mode Variables */
[data-theme='dark'] {
  --bg-body: #0f172a;
  --bg-card: rgba(30, 41, 59, 0.7);
  --bg-nav: rgba(15, 23, 42, 0.8);
  --t-main: #f8fafc;
  --t-muted: #94a3b8;
  --border-color: rgba(255, 255, 255, 0.1);
  --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 10px 25px -3px rgba(0, 0, 0, 0.5);
  --glass-border: 1px solid rgba(255, 255, 255, 0.05);
}

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

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--bg-body);
  color: var(--t-main);
  line-height: 1.6;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  transition: background-color var(--trans-smooth), color var(--trans-smooth);
  overflow-x: hidden;
}

/* Background Gradients (Modern Feel) */
body::before {
  content: '';
  position: fixed;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at 50% 50%, rgba(99, 102, 241, 0.05), transparent 60%),
              radial-gradient(circle at 80% 20%, rgba(236, 72, 153, 0.05), transparent 40%);
  z-index: -1;
  pointer-events: none;
}

[data-theme='dark'] body::before {
  background: radial-gradient(circle at 50% 50%, rgba(99, 102, 241, 0.1), transparent 60%),
              radial-gradient(circle at 80% 20%, rgba(236, 72, 153, 0.1), transparent 40%);
}

h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 0.5em;
  color: var(--t-main);
}

p {
  margin-bottom: 1rem;
  color: var(--t-muted);
}

a {
  color: var(--c-primary);
  text-decoration: none;
  transition: color var(--trans-fast);
}

a:hover {
  color: var(--c-primary-hover);
}

/* Glassmorphism Classes */
.glass {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: var(--glass-border);
  box-shadow: var(--shadow-sm);
  border-radius: var(--radius);
}

.glass-nav {
  background: var(--bg-nav);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: var(--border-color) 1px solid;
}

/* Utilities */
.container {
  max-w: var(--max-w);
  margin: 0 auto;
  padding: 0 1.5rem;
  width: 100%;
}

.text-gradient {
  background: linear-gradient(135deg, var(--c-primary), var(--c-secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--trans-fast);
  border: none;
  font-family: inherit;
  font-size: 1rem;
  gap: 0.5rem;
}

.btn-primary {
  background: linear-gradient(135deg, var(--c-primary), var(--c-primary-hover));
  color: white;
  box-shadow: 0 4px 14px 0 rgba(99, 102, 241, 0.39);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px 0 rgba(99, 102, 241, 0.39);
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--t-main);
}

.btn-outline:hover {
  border-color: var(--c-primary);
  color: var(--c-primary);
}

/* Navigation */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-height);
  display: flex;
  align-items: center;
}

.nav-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.logo {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.logo span {
  font-size: 1rem;
  font-weight: 500;
  color: var(--t-muted);
}

.nav-links {
  display: flex;
  gap: 1.5rem;
  list-style: none;
}

.nav-links a {
  color: var(--t-main);
  font-weight: 500;
  font-size: 0.95rem;
}

.nav-links a:hover {
  color: var(--c-primary);
}

.theme-toggle {
  background: none;
  border: none;
  color: var(--t-main);
  cursor: pointer;
  padding: 8px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--trans-fast);
}

.theme-toggle:hover {
  background: var(--border-color);
}

/* Main Layout */
.main-wrapper {
  min-height: calc(100vh - var(--nav-height) - 100px); /* rough footer */
  padding: 3rem 0;
}

/* Forms & Inputs */
.form-group {
  margin-bottom: 1.5rem;
}

.form-label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--t-main);
  font-size: 0.95rem;
}

.form-input {
  width: 100%;
  padding: 0.875rem 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  background: var(--bg-body);
  color: var(--t-main);
  font-family: inherit;
  font-size: 1rem;
  transition: all var(--trans-fast);
}

.form-input:focus {
  outline: none;
  border-color: var(--c-primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

/* AdSense Placeholders */
.ad-slot {
  width: 100%;
  min-height: 90px; /* Minimal height to prevent CLS */
  background: var(--bg-body);
  border: 1px dashed var(--border-color);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 2rem 0;
  color: var(--t-muted);
  font-size: 0.85rem;
  position: relative;
  overflow: hidden;
}

.ad-slot::before {
  content: 'AdSense Optimized Placement';
  opacity: 0.5;
}

/* Footer */
.site-footer {
  padding: 3rem 0;
  border-top: 1px solid var(--border-color);
  margin-top: auto;
  text-align: center;
}

.footer-text {
  font-size: 0.9rem;
  font-weight: 500;
}

.disclaimer {
  font-size: 0.8rem;
  max-width: 600px;
  margin: 1rem auto;
  opacity: 0.8;
}

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

.anim-enter {
  animation: slideUpFade 0.5s ease-out forwards;
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .nav-links {
    display: none; /* Add hamburger menu logic later if needed */
  }
  
  .container {
    padding: 0 1rem;
  }
  
  .main-wrapper {
    padding: 2rem 0;
  }
  
  h1 {
    font-size: 2rem;
  }
}
