/* ============================================================
   ViralxPot — Base Styles
   Design Tokens, Reset, Typography, Background, Animations
   Premium Dark Luxury Aesthetic
   ============================================================ */

/* --- Animated border angle property --- */
@property --border-angle {
  syntax: "<angle>";
  initial-value: 0deg;
  inherits: false;
}

/* --- Design Tokens — Frosted Glass Midnight --- */
:root {
  --neon-purple: #8b5cf6;
  --neon-pink: #ec4899;
  --neon-purple-light: #a78bfa;
  --neon-pink-light: #f472b6;
  --neon-cyan: #22d3ee;
  --neon-teal: #14b8a6;

  --bg-dark: #050714;
  --bg-card: rgba(255, 255, 255, 0.05);
  --bg-panel: rgba(255, 255, 255, 0.05);
  --bg-input: rgba(0, 0, 0, 0.3);
  --bg-surface: rgba(255, 255, 255, 0.03);

  --border-subtle: rgba(255, 255, 255, 0.1);
  --border-light: rgba(255, 255, 255, 0.12);
  --border-glow: rgba(139, 92, 246, 0.25);

  --text-primary: #f0f0f5;
  --text-secondary: rgba(240, 240, 245, 0.905);
  --text-muted: rgba(240, 240, 245, 0.751);

  --font-sans: "Inter", system-ui, -apple-system, sans-serif;
  --font-display: "Outfit", system-ui, sans-serif;

  --radius-sm: 0.5rem;
  --radius-md: 0.75rem;
  --radius-lg: 0.25rem;
  --radius-xl: 0.4rem;
  --radius-2xl: 1.375rem;
  --radius-full: 9999px;

  --shadow-glow-sm: 0 0 15px rgba(139, 92, 246, 0.15);
  --shadow-glow-md: 0 0 30px rgba(139, 92, 246, 0.2);
  --shadow-card: 0 8px 32px -8px rgba(0, 0, 0, 0.5);
  --shadow-card-hover:
    0 20px 50px -12px rgba(139, 92, 246, 0.25),
    0 0 30px -8px rgba(236, 72, 153, 0.12);

  --glass-bg: rgba(255, 255, 255, 0.05);
  --glass-blur: blur(20px);
  --glass-border: rgba(255, 255, 255, 0.1);

  --transition-smooth: cubic-bezier(0.22, 1, 0.36, 1);
  --transition-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* --- Reset --- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
html::-webkit-scrollbar {
  display: none;
}
body::-webkit-scrollbar {
  display: none;
}

body {
  background-color: var(--bg-dark);
  color: var(--text-primary);
  font-family: var(--font-sans);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.6;
  /* Smooth page reveal — prevents flash on refresh */
  opacity: 0;
  animation: bodyReveal 0.4s ease 0.05s forwards;
}

/* Hidden scrollbar for everything */
* {
  scrollbar-width: none;
  -ms-overflow-style: none;
}
*::-webkit-scrollbar {
  display: none;
}

/* Premium noise texture overlay */
.page-wrapper::before {
  content: "";
  position: fixed;
  inset: 0;
  opacity: 0.015;
  background: 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.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 0;
}

img {
  max-width: 100%;
  display: block;
}
a {
  color: inherit;
  text-decoration: none;
  transition:
    color 0.25s ease,
    opacity 0.25s ease;
    text-align: center;
}
button {
  cursor: pointer;
  font-family: inherit;
}
input,
textarea,
select {
  font-family: inherit;
}
ul,
ol {
  list-style: none;
}

/* --- Typography --- */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.2;
}
.text-gradient {
  background: linear-gradient(
    135deg,
    var(--neon-purple-light),
    var(--neon-pink-light)
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.font-display {
  font-family: var(--font-display);
}

/* --- Glassmorphism --- */
.glass-panel {
  background: var(--bg-panel);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-card);
}

/* --- Layout --- */
.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1rem;
}
@media (min-width: 640px) {
  .container {
    padding: 0 1.5rem;
  }
}
@media (min-width: 1024px) {
  .container {
    padding: 0 2rem;
  }
}

.page-wrapper {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  width: 100%;
}

/* --- Floating Background Orbs (Frosted Glass style) --- */
.bg-orb {
  position: fixed;
  border-radius: 50%;
  pointer-events: none;
  z-index: -1;
  will-change: transform;
  max-width: 100vw;
}
.bg-orb--purple {
  top: -10%;
  right: -5%;
  width: min(650px, 80vw);
  height: min(650px, 80vw);
  background: rgba(88, 28, 135, 0.2);
  filter: blur(120px);
  animation: float 22s ease-in-out infinite;
}
.bg-orb--pink {
  bottom: -10%;
  left: -5%;
  width: min(600px, 75vw);
  height: min(600px, 75vw);
  background: rgba(112, 26, 117, 0.1);
  filter: blur(150px);
  animation: float 28s ease-in-out infinite reverse;
}
.bg-orb--center {
  top: 35%;
  left: 50%;
  transform: translateX(-50%);
  width: min(700px, 85vw);
  height: min(350px, 45vw);
  background: radial-gradient(ellipse, rgba(99, 102, 241, 0.04), transparent);
  filter: blur(130px);
  animation: float 32s ease-in-out infinite;
}

/* ============================================================
   ANIMATIONS & KEYFRAMES
   ============================================================ */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes shimmer {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}
@keyframes float {
  0%,
  100% {
    transform: translate(0, 0);
  }
  25% {
    transform: translate(15px, -15px);
  }
  50% {
    transform: translate(-8px, 12px);
  }
  75% {
    transform: translate(12px, 8px);
  }
}
@keyframes borderRotate {
  to {
    --border-angle: 360deg;
  }
}
@keyframes bodyReveal {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
@keyframes glow {
  0%,
  100% {
    box-shadow:
      0 0 10px rgba(139, 92, 246, 0.2),
      0 0 20px rgba(139, 92, 246, 0.1);
  }
  50% {
    box-shadow:
      0 0 20px rgba(236, 72, 153, 0.3),
      0 0 30px rgba(236, 72, 153, 0.15);
  }
}
@keyframes ripple {
  to {
    transform: scale(4);
    opacity: 0;
  }
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}
@keyframes toastOut {
  to {
    opacity: 0;
    transform: translateY(-10px) scale(0.95);
  }
}
@keyframes softPulse {
  0%,
  100% {
    opacity: 0.5;
  }
  50% {
    opacity: 1;
  }
}

/* Staggered card entrance */
.card:nth-child(1) {
  animation-delay: 0s;
}
.card:nth-child(2) {
  animation-delay: 0.04s;
}
.card:nth-child(3) {
  animation-delay: 0.08s;
}
.card:nth-child(4) {
  animation-delay: 0.12s;
}
.card:nth-child(5) {
  animation-delay: 0.16s;
}
.card:nth-child(6) {
  animation-delay: 0.2s;
}
.card:nth-child(7) {
  animation-delay: 0.24s;
}
.card:nth-child(8) {
  animation-delay: 0.28s;
}
.card:nth-child(9) {
  animation-delay: 0.32s;
}
.card:nth-child(10) {
  animation-delay: 0.36s;
}
.card:nth-child(11) {
  animation-delay: 0.4s;
}
.card:nth-child(12) {
  animation-delay: 0.44s;
}

/* ============================================================
   FOCUS & ACCESSIBILITY
   ============================================================ */
*:focus-visible {
  outline: 2px solid var(--neon-purple-light);
  outline-offset: 2px;
  border-radius: 4px;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ============================================================
   UTILITY CLASSES
   ============================================================ */
.hidden {
  display: none !important;
}
.flex {
  display: flex;
}
.items-center {
  align-items: center;
}
.gap-2 {
  gap: 0.5rem;
}
.gap-4 {
  gap: 1rem;
}
.mt-4 {
  margin-top: 1rem;
}
.mb-4 {
  margin-bottom: 1rem;
}
.text-center {
  text-align: center;
}
.text-sm {
  font-size: 0.875rem;
}
.text-xs {
  font-size: 0.75rem;
}

/* Autofill fix */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active {
  -webkit-box-shadow: 0 0 0 30px #050714 inset !important;
  -webkit-text-fill-color: #f0f0f5 !important;
  transition: background-color 5000s ease-in-out 0s;
}
