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

@custom-variant dark (&:is(.dark *));

/* Кастомные скроллбары */
.scrollbar-thin {
  scrollbar-width: thin;
}

.scrollbar-thumb-white\/20 {
  scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}

.scrollbar-track-transparent {
  scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}

/* Webkit скроллбары для браузеров на базе Chromium */
.scrollbar-thin::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

.scrollbar-thin::-webkit-scrollbar-track {
  background: transparent;
}

.scrollbar-thin::-webkit-scrollbar-thumb {
  background-color: rgba(255, 255, 255, 0.2);
  border-radius: 3px;
}

.scrollbar-thin::-webkit-scrollbar-thumb:hover {
  background-color: rgba(255, 255, 255, 0.3);
}

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

:root {
  --radius: 0.625rem;
  --background: oklch(0.98 0.02 320);
  --foreground: oklch(0.145 0 0);
  --card: oklch(1 0 0);
  --card-foreground: oklch(0.145 0 0);
  --popover: oklch(1 0 0);
  --popover-foreground: oklch(0.145 0 0);
  --primary: oklch(0.65 0.28 315);
  --primary-foreground: oklch(0.985 0 0);
  --secondary: oklch(0.94 0.08 315);
  --secondary-foreground: oklch(0.205 0 0);
  --muted: oklch(0.94 0.05 315);
  --muted-foreground: oklch(0.556 0 0);
  --accent: oklch(0.9 0.12 315);
  --accent-foreground: oklch(0.205 0 0);
  --destructive: oklch(0.577 0.245 27.325);
  --border: oklch(0.9 0.08 315);
  --input: oklch(0.96 0.05 315);
  --ring: oklch(0.65 0.28 315);
  --chart-1: oklch(0.7 0.25 315);
  --chart-2: oklch(0.65 0.22 290);
  --chart-3: oklch(0.6 0.2 340);
  --chart-4: oklch(0.75 0.18 305);
  --chart-5: oklch(0.68 0.24 325);
  --sidebar: oklch(0.985 0 0);
  --sidebar-foreground: oklch(0.145 0 0);
  --sidebar-primary: oklch(0.65 0.28 315);
  --sidebar-primary-foreground: oklch(0.985 0 0);
  --sidebar-accent: oklch(0.9 0.12 315);
  --sidebar-accent-foreground: oklch(0.205 0 0);
  --sidebar-border: oklch(0.9 0.08 315);
  --sidebar-ring: oklch(0.65 0.28 315);
}

.dark {
  --background: oklch(0.08 0.08 315);
  --foreground: oklch(0.985 0 0);
  --card: oklch(0.12 0.08 315);
  --card-foreground: oklch(0.985 0 0);
  --popover: oklch(0.12 0.08 315);
  --popover-foreground: oklch(0.985 0 0);
  --primary: oklch(0.75 0.32 315);
  --primary-foreground: oklch(0.08 0.08 315);
  --secondary: oklch(0.18 0.12 315);
  --secondary-foreground: oklch(0.985 0 0);
  --muted: oklch(0.18 0.1 315);
  --muted-foreground: oklch(0.708 0 0);
  --accent: oklch(0.2 0.15 315);
  --accent-foreground: oklch(0.985 0 0);
  --destructive: oklch(0.704 0.191 22.216);
  --border: oklch(0.22 0.12 315);
  --input: oklch(0.15 0.1 315);
  --ring: oklch(0.75 0.32 315);
  --chart-1: oklch(0.75 0.32 315);
  --chart-2: oklch(0.7 0.28 290);
  --chart-3: oklch(0.65 0.25 340);
  --chart-4: oklch(0.8 0.2 305);
  --chart-5: oklch(0.72 0.3 325);
  --sidebar: oklch(0.12 0.08 315);
  --sidebar-foreground: oklch(0.985 0 0);
  --sidebar-primary: oklch(0.75 0.32 315);
  --sidebar-primary-foreground: oklch(0.08 0.08 315);
  --sidebar-accent: oklch(0.2 0.15 315);
  --sidebar-accent-foreground: oklch(0.985 0 0);
  --sidebar-border: oklch(0.22 0.12 315);
  --sidebar-ring: oklch(0.75 0.32 315);
}

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

@layer utilities {
  .gradient-purple {
    background: linear-gradient(
      135deg,
      oklch(0.75 0.32 315) 0%,
      oklch(0.68 0.28 280) 30%,
      oklch(0.65 0.3 250) 70%,
      oklch(0.6 0.25 330) 100%
    );
  }

  .gradient-purple-light {
    background: linear-gradient(135deg, oklch(0.95 0.12 315) 0%, oklch(0.96 0.1 280) 50%, oklch(0.98 0.08 250) 100%);
  }

  .bg-gradient-smooth {
    background: linear-gradient(
      135deg,
      oklch(0.15 0.25 270) 0%,
      oklch(0.25 0.3 300) 15%,
      oklch(0.45 0.35 320) 30%,
      oklch(0.2 0.28 250) 45%,
      oklch(0.35 0.32 280) 60%,
      oklch(0.1 0.2 290) 75%,
      oklch(0.18 0.25 260) 100%
    );
  }

  .gradient-sunset {
    background: linear-gradient(
      135deg,
      oklch(0.75 0.25 45) 0%,
      oklch(0.7 0.28 25) 30%,
      oklch(0.68 0.3 355) 70%,
      oklch(0.65 0.32 320) 100%
    );
  }

  .gradient-ocean {
    background: linear-gradient(
      135deg,
      oklch(0.65 0.22 220) 0%,
      oklch(0.68 0.25 200) 30%,
      oklch(0.7 0.28 180) 70%,
      oklch(0.72 0.3 160) 100%
    );
  }

  .gradient-emerald {
    background: linear-gradient(
      135deg,
      oklch(0.7 0.28 150) 0%,
      oklch(0.72 0.3 140) 30%,
      oklch(0.68 0.25 160) 70%,
      oklch(0.65 0.22 170) 100%
    );
  }

  .gradient-cosmic {
    background: linear-gradient(
      135deg,
      oklch(0.45 0.35 270) 0%,
      oklch(0.55 0.4 300) 25%,
      oklch(0.65 0.3 330) 50%,
      oklch(0.5 0.35 250) 75%,
      oklch(0.4 0.3 280) 100%
    );
  }

  .gradient-fire {
    background: linear-gradient(
      135deg,
      oklch(0.7 0.35 40) 0%,
      oklch(0.75 0.4 20) 30%,
      oklch(0.8 0.35 10) 60%,
      oklch(0.65 0.3 50) 100%
    );
  }

  .gradient-aurora {
    background: linear-gradient(
      135deg,
      oklch(0.6 0.25 180) 0%,
      oklch(0.7 0.3 160) 20%,
      oklch(0.75 0.35 140) 40%,
      oklch(0.65 0.28 200) 60%,
      oklch(0.55 0.32 220) 80%,
      oklch(0.6 0.25 180) 100%
    );
  }

  /* Кастомные варианты на основе космического градиента */
  .gradient-corporate {
    background: linear-gradient(
      135deg,
      oklch(0.25 0.15 240) 0%,
      oklch(0.3 0.18 220) 30%,
      oklch(0.35 0.2 200) 70%,
      oklch(0.28 0.16 260) 100%
    );
  }

  .gradient-nebula {
    background: linear-gradient(
      135deg,
      oklch(0.2 0.4 290) 0%,
      oklch(0.35 0.45 310) 20%,
      oklch(0.5 0.35 330) 40%,
      oklch(0.4 0.4 270) 60%,
      oklch(0.25 0.38 250) 80%,
      oklch(0.15 0.35 280) 100%
    );
  }

  .gradient-galaxy {
    background: linear-gradient(
      135deg,
      oklch(0.15 0.25 270) 0%,
      oklch(0.25 0.3 300) 15%,
      oklch(0.45 0.35 320) 30%,
      oklch(0.2 0.28 250) 45%,
      oklch(0.35 0.32 280) 60%,
      oklch(0.1 0.2 290) 75%,
      oklch(0.18 0.25 260) 100%
    );
  }

  .gradient-starfield {
    background: linear-gradient(
      135deg,
      oklch(0.08 0.15 270) 0%,
      oklch(0.12 0.2 290) 25%,
      oklch(0.2 0.25 310) 50%,
      oklch(0.15 0.18 250) 75%,
      oklch(0.05 0.12 280) 100%
    );
  }

  .gradient-quantum {
    background: linear-gradient(
      135deg,
      oklch(0.4 0.38 280) 0%,
      oklch(0.55 0.42 260) 20%,
      oklch(0.7 0.35 240) 40%,
      oklch(0.45 0.4 300) 60%,
      oklch(0.3 0.35 320) 80%,
      oklch(0.5 0.38 270) 100%
    );
  }

  .gradient-void {
    background: linear-gradient(
      135deg,
      oklch(0.05 0.08 270) 0%,
      oklch(0.08 0.12 290) 30%,
      oklch(0.12 0.15 250) 60%,
      oklch(0.06 0.1 310) 100%
    );
  }

  .gradient-supernova {
    background: linear-gradient(
      135deg,
      oklch(0.65 0.4 280) 0%,
      oklch(0.8 0.35 260) 20%,
      oklch(0.75 0.45 300) 40%,
      oklch(0.85 0.38 240) 60%,
      oklch(0.6 0.42 320) 80%,
      oklch(0.7 0.4 270) 100%
    );
  }

  /* Утонченные варианты с акцентами */
  .gradient-corporate-accent {
    background: linear-gradient(135deg, oklch(0.25 0.08 240) 0%, oklch(0.28 0.1 220) 100%);
  }

  .gradient-nebula-accent {
    background: linear-gradient(135deg, oklch(0.3 0.2 290) 0%, oklch(0.35 0.25 310) 100%);
  }

  .gradient-galaxy-accent {
    background: linear-gradient(135deg, oklch(0.25 0.15 270) 0%, oklch(0.3 0.18 300) 50%, oklch(0.28 0.16 250) 100%);
  }

  .gradient-starfield-accent {
    background: linear-gradient(135deg, oklch(0.15 0.08 270) 0%, oklch(0.18 0.12 290) 100%);
  }

  .gradient-quantum-accent {
    background: linear-gradient(135deg, oklch(0.35 0.2 280) 0%, oklch(0.4 0.25 260) 100%);
  }

  .gradient-void-accent {
    background: linear-gradient(135deg, oklch(0.12 0.05 270) 0%, oklch(0.15 0.08 290) 100%);
  }

  .gradient-supernova-accent {
    background: linear-gradient(135deg, oklch(0.45 0.25 280) 0%, oklch(0.5 0.3 260) 100%);
  }

  /* Восхитительный премиум градиент */
  .gradient-ethereal {
    background: linear-gradient(
      135deg,
      oklch(0.15 0.08 270) 0%,
      oklch(0.2 0.12 290) 15%,
      oklch(0.25 0.15 310) 30%,
      oklch(0.18 0.1 250) 45%,
      oklch(0.22 0.14 330) 60%,
      oklch(0.16 0.09 280) 75%,
      oklch(0.12 0.06 260) 100%
    );
  }

  .text-gradient-bright {
    background: linear-gradient(135deg, oklch(0.85 0.35 315) 0%, oklch(0.8 0.32 280) 40%, oklch(0.75 0.3 250) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 20px oklch(0.75 0.32 315 / 0.4);
  }

  .text-gradient {
    background: linear-gradient(135deg, oklch(0.75 0.32 315) 0%, oklch(0.7 0.3 280) 50%, oklch(0.68 0.28 250) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
  }

  /* Glass Morphism Effects */
  .glass-card {
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow:
      0 8px 32px rgba(168, 85, 247, 0.18),
      0 4px 16px rgba(147, 51, 234, 0.12),
      inset 0 1px 0 rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
  }

  .glass-card:hover {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow:
      0 12px 40px rgba(168, 85, 247, 0.25),
      0 6px 20px rgba(147, 51, 234, 0.18),
      inset 0 1px 0 rgba(255, 255, 255, 0.4);
  }

  .glass-input {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    transition: all 0.3s ease;
    outline: none;
  }

  .glass-input:focus,
  .glass-input:focus-visible {
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(168, 85, 247, 0.6);
    box-shadow:
      0 0 0 3px rgba(168, 85, 247, 0.2),
      0 4px 20px rgba(147, 51, 234, 0.3),
      0 0 20px rgba(168, 85, 247, 0.15);
    outline: none;
  }

  .glass-button {
    background: linear-gradient(
      135deg,
      rgba(168, 85, 247, 0.9) 0%,
      rgba(120, 119, 248, 0.9) 40%,
      rgba(59, 130, 246, 0.85) 100%
    );
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow:
      0 8px 32px rgba(168, 85, 247, 0.35),
      inset 0 1px 0 rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
  }

  .glass-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.25), transparent);
    transition: left 0.5s ease;
  }

  .glass-button:hover::before {
    left: 100%;
  }

  .glass-button:hover {
    background: linear-gradient(
      135deg,
      rgba(168, 85, 247, 1) 0%,
      rgba(120, 119, 248, 1) 40%,
      rgba(59, 130, 246, 0.95) 100%
    );
    box-shadow:
      0 12px 40px rgba(168, 85, 247, 0.45),
      inset 0 1px 0 rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
  }

  .glass-button:active {
    transform: translateY(0);
    box-shadow:
      0 4px 16px rgba(168, 85, 247, 0.35),
      inset 0 1px 0 rgba(255, 255, 255, 0.2);
  }

  .glass-secondary {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    transition: all 0.3s ease;
  }

  .glass-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.25);
    box-shadow: 0 8px 24px rgba(139, 69, 199, 0.15);
  }

  .glass-sidebar {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow:
      0 8px 32px rgba(168, 85, 247, 0.15),
      inset 0 1px 0 rgba(255, 255, 255, 0.2);
  }

  /* Обеспечиваем курсор pointer для всех кликабельных элементов */
  button,
  [role='button'],
  [data-state] {
    cursor: pointer;
  }

  /* Специальные стили для вкладок */
  [data-slot='tabs-list'] {
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
  }

  [data-slot='tabs-trigger'] {
    cursor: pointer !important;
    transition: all 0.3s ease;
  }

  [data-slot='tabs-trigger']:hover {
    background: rgba(255, 255, 255, 0.1);
  }

  [data-slot='tabs-trigger'][data-state='active'] {
    background: rgba(255, 255, 255, 0.2) !important;
    color: white !important;
    border: 1px solid rgba(255, 255, 255, 0.3);
  }

  /* Animated Background */
  .bg-animated {
    background: linear-gradient(
      135deg,
      oklch(0.15 0.25 270) 0%,
      oklch(0.25 0.3 300) 15%,
      oklch(0.45 0.35 320) 30%,
      oklch(0.2 0.28 250) 45%,
      oklch(0.35 0.32 280) 60%,
      oklch(0.1 0.2 290) 75%,
      oklch(0.18 0.25 260) 100%
    );
    position: relative;
    overflow: hidden;
  }

  .bg-animated::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
      radial-gradient(circle at 20% 50%, rgba(168, 85, 247, 0.35) 0%, transparent 50%),
      radial-gradient(circle at 80% 20%, rgba(120, 119, 248, 0.35) 0%, transparent 50%),
      radial-gradient(circle at 40% 80%, rgba(59, 130, 246, 0.25) 0%, transparent 50%),
      radial-gradient(circle at 60% 30%, rgba(192, 132, 252, 0.2) 0%, transparent 50%);
    animation: float 20s ease-in-out infinite;
  }

  @keyframes float {
    0%,
    100% {
      opacity: 1;
      transform: translateY(0px) rotate(0deg);
    }
    33% {
      opacity: 0.8;
      transform: translateY(-20px) rotate(2deg);
    }
    66% {
      opacity: 0.9;
      transform: translateY(10px) rotate(-1deg);
    }
  }

  /* Floating Particles Effect */
  .particles {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    overflow: hidden;
    z-index: 1;
  }

  .particle {
    position: absolute;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    animation: particleFloat 15s linear infinite;
  }

  .particle:nth-child(1) {
    width: 3px;
    height: 3px;
    left: 10%;
    animation-delay: 0s;
  }
  .particle:nth-child(2) {
    width: 2px;
    height: 2px;
    left: 20%;
    animation-delay: 2s;
  }
  .particle:nth-child(3) {
    width: 4px;
    height: 4px;
    left: 30%;
    animation-delay: 4s;
  }
  .particle:nth-child(4) {
    width: 2px;
    height: 2px;
    left: 40%;
    animation-delay: 6s;
  }
  .particle:nth-child(5) {
    width: 3px;
    height: 3px;
    left: 50%;
    animation-delay: 8s;
  }
  .particle:nth-child(6) {
    width: 2px;
    height: 2px;
    left: 60%;
    animation-delay: 10s;
  }
  .particle:nth-child(7) {
    width: 4px;
    height: 4px;
    left: 70%;
    animation-delay: 12s;
  }
  .particle:nth-child(8) {
    width: 2px;
    height: 2px;
    left: 80%;
    animation-delay: 14s;
  }
  .particle:nth-child(9) {
    width: 3px;
    height: 3px;
    left: 90%;
    animation-delay: 16s;
  }

  @keyframes particleFloat {
    0% {
      transform: translateY(100vh) rotate(0deg);
      opacity: 0;
    }
    10% {
      opacity: 1;
    }
    90% {
      opacity: 1;
    }
    100% {
      transform: translateY(-100px) rotate(360deg);
      opacity: 0;
    }
  }

  /* Enhanced Glow Effects */
  .glow-purple {
    box-shadow:
      0 0 20px rgba(168, 85, 247, 0.5),
      0 0 40px rgba(120, 119, 248, 0.35),
      0 0 60px rgba(59, 130, 246, 0.2),
      0 0 80px rgba(192, 132, 252, 0.15);
  }

  .glow-text {
    text-shadow:
      0 0 10px rgba(168, 85, 247, 0.6),
      0 0 20px rgba(120, 119, 248, 0.45),
      0 0 30px rgba(59, 130, 246, 0.3),
      0 0 40px rgba(192, 132, 252, 0.25);
  }
}

/* Убираем стрелки у input[type="number"] */
input[type='number']::-webkit-outer-spin-button,
input[type='number']::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

input[type='number'] {
  -moz-appearance: textfield;
}
