@tailwind base;
@tailwind components;
@tailwind utilities;

:root {
  /* Season 2 Dynamic Theme: Cyan / Teal / Deep Sapphire */
  --season-primary: #22d3ee;
  --season-primary-container: rgba(34, 211, 238, 0.18);
  --season-on-primary: #042f2e;
  --season-secondary: #38bdf8;
  --season-surface-tint: rgba(14, 165, 233, 0.12);
  
  /* Glass Surface Tokens - Vibrant Deep Sapphire Tonal Spectrum */
  --glass-bg-base: linear-gradient(155deg, rgba(15, 23, 42, 0.85) 0%, rgba(9, 16, 32, 0.9) 100%);
  --glass-bg-elevated: linear-gradient(155deg, rgba(20, 32, 58, 0.92) 0%, rgba(11, 20, 40, 0.96) 100%);
  --glass-bg-card: linear-gradient(155deg, rgba(18, 29, 52, 0.78) 0%, rgba(12, 20, 38, 0.85) 100%);
  --glass-bg-hover: linear-gradient(155deg, rgba(26, 42, 74, 0.88) 0%, rgba(16, 28, 52, 0.92) 100%);
  --glass-border-specular: rgba(255, 255, 255, 0.22);
  --glass-border-subtle: rgba(255, 255, 255, 0.08);
  --glass-shadow: 0 12px 36px -4px rgba(0, 0, 0, 0.55);
}

@layer base {
  body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: #050811;
    color: #f1f5f9;
    /* Deep Ambient Liquid Mesh */
    background-image: 
      radial-gradient(circle at 18% 12%, rgba(14, 165, 233, 0.16) 0%, transparent 45%),
      radial-gradient(circle at 82% 28%, rgba(20, 184, 166, 0.12) 0%, transparent 48%),
      radial-gradient(circle at 50% 75%, rgba(56, 189, 248, 0.09) 0%, transparent 55%),
      radial-gradient(circle at 85% 85%, rgba(99, 102, 241, 0.08) 0%, transparent 45%);
    background-attachment: fixed;
    background-size: cover;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
  }

  h1, h2, h3, h4, h5, h6, .font-heading {
    font-family: 'Outfit', 'Inter', sans-serif;
    letter-spacing: -0.02em;
  }
}

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

/* Minimalist Liquid Scrollbar */
::-webkit-scrollbar {
  width: 5px;
  height: 5px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.12);
  border-radius: 9999px;
  backdrop-filter: blur(8px);
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(34, 211, 238, 0.35);
}

/* Custom Scrollbar utility class */
.custom-scrollbar::-webkit-scrollbar {
  width: 4px;
}
.custom-scrollbar::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 9999px;
}

@layer components {
  /* Liquid Glass Panels */
  .glass-panel {
    background: var(--glass-bg-base);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 
      inset 0 1px 1px 0 rgba(255, 255, 255, 0.18),
      var(--glass-shadow);
  }

  .glass-panel-elevated {
    background: var(--glass-bg-elevated);
    backdrop-filter: blur(28px);
    -webkit-backdrop-filter: blur(28px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 
      inset 0 1px 1px 0 rgba(255, 255, 255, 0.22),
      0 20px 48px -8px rgba(0, 0, 0, 0.65);
  }

  /* MD3 Floating Liquid Dock (Navigation) */
  .glass-dock {
    background: rgba(9, 14, 24, 0.82);
    backdrop-filter: blur(32px);
    -webkit-backdrop-filter: blur(32px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 
      inset 0 1px 2px 0 rgba(255, 255, 255, 0.2),
      0 16px 40px -4px rgba(0, 0, 0, 0.6);
  }

  /* Ultra-Refractive Liquid Glass Pill */
  .liquid-glass-pill {
    background: linear-gradient(135deg, 
      rgba(255, 255, 255, 0.22) 0%, 
      rgba(255, 255, 255, 0.08) 28%, 
      rgba(15, 23, 42, 0.65) 65%, 
      rgba(6, 15, 30, 0.8) 100%
    );
    backdrop-filter: blur(26px) saturate(210%) brightness(1.12);
    -webkit-backdrop-filter: blur(26px) saturate(210%) brightness(1.12);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-top: 1.5px solid rgba(255, 255, 255, 0.7);
    border-bottom: 1px solid rgba(34, 211, 238, 0.35);
    box-shadow: 
      inset 0 1.5px 2px 0 rgba(255, 255, 255, 0.7),
      inset 0 -1.5px 2px 0 rgba(0, 0, 0, 0.5),
      inset 0 0 14px 0 rgba(34, 211, 238, 0.15),
      0 10px 32px -4px rgba(0, 0, 0, 0.75),
      0 2px 10px 0 rgba(0, 0, 0, 0.4),
      0 0 20px -2px rgba(34, 211, 238, 0.3);
    position: relative;
    overflow: hidden;
    transition: all 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
  }
  .liquid-glass-pill::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 48%;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.4) 0%, rgba(255, 255, 255, 0.02) 100%);
    border-radius: 9999px 9999px 0 0;
    pointer-events: none;
  }
  .liquid-glass-pill:active {
    transform: scale(0.97);
  }

  /* Interactive Liquid Cards */
  .glass-card {
    background: var(--glass-bg-card);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.09);
    box-shadow: 
      inset 0 1px 1px 0 rgba(255, 255, 255, 0.15),
      0 6px 20px -2px rgba(0, 0, 0, 0.35);
    transition: all 0.22s cubic-bezier(0.2, 0.8, 0.2, 1);
  }
  .glass-card:hover {
    background: var(--glass-bg-hover);
    border-color: rgba(255, 255, 255, 0.18);
    box-shadow: 
      inset 0 1px 1px 0 rgba(255, 255, 255, 0.24),
      0 8px 24px -2px rgba(0, 0, 0, 0.45);
    transform: translateY(-1.5px);
  }

  /* Tactile Glass Buttons */
  .glass-btn {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: inset 0 1px 1px 0 rgba(255, 255, 255, 0.2);
    transition: all 0.18s cubic-bezier(0.2, 0.8, 0.2, 1);
  }
  .glass-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.24);
    box-shadow: inset 0 1px 1px 0 rgba(255, 255, 255, 0.28);
  }
  .glass-btn:active {
    transform: scale(0.96);
  }

  /* Semantic Colored Action Buttons for High Visual Affordance */
  .glass-btn-purple {
    background: rgba(168, 85, 247, 0.18);
    border: 1px solid rgba(168, 85, 247, 0.4);
    color: #f3e8ff;
    box-shadow: inset 0 1px 1px 0 rgba(255, 255, 255, 0.2), 0 2px 8px rgba(168, 85, 247, 0.15);
    transition: all 0.18s ease;
  }
  .glass-btn-purple:hover {
    background: rgba(168, 85, 247, 0.3);
    color: #ffffff;
    box-shadow: inset 0 1px 1px 0 rgba(255, 255, 255, 0.25), 0 4px 14px rgba(168, 85, 247, 0.35);
  }

  .glass-btn-sky {
    background: rgba(14, 165, 233, 0.18);
    border: 1px solid rgba(14, 165, 233, 0.4);
    color: #e0f2fe;
    box-shadow: inset 0 1px 1px 0 rgba(255, 255, 255, 0.2), 0 2px 8px rgba(14, 165, 233, 0.15);
    transition: all 0.18s ease;
  }
  .glass-btn-sky:hover {
    background: rgba(14, 165, 233, 0.3);
    color: #ffffff;
    box-shadow: inset 0 1px 1px 0 rgba(255, 255, 255, 0.3), 0 4px 14px rgba(14, 165, 233, 0.35);
  }

  .glass-btn-emerald {
    background: rgba(16, 185, 129, 0.18);
    border: 1px solid rgba(16, 185, 129, 0.4);
    color: #d1fae5;
    box-shadow: inset 0 1px 1px 0 rgba(255, 255, 255, 0.2), 0 2px 8px rgba(16, 185, 129, 0.15);
    transition: all 0.18s ease;
  }
  .glass-btn-emerald:hover {
    background: rgba(16, 185, 129, 0.3);
    color: #ffffff;
    box-shadow: inset 0 1px 1px 0 rgba(255, 255, 255, 0.3), 0 4px 14px rgba(16, 185, 129, 0.35);
  }

  .glass-btn-amber {
    background: rgba(245, 158, 11, 0.18);
    border: 1px solid rgba(245, 158, 11, 0.4);
    color: #fef3c7;
    box-shadow: inset 0 1px 1px 0 rgba(255, 255, 255, 0.2), 0 2px 8px rgba(245, 158, 11, 0.15);
    transition: all 0.18s ease;
  }
  .glass-btn-amber:hover {
    background: rgba(245, 158, 11, 0.3);
    color: #ffffff;
    box-shadow: inset 0 1px 1px 0 rgba(255, 255, 255, 0.3), 0 4px 14px rgba(245, 158, 11, 0.35);
  }

  .glass-btn-rose {
    background: rgba(244, 63, 94, 0.18);
    border: 1px solid rgba(244, 63, 94, 0.4);
    color: #ffe4e6;
    box-shadow: inset 0 1px 1px 0 rgba(255, 255, 255, 0.2), 0 2px 8px rgba(244, 63, 94, 0.15);
    transition: all 0.18s ease;
  }
  .glass-btn-rose:hover {
    background: rgba(244, 63, 94, 0.3);
    color: #ffffff;
    box-shadow: inset 0 1px 1px 0 rgba(255, 255, 255, 0.3), 0 4px 14px rgba(244, 63, 94, 0.35);
  }

  .glass-btn-pink {
    background: rgba(236, 72, 153, 0.18);
    border: 1px solid rgba(236, 72, 153, 0.4);
    color: #fce7f3;
    box-shadow: inset 0 1px 1px 0 rgba(255, 255, 255, 0.2), 0 2px 8px rgba(236, 72, 153, 0.15);
    transition: all 0.18s ease;
  }
  .glass-btn-pink:hover {
    background: rgba(236, 72, 153, 0.3);
    color: #ffffff;
    box-shadow: inset 0 1px 1px 0 rgba(255, 255, 255, 0.3), 0 4px 14px rgba(236, 72, 153, 0.35);
  }

  /* Primary Accent Glass Button */
  .glass-btn-primary {
    background: linear-gradient(135deg, rgba(34, 211, 238, 0.92) 0%, rgba(14, 165, 233, 0.98) 100%);
    color: #031525;
    font-weight: 800;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-top: 1px solid rgba(255, 255, 255, 0.6);
    box-shadow: 
      inset 0 1px 1px 0 rgba(255, 255, 255, 0.5),
      0 8px 24px -2px rgba(14, 165, 233, 0.4);
    transition: all 0.18s cubic-bezier(0.2, 0.8, 0.2, 1);
  }
  .glass-btn-primary:hover {
    filter: brightness(1.08);
    box-shadow: 
      inset 0 1px 1px 0 rgba(255, 255, 255, 0.6),
      0 12px 28px -2px rgba(14, 165, 233, 0.5);
  }
  .glass-btn-primary:active {
    transform: scale(0.96);
  }

  /* MD3 Chip Badges */
  .md3-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.25rem 0.625rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 700;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-top: 1px solid rgba(255, 255, 255, 0.22);
    backdrop-filter: blur(8px);
  }

  /* Glass Input */
  .glass-input {
    background: rgba(5, 10, 18, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-top: 1px solid rgba(255, 255, 255, 0.14);
    box-shadow: inset 0 2px 4px 0 rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(12px);
    transition: border-color 0.18s ease;
  }
  .glass-input:focus {
    border-color: rgba(34, 211, 238, 0.5);
    outline: none;
  }
}

/* Subtle Shimmer for Liquid Surfaces */
@keyframes liquid-float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-3px); }
}

.animate-liquid-float {
  animation: liquid-float 4s ease-in-out infinite;
}

