@import "tailwindcss";
@import "tw-animate-css";

/* Dark-only theme: set tokens on :root */
:root {
  --background: oklch(0.145 0 0);
  --foreground: oklch(0.985 0 0);

  --card: oklch(0.145 0 0);
  --card-foreground: oklch(0.985 0 0);

  --popover: oklch(0.145 0 0);
  --popover-foreground: oklch(0.985 0 0);

  --primary: oklch(0.985 0 0);
  --primary-foreground: oklch(0.205 0 0);

  --secondary: oklch(0.269 0 0);
  --secondary-foreground: oklch(0.985 0 0);

  --muted: oklch(0.269 0 0);
  --muted-foreground: oklch(0.708 0 0);

  --accent: oklch(0.269 0 0);
  --accent-foreground: oklch(0.985 0 0);

  --destructive: oklch(0.396 0.141 25.723);
  --destructive-foreground: oklch(0.637 0.237 25.331);

  --border: oklch(0.269 0 0);
  --input: oklch(0.269 0 0);
  --ring: oklch(0.439 0 0);

  --chart-1: oklch(0.488 0.243 264.376);
  --chart-2: oklch(0.696 0.17 162.48);
  --chart-3: oklch(0.769 0.188 70.08);
  --chart-4: oklch(0.627 0.265 303.9);
  --chart-5: oklch(0.645 0.246 16.439);

  --radius: 0.625rem;

  --sidebar: oklch(0.205 0 0);
  --sidebar-foreground: oklch(0.985 0 0);
  --sidebar-primary: oklch(0.488 0.243 264.376);
  --sidebar-primary-foreground: oklch(0.985 0 0);
  --sidebar-accent: oklch(0.269 0 0);
  --sidebar-accent-foreground: oklch(0.985 0 0);
  --sidebar-border: oklch(0.269 0 0);
  --sidebar-ring: oklch(0.439 0 0);
}

:root {
  color-scheme: dark;
}

html {
  background-color: #0b0f17; 
  color: #e6edf3;  
  height: 100%;         
}

@theme inline {
  --color-background: var(--background);
  --color-foreground: var(--foreground);
  --color-card: var(--card);
  --color-card-foreground: var(--card-foreground);
  --color-popover: var(--popover);
  --color-popover-foreground: var(--popover-foreground);
  --color-primary: var(--primary);
  --color-primary-foreground: var(--primary-foreground);
  --color-secondary: var(--secondary);
  --color-secondary-foreground: var(--secondary-foreground);
  --color-muted: var(--muted);
  --color-muted-foreground: var(--muted-foreground);
  --color-accent: var(--accent);
  --color-accent-foreground: var(--accent-foreground);
  --color-destructive: var(--destructive);
  --color-destructive-foreground: var(--destructive-foreground);
  --color-border: var(--border);
  --color-input: var(--input);
  --color-ring: var(--ring);
  --color-chart-1: var(--chart-1);
  --color-chart-2: var(--chart-2);
  --color-chart-3: var(--chart-3);
  --color-chart-4: var(--chart-4);
  --color-chart-5: var(--chart-5);
  --radius-sm: calc(var(--radius) - 4px);
  --radius-md: calc(var(--radius) - 2px);
  --radius-lg: var(--radius);
  --radius-xl: calc(var(--radius) + 4px);
  --color-sidebar: var(--sidebar);
  --color-sidebar-foreground: var(--sidebar-foreground);
  --color-sidebar-primary: var(--sidebar-primary);
  --color-sidebar-primary-foreground: var(--sidebar-primary-foreground);
  --color-sidebar-accent: var(--sidebar-accent);
  --color-sidebar-accent-foreground: var(--sidebar-accent-foreground);
  --color-sidebar-border: var(--sidebar-border);
  --color-sidebar-ring: var(--sidebar-ring);
}

@layer base {
  * { @apply border-border outline-ring/50; }
  body { @apply bg-background text-foreground; }
}

/* Glass + UI utilities, dark-only */
@layer utilities {
  .glass-card {
    @apply backdrop-blur-md border bg-white/15 border-white/25 shadow-2xl transition-all duration-300;
  }

  .glass-card-gray {
    @apply backdrop-blur-md border bg-white/5 border-white/15 shadow-2xl transition-all duration-300;
  }

  .glass-card-black {
    @apply backdrop-blur-md border bg-white/3 border-white/5 shadow-2xl transition-all duration-300;
  }

  .glass-input {
    @apply backdrop-blur-md border bg-white/15 border-white/25 text-gray-100 placeholder:text-gray-300 transition-all duration-300 focus:ring-2 focus:ring-teal-500;
  }

  .interactive-card { @apply transition-all duration-300 ease-in-out cursor-pointer; }
  .interactive-card:hover { @apply -translate-y-1 shadow-2xl bg-white/20; }

  .theme-button {
    @apply bg-teal-500 hover:bg-teal-600 text-white shadow-lg hover:shadow-xl transition-all duration-300 ease-in-out hover:scale-105;
  }
  .theme-button-teal {
    @apply bg-teal-600 hover:bg-teal-500 text-white shadow-lg hover:shadow-xl transition-all duration-300 ease-in-out hover:scale-105;
  }

  .text-high-contrast { @apply text-gray-100; }
  .text-medium-contrast { @apply text-gray-200; }
  .text-subtle-contrast { @apply text-gray-300; }

  .gradient-text {
    @apply bg-gradient-to-r from-teal-400 to-blue-400 bg-clip-text text-transparent;
    color: #2dd4bf; /* fallback */
  }

  .skeleton { @apply animate-pulse bg-gray-700; }

  /* Anim helpers */
  .animate-float { animation: float 6s ease-in-out infinite; }
  .animate-fade-in-up { animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1); }
  .animate-scale-in { animation: scaleIn 0.4s cubic-bezier(0.16, 1, 0.3, 1); }
  .animate-shimmer { animation: shimmer 2s linear infinite; }

  /* Card backgrounds and chrome, dark-only */
  .card-bg-teal {
    background:
      radial-gradient(1000px 500px at 110% -10%, rgba(20,184,166,0.16), transparent 60%),
      radial-gradient(800px 600px at -10% 110%, rgba(56,189,248,0.14), transparent 60%),
      linear-gradient(180deg, rgba(15,23,42,0.65), rgba(15,23,42,0.5));
  }
  .card-bg-sky {
    background:
      radial-gradient(1000px 500px at 110% -10%, rgba(59,130,246,0.16), transparent 60%),
      radial-gradient(800px 600px at -10% 110%, rgba(14,165,233,0.16), transparent 60%),
      linear-gradient(180deg, rgba(15,23,42,0.62), rgba(15,23,42,0.48));
  }
  .card-bg-emerald {
    background:
      radial-gradient(1000px 500px at 110% -10%, rgba(16,185,129,0.16), transparent 60%),
      radial-gradient(800px 600px at -10% 110%, rgba(34,197,94,0.16), transparent 60%),
      linear-gradient(180deg, rgba(15,23,42,0.62), rgba(15,23,42,0.46));
  }

  .card-chrome { position: relative; }
  .card-chrome::before {
    content: ""; position: absolute; inset: 0; border-radius: 24px; pointer-events: none;
    box-shadow: inset 0 0 0 1px rgba(148,163,184,0.18), 0 10px 30px rgba(0,0,0,0.35);
  }

  .card-sheen::after {
    content: ""; position: absolute; inset: 0; border-radius: 24px;
    background: linear-gradient(180deg, rgba(255,255,255,0.04), transparent 60%);
    pointer-events: none; mix-blend-mode: soft-light;
  }

  .card-fade { opacity: 0.2; transition: opacity 220ms ease, transform 220ms ease, filter 220ms ease; }
  .card-active { opacity: 1; transform: translateY(-6px); }

  .card-solid {
    background: linear-gradient(180deg, rgba(19,25,38,0.94), rgba(19,25,38,0.88));
  }
  .card-edge { position: relative; border-radius: 20px; }
  .card-edge::before {
    content: ""; position: absolute; inset: 0; border-radius: 20px; pointer-events: none;
    box-shadow: inset 0 0 0 1px rgba(148,163,184,0.18), 0 8px 28px rgba(0,0,0,0.25);
  }
  .card-vignette::after {
    content: ""; position: absolute; inset: -1px; border-radius: 22px;
    background: radial-gradient(120% 140% at 50% 0%, rgba(45,212,191,0.08), transparent 55%);
    pointer-events: none; mix-blend-mode: soft-light;
  }

  .stack-dim { opacity: 0.28; }
  .stack-active { opacity: 1; transform: translateY(-4px); }

  /* Responsive text utilities (kept) */
  .text-responsive-xs { font-size: 0.75rem; }
  .text-responsive-sm { font-size: 0.875rem; }
  .text-responsive-base { font-size: 1rem; }
  .text-responsive-lg { font-size: 1.125rem; }
  .text-responsive-xl { font-size: 1.25rem; }
  .text-responsive-2xl { font-size: 1.5rem; }
}

@media (min-width: 640px) {
  .text-responsive-xs { font-size: 0.875rem; }
  .text-responsive-sm { font-size: 1rem; }
  .text-responsive-base { font-size: 1.125rem; }
  .text-responsive-lg { font-size: 1.25rem; }
  .text-responsive-xl { font-size: 1.5rem; }
  .text-responsive-2xl { font-size: 1.875rem; }
}
@media (min-width: 768px) {
  .text-responsive-lg { font-size: 1.5rem; }
  .text-responsive-xl { font-size: 1.875rem; }
  .text-responsive-2xl { font-size: 2.25rem; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .animate-float, .animate-fade-in-up, .animate-scale-in, .animate-shimmer { animation: none; }
  .interactive-card:hover { transform: none; }
}

/* Animations */
@keyframes float {
  0%,100% { transform: translateY(0) rotate(0); }
  33% { transform: translateY(-10px) rotate(1deg); }
  66% { transform: translateY(-20px) rotate(-1deg); }
}
@keyframes fadeInUp { from { opacity:0; transform:translateY(20px); } to { opacity:1; transform:translateY(0); } }
@keyframes scaleIn { from { opacity:0; transform:scale(0.9); } to { opacity:1; transform:scale(1); } }
@keyframes shimmer { 0% { background-position:-200% 0; } 100% { background-position:200% 0; } }