@import url("https://fonts.googleapis.com/css2?family=Outfit:wght@400;600;800&family=Plus+Jakarta+Sans:wght@400;500;700&family=JetBrains+Mono&display=swap");

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

body {
  margin: 0;
  font-family: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont,
    "Segoe UI", "Roboto", sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

code {
  font-family: "JetBrains Mono", source-code-pro, Menlo, Monaco, Consolas,
    "Courier New", monospace;
}

@layer base {
  :root {
    --primary-color: #0f392b; /* Default Emerald */
    --secondary-color: #ccf381;
    --accent-color: #7ed957;
    --font-family: "Plus Jakarta Sans", sans-serif;

    --background: #f8fafc;
    --foreground: #1a202c;
    --card: #ffffff;
    --card-border: #e2e8f0;
    --text-muted: #718096;
  }

  body.dark-mode {
    --background: #0a0c10;
    --foreground: #f7fafc;
    --card: #1a202c;
    --card-border: #2d3748;
    --text-muted: #a0aec0;
  }

  body {
    background: var(--background);
    color: var(--foreground);
    font-family: var(--font-family);
    transition: background 0.3s, color 0.3s;
    position: relative;
    overflow-x: hidden;
  }

  #three-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
    opacity: 0.6;
  }

  .card {
    background: var(--card);
    border: 1px solid var(--card-border);
    color: var(--foreground);
  }

  .btn-primary {
    background: var(--secondary-color);
    color: var(--primary-color);
  }

  .sidebar {
    background: var(--primary-color);
    color: white;
  }
}

@layer base {
  * {
    @apply border-border;
  }
  body {
    @apply bg-background text-foreground;
  }
  h1,
  h2,
  h3,
  h4,
  h5,
  h6 {
    @apply font-outfit;
  }
  h1 {
    @apply tracking-tighter;
  }
  h2,
  h3 {
    @apply tracking-tight;
  }
}

@layer base {
  [data-debug-wrapper="true"] {
    display: contents !important;
  }

  [data-debug-wrapper="true"] > * {
    margin-left: inherit;
    margin-right: inherit;
    margin-top: inherit;
    margin-bottom: inherit;
    padding-left: inherit;
    padding-right: inherit;
    padding-top: inherit;
    padding-bottom: inherit;
    column-gap: inherit;
    row-gap: inherit;
    gap: inherit;
    border-left-width: inherit;
    border-right-width: inherit;
    border-top-width: inherit;
    border-bottom-width: inherit;
    border-left-style: inherit;
    border-right-style: inherit;
    border-top-style: inherit;
    border-bottom-style: inherit;
    border-left-color: inherit;
    border-right-color: inherit;
    border-top-color: inherit;
    border-bottom-color: inherit;
  }
}

/* Modern UI Utilities - 3D & Glassmorphism */
@layer utilities {
  /* Glassmorphism Effects */
  .glass {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
  }

  .glass-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.15);
  }

  .glass-strong {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border: 1px solid rgba(255, 255, 255, 0.3);
  }

  body.dark-mode .glass {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
  }

  body.dark-mode .glass-card {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.4);
  }

  /* 3D Transform Utilities */
  .transform-3d {
    transform-style: preserve-3d;
    perspective: 1000px;
  }

  .lift-on-hover {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
  }

  .lift-on-hover:hover {
    transform: translateY(-8px) translateZ(20px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
  }

  .tilt-gentle {
    transition: transform 0.3s ease;
  }

  .tilt-gentle:hover {
    transform: perspective(1000px) rotateX(5deg) rotateY(5deg);
  }

  /* Gradient Mesh Backgrounds */
  .gradient-mesh-1 {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  }

  .gradient-mesh-2 {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  }

  .gradient-mesh-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, #1a5240 100%);
  }

  .gradient-mesh-accent {
    background: linear-gradient(135deg, var(--accent-color) 0%, var(--secondary-color) 100%);
  }

  .animated-gradient {
    background: linear-gradient(-45deg, #0f392b, #1a5240, #ccf381, #7ed957);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
  }

  @keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
  }

  /* Modern Depth Shadows */
  .shadow-depth-1 {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08),
                0 4px 16px rgba(0, 0, 0, 0.04);
  }

  .shadow-depth-2 {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1),
                0 8px 32px rgba(0, 0, 0, 0.08);
  }

  .shadow-depth-3 {
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12),
                0 16px 64px rgba(0, 0, 0, 0.1);
  }

  .shadow-glow {
    box-shadow: 0 0 20px rgba(204, 243, 129, 0.4),
                0 0 40px rgba(204, 243, 129, 0.2);
  }

  /* Smooth Animations */
  @keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
  }

  @keyframes pulse-glow {
    0%, 100% { box-shadow: 0 0 20px rgba(204, 243, 129, 0.4); }
    50% { box-shadow: 0 0 40px rgba(204, 243, 129, 0.8); }
  }

  @keyframes slide-in-up {
    from {
      opacity: 0;
      transform: translateY(30px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  @keyframes fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
  }

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

  .animate-pulse-glow {
    animation: pulse-glow 3s ease-in-out infinite;
  }

  .animate-slide-in {
    animation: slide-in-up 0.6s ease-out;
  }

  .animate-fade-in {
    animation: fade-in 0.8s ease-in;
  }

  /* Smooth Transitions */
  .transition-all {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  }

  .transition-colors {
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
  }

  /* Modern Card Styles */
  .modern-card {
    background: var(--card);
    border: 1px solid var(--card-border);
    border-radius: 1.25rem;
    padding: 2rem;
    transition: all 0.3s ease;
  }

  .modern-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.12);
    border-color: var(--accent-color);
  }

  /* Neo-Brutalist Elements */
  .neo-brutal {
    border: 3px solid var(--foreground);
    box-shadow: 6px 6px 0 var(--foreground);
    transition: all 0.2s ease;
  }

  .neo-brutal:hover {
    transform: translate(-2px, -2px);
    box-shadow: 8px 8px 0 var(--foreground);
  }

  /* Backdrop Blur Utilities */
  .blur-sm { backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
  .blur-md { backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
  .blur-lg { backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); }
  .blur-xl { backdrop-filter: blur(30px); -webkit-backdrop-filter: blur(30px); }
}
