@import "tailwindcss";

/* ================================================
   ContentGen AI — Design System
   Aesthetic Direction: Premium Monochrome & High Contrast
   Frontend Design Skill: Clean, spacious, highly legible
   ================================================ */

@theme {
  /* ── Color Palette (Monochrome Focus) ── */
  --color-bg-void: #000000;
  --color-bg-deep: #0a0a0a;
  --color-bg-base: #111111;
  --color-bg-surface: #1a1a1a;
  --color-bg-elevated: #222222;
  --color-bg-subtle: #2a2a2a;

  --color-border-faint: rgba(255, 255, 255, 0.05);
  --color-border-default: rgba(255, 255, 255, 0.1);
  --color-border-strong: rgba(255, 255, 255, 0.2);

  --color-text-primary: #ffffff;
  --color-text-secondary: #a3a3a3;
  --color-text-muted: #737373;
  --color-text-ghost: #525252;

  /* Accent: Clean White/Gray (Replaces Neon) */
  --color-accent-400: #e5e5e5;
  --color-accent-500: #ffffff;
  --color-accent-glow: rgba(255, 255, 255, 0.08);

  /* Status Colors (Subtle versions) */
  --color-emerald-400: #4ade80;
  --color-emerald-500: #22c55e;
  
  --color-amber-400: #fbbf24;
  --color-amber-500: #f59e0b;
  
  --color-rose-400: #fb7185;
  --color-rose-500: #f43f5e;

  --color-cyan-400: #38bdf8; /* Kept for processing, but subdued */
  --color-cyan-500: #0ea5e9;

  /* ── Spacing (Increased for breathable UI) ── */
  --spacing-page: clamp(1.5rem, 5vw, 3rem);

  /* ── Radius (Sharper, more professional) ── */
  --radius-sm: 0.25rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-2xl: 1.5rem;
  --radius-full: 9999px;

  /* ── Shadows (Soft, realistic depth instead of glows) ── */
  --shadow-glow-sm: 0 4px 14px rgba(0, 0, 0, 0.5);
  --shadow-glow-md: 0 10px 30px rgba(0, 0, 0, 0.6);
  --shadow-glow-lg: 0 20px 40px rgba(0, 0, 0, 0.8);
  --shadow-card: 0 1px 2px rgba(0, 0, 0, 0.8), 0 8px 16px rgba(0, 0, 0, 0.4);
  --shadow-elevated: 0 12px 32px rgba(0, 0, 0, 0.6);

  /* ── Animations ── */
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --duration-fast: 150ms;
  --duration-normal: 250ms;
  --duration-slow: 400ms;
}

/* ── Base ── */
html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  background-color: var(--color-bg-void);
  color: var(--color-text-primary);
  overflow-x: hidden;
  min-height: 100dvh;
  /* Slightly larger base text */
  font-size: 1.05rem;
  letter-spacing: -0.01em;
}

/* ── Selection ── */
::selection {
  background-color: rgba(255, 255, 255, 0.2);
  color: white;
}

/* ── Scrollbar ── */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: var(--color-border-default);
  border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--color-border-strong);
}

/* ── Glass Effect (Desaturated, High Blur) ── */
.glass {
  background: rgba(10, 10, 10, 0.7);
  backdrop-filter: blur(24px) saturate(100%);
  -webkit-backdrop-filter: blur(24px) saturate(100%);
  border: 1px solid var(--color-border-faint);
}

.glass-subtle {
  background: rgba(10, 10, 10, 0.4);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

/* ── Card Styles ── */
.card-surface {
  background: var(--color-bg-surface);
  border: 1px solid var(--color-border-faint);
  border-radius: var(--radius-xl);
  transition: all var(--duration-normal) var(--ease-out-expo);
  box-shadow: var(--shadow-card);
}
.card-surface:hover {
  border-color: var(--color-border-default);
  box-shadow: var(--shadow-glow-sm);
  transform: translateY(-2px);
}

/* ── Badge Styles (Minimalist) ── */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: var(--radius-full);
  letter-spacing: 0.03em;
  text-transform: uppercase;
}
.badge-violet, .badge-cyan {
  background: rgba(255, 255, 255, 0.1);
  color: var(--color-text-primary);
  border: 1px solid rgba(255, 255, 255, 0.15);
}
.badge-emerald {
  background: rgba(74, 222, 128, 0.1);
  color: var(--color-emerald-400);
  border: 1px solid rgba(74, 222, 128, 0.2);
}
.badge-amber {
  background: rgba(251, 191, 36, 0.1);
  color: var(--color-amber-400);
  border: 1px solid rgba(251, 191, 36, 0.2);
}
.badge-rose {
  background: rgba(251, 113, 133, 0.1);
  color: var(--color-rose-400);
  border: 1px solid rgba(251, 113, 133, 0.2);
}

/* ── Button Styles ── */
.btn-primary {
}
.btn-primary:hover {
  box-shadow: 0 4px 16px rgba(139, 92, 246, 0.4);
  transform: translateY(-1px);
}
.btn-primary:active {
  transform: translateY(0);
}

.btn-ghost {
  background: transparent;
  color: var(--color-text-secondary);
  border: 1px solid var(--color-border-faint);
  border-radius: var(--radius-lg);
  padding: 0.625rem 1.25rem;
  transition: all var(--duration-fast) var(--ease-out-expo);
}
.btn-ghost:hover {
  background: var(--color-bg-elevated);
  color: var(--color-text-primary);
  border-color: var(--color-border-default);
}

/* ── Mobile Navigation ── */
.mobile-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 50;
  padding: 0.5rem 0 calc(0.5rem + env(safe-area-inset-bottom));
  background: rgba(10, 10, 10, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--color-border-faint);
}

/* ── Progress Bar ── */
.progress-bar {
  height: 6px;
  border-radius: var(--radius-full);
  background: var(--color-bg-elevated);
  overflow: hidden;
}
.progress-bar-fill {
  height: 100%;
  border-radius: var(--radius-full);
  background: var(--color-text-primary);
  transition: width var(--duration-slow) var(--ease-out-expo);
}

/* ── Skeleton Loader ── */
@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}
.skeleton {
  background: linear-gradient(
    90deg,
    var(--color-bg-surface) 25%,
    var(--color-bg-elevated) 50%,
    var(--color-bg-surface) 75%
  );
  background-size: 200% 100%;
  animation: shimmer 1.5s ease-in-out infinite;
  border-radius: var(--radius-md);
}

/* ── Noise Texture Overlay ── */
.noise-overlay::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.015;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  z-index: 9999;
}

/* ── Page Transition ── */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
.page-enter {
  animation: fadeIn var(--duration-slow) var(--ease-out-expo) forwards;
}

/* ── Touch Optimization ── */
@media (hover: none) {
  .card-surface:hover {
    transform: none;
    box-shadow: var(--shadow-card);
  }
  .btn-primary:hover {
    transform: none;
  }
}

/* ── Safe Area ── */
.pb-safe {
  padding-bottom: calc(5rem + env(safe-area-inset-bottom));
}
