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

:root {
  --primary: #1a73e8;
  --primary-dark: #1557b0;
  --primary-light: #e8f0fe;
  --success: #10b981;
  --danger: #ef4444;
  --warning: #f59e0b;
  --bg-main: #f4f7fb;
  --text-main: #1f2937;
}

* {
  box-sizing: border-box;
}

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

.font-mono-code {
  font-family: 'JetBrains Mono', monospace;
}

/* Decorative Background Blobs */
.bg-mesh {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
  background: radial-gradient(circle at 15% 15%, rgba(26, 115, 232, 0.12), transparent 40%),
              radial-gradient(circle at 85% 20%, rgba(56, 189, 248, 0.14), transparent 40%),
              radial-gradient(circle at 50% 85%, rgba(99, 102, 241, 0.08), transparent 45%);
}

.blob {
  position: absolute;
  border-radius: 9999px;
  filter: blur(70px);
  opacity: 0.55;
  animation: floatBlob 14s infinite alternate ease-in-out;
}

.blob-1 {
  width: 420px;
  height: 420px;
  background: rgba(26, 115, 232, 0.18);
  top: -120px;
  left: -100px;
}

.blob-2 {
  width: 360px;
  height: 360px;
  background: rgba(14, 165, 233, 0.16);
  bottom: 5%;
  right: -80px;
  animation-delay: -5s;
}

@keyframes floatBlob {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(30px, 40px) scale(1.08); }
}

/* Glassmorphism Effects */
.glass-nav {
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(226, 232, 240, 0.8);
}

.glass-card {
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 10px 30px -5px rgba(26, 115, 232, 0.06), 0 4px 12px -2px rgba(15, 23, 42, 0.04);
}

.glass-card-blue {
  background: linear-gradient(135deg, rgba(26, 115, 232, 0.95), rgba(37, 99, 235, 0.88));
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.25);
  box-shadow: 0 20px 40px -12px rgba(26, 115, 232, 0.35);
}

.glass-subtle {
  background: rgba(248, 250, 252, 0.75);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(226, 232, 240, 0.9);
}

/* Buttons & Hover Effects */
.btn-primary {
  background: linear-gradient(135deg, #1a73e8 0%, #2563eb 100%);
  color: #ffffff;
  box-shadow: 0 4px 14px 0 rgba(26, 115, 232, 0.35);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-primary:hover:not(:disabled) {
  background: linear-gradient(135deg, #1557b0 0%, #1d4ed8 100%);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px 0 rgba(26, 115, 232, 0.45);
}

.btn-primary:active:not(:disabled) {
  transform: translateY(0);
}

.btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Ad Slot Styling */
.ad-banner {
  background: linear-gradient(90deg, rgba(255,255,255,0.85) 0%, rgba(240,247,255,0.9) 50%, rgba(255,255,255,0.85) 100%);
  border: 1px dashed rgba(59, 130, 246, 0.35);
  position: relative;
  overflow: hidden;
  transition: all 0.25s ease;
}

.ad-banner:hover {
  border-color: rgba(26, 115, 232, 0.65);
  box-shadow: 0 8px 24px -6px rgba(26, 115, 232, 0.12);
}

.ad-badge {
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: rgba(26, 115, 232, 0.1);
  color: #1a73e8;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 700;
}

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

.animate-fade-in {
  animation: fadeIn 0.3s ease-out forwards;
}

@keyframes pulseRing {
  0% { transform: scale(0.9); opacity: 0.8; }
  70% { transform: scale(1.6); opacity: 0; }
  100% { transform: scale(1.6); opacity: 0; }
}

.live-dot::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background-color: #10b981;
  animation: pulseRing 2s infinite;
}

/* Skeleton Loader */
.skeleton {
  background: linear-gradient(90deg, #e2e8f0 25%, #f1f5f9 50%, #e2e8f0 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 0.5rem;
}

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

/* Global Loading Overlay */
#global-loader {
  background: rgba(15, 23, 42, 0.35);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  transition: opacity 0.2s ease;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 3.5px solid rgba(26, 115, 232, 0.2);
  border-top-color: #1a73e8;
  border-radius: 50%;
  animation: spin 0.75s linear infinite;
}

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

/* Toast Container */
#toast-container {
  position: fixed;
  top: 1.25rem;
  right: 1.25rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  max-width: 380px;
  width: calc(100% - 2.5rem);
}

.toast-item {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  border-radius: 0.875rem;
  box-shadow: 0 12px 28px -6px rgba(15, 23, 42, 0.14);
  animation: slideInRight 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes slideInRight {
  from { opacity: 0; transform: translateX(24px); }
  to { opacity: 1; transform: translateX(0); }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 9999px;
}

::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}
