/* Variables and Base Theme */
:root {
  --bg-primary: #0f1115;
  --bg-secondary: rgba(25, 28, 36, 0.7);
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --accent: #3cc23a;
  --accent-glow: rgba(60, 194, 58, 0.3);
  --glass-bg: rgba(255, 255, 255, 0.03);
  --glass-border: rgba(255, 255, 255, 0.08);
  --success: #10b981;
  --error: #ef4444;
}

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

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

/* Typography */
h1, h2, h3, h4 {
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1rem;
}

h1 {
  font-size: 3.5rem;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #ffffff 0%, #86efac 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

h2 {
  font-size: 2.5rem;
}

p {
  color: var(--text-secondary);
  font-size: 1.125rem;
  margin-bottom: 1.5rem;
}

/* Layout Utilities */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.gap-4 { gap: 1rem; }
.gap-8 { gap: 2rem; }

/* Navigation */
nav {
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--glass-border);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(15, 17, 21, 0.8);
}

.nav-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
  margin-left: 2rem;
}

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

.logo {
  display: inline-flex;
  align-items: center;
  background-color: var(--accent);
  border-radius: 999px;
  padding: 4px;
  height: 48px;
  width: max-content;
  box-shadow: 0 4px 12px var(--accent-glow), inset 0 2px 4px rgba(255, 255, 255, 0.4), inset 0 -2px 4px rgba(0, 0, 0, 0.1);
  font-family: 'Inter', sans-serif;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.logo:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px var(--accent-glow), inset 0 2px 4px rgba(255, 255, 255, 0.4), inset 0 -2px 4px rgba(0, 0, 0, 0.1);
}

.logo-on {
  color: #fff;
  font-weight: 800;
  font-size: 20px;
  letter-spacing: -0.5px;
  padding: 0 10px 0 14px;
  text-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.logo-circle {
  background-color: #fff;
  border-radius: 50%;
  height: 40px;
  width: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

.logo-ai {
  color: var(--accent);
  font-weight: 800;
  font-size: 20px;
  letter-spacing: -0.5px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  border-radius: 9999px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s ease;
  cursor: pointer;
  border: none;
  font-size: 1rem;
}

.btn-primary {
  background: var(--accent);
  color: #000;
  box-shadow: 0 0 20px var(--accent-glow);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 30px var(--accent-glow);
  background: #38bdf8;
}

.btn-secondary {
  background: var(--glass-bg);
  color: var(--text-primary);
  border: 1px solid var(--glass-border);
}

.btn-secondary:hover {
  background: rgba(60, 194, 58, 0.15);
  border-color: rgba(60, 194, 58, 0.3);
}

/* Glass Cards */
.card {
  background: var(--bg-secondary);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  padding: 2rem;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.card:hover {
  transform: translateY(-5px);
  border-color: rgba(60, 194, 58, 0.3);
  box-shadow: 0 10px 40px rgba(60, 194, 58, 0.15);
}

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

.form-label {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--text-secondary);
  font-size: 0.875rem;
}

.form-input {
  width: 100%;
  padding: 0.75rem 1rem;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  color: var(--text-primary);
  font-family: inherit;
  transition: border-color 0.2s ease;
}

.form-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
}

/* Hero Section & Moving Background */
.hero {
  padding: 8rem 0;
  text-align: center;
}

.bg-grid {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 200%;
  z-index: -2;
  background-image: 
    linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 50px 50px;
  -webkit-mask-image: radial-gradient(circle at 50% 30%, rgba(0,0,0,1) 0%, rgba(0,0,0,0) 60%);
  mask-image: radial-gradient(circle at 50% 30%, rgba(0,0,0,1) 0%, rgba(0,0,0,0) 60%);
  animation: moveGrid 20s linear infinite;
}

@keyframes moveGrid {
  0% { transform: translateY(-50px); }
  100% { transform: translateY(0); }
}

.blobs-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.blob {
  position: absolute;
  filter: blur(80px);
  border-radius: 50%;
  opacity: 0.4;
  animation: float 20s infinite ease-in-out alternate;
}

.blob-1 {
  width: 400px;
  height: 400px;
  background-color: var(--accent);
  top: -100px;
  left: -100px;
  animation-duration: 25s;
}

.blob-2 {
  width: 500px;
  height: 500px;
  background-color: #059669;
  bottom: -200px;
  right: -100px;
  animation-delay: -5s;
  animation-duration: 30s;
}

.blob-3 {
  width: 300px;
  height: 300px;
  background-color: #34d399;
  top: 30%;
  left: 50%;
  transform: translateX(-50%);
  animation-delay: -10s;
  animation-duration: 20s;
  opacity: 0.3;
}

.particle {
  position: absolute;
  background: var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 15px var(--accent-glow), 0 0 30px var(--accent);
  opacity: 0;
  z-index: -1;
  animation: floatUp 15s infinite linear;
}

.p-1 { width: 4px; height: 4px; left: 15%; bottom: -50px; animation-duration: 12s; animation-delay: 0s; }
.p-2 { width: 6px; height: 6px; left: 45%; bottom: -50px; animation-duration: 18s; animation-delay: 3s; }
.p-3 { width: 8px; height: 8px; left: 75%; bottom: -50px; animation-duration: 14s; animation-delay: 6s; }
.p-4 { width: 5px; height: 5px; left: 30%; bottom: -50px; animation-duration: 20s; animation-delay: 8s; background: #34d399; }
.p-5 { width: 7px; height: 7px; left: 85%; bottom: -50px; animation-duration: 16s; animation-delay: 1s; }
.p-6 { width: 3px; height: 3px; left: 60%; bottom: -50px; animation-duration: 22s; animation-delay: 4s; }
.p-7 { width: 5px; height: 5px; left: 20%; bottom: -50px; animation-duration: 25s; animation-delay: 12s; background: #34d399; }

@keyframes floatUp {
  0% { transform: translateY(0) translateX(0); opacity: 0; }
  20% { opacity: 0.8; }
  80% { opacity: 0.8; }
  100% { transform: translateY(-800px) translateX(150px); opacity: 0; }
}

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

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

.animate-fade-in {
  animation: fadeIn 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.delay-100 { animation-delay: 100ms; }
.delay-200 { animation-delay: 200ms; }
.delay-300 { animation-delay: 300ms; }

/* Dashboard Specific Layout */
.dashboard-layout {
  display: flex;
  flex-direction: row;
  height: 100vh;
  overflow: hidden;
}

.sidebar {
  width: 250px;
  background: var(--bg-secondary);
  border-right: 1px solid var(--glass-border);
  padding: 2rem 1rem;
  display: flex;
  flex-direction: column;
}

.sidebar a:not(.logo) {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  color: var(--text-secondary);
  text-decoration: none;
  border-radius: 8px;
  margin-bottom: 0.5rem;
  transition: all 0.2s ease;
}

.sidebar a:not(.logo):hover, .sidebar a.active:not(.logo) {
  background: linear-gradient(90deg, rgba(60, 194, 58, 0.15), transparent);
  color: var(--text-primary);
  border-left: 3px solid var(--accent);
}

.main-content {
  flex: 1;
  overflow-y: auto;
  padding: 2rem;
  position: relative;
}

/* Add grid utilities */
.grid {
  display: grid;
  gap: 2rem;
}

.grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid-cols-3 { grid-template-columns: repeat(3, 1fr); }

@media (max-width: 768px) {
  .grid-cols-2, .grid-cols-3 {
    grid-template-columns: 1fr;
  }
  h1 { font-size: 2.5rem; }
  .dashboard-layout { flex-direction: column; }
  .sidebar { width: 100%; height: auto; border-right: none; border-bottom: 1px solid var(--glass-border); }
}
