:root {
  --blue: #3b82f6;
  --purple: #8b5cf6;
  --cyan: #06b6d4;
  --emerald: #10b981;
  --rose: #f43f5e;
  --black: #030305;
  --white: #ffffff;
  --text-muted: #94a3b8;
  --text-soft: #cbd5e1;
  --card-bg: rgba(15, 18, 30, 0.4);
  --card-border: rgba(255, 255, 255, 0.08);
  --border-glow: rgba(59, 130, 246, 0.35);
  --gradient: linear-gradient(135deg, var(--blue), var(--purple));
  --gradient-hover: linear-gradient(135deg, #2563eb, #7c3aed);
  --shadow-lg: 0 20px 50px rgba(0, 0, 0, 0.5);
  --radius-xl: 24px;
  --radius-lg: 18px;
  --font-main: "Inter", system-ui, -apple-system, sans-serif;
  --font-heading: "Plus Jakarta Sans", sans-serif;
}

/* Global Styles */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  cursor: url("assets/cursor.svg") 8 8, auto;
}

html {
  scroll-behavior: smooth;
  background-color: var(--black);
}

body {
  font-family: var(--font-main);
  background: var(--black);
  color: var(--white);
  min-height: 100vh;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

body.loading {
  overflow: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 999;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
  opacity: 0.04;
  pointer-events: none;
}

.container {
  width: min(1200px, 92%);
  margin: 0 auto;
}

/* Background Overlay */
.bg-overlay {
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(circle at 10% 20%, rgba(59, 130, 246, 0.15), transparent 40%),
    radial-gradient(circle at 90% 10%, rgba(139, 92, 246, 0.18), transparent 40%),
    radial-gradient(circle at 50% 50%, rgba(6, 182, 212, 0.08), transparent 50%),
    linear-gradient(rgba(6, 6, 10, 0.9), rgba(6, 6, 10, 0.98)),
    url("https://images.unsplash.com/photo-1614850523296-d8c1af93d400?auto=format&fit=crop&w=2000&q=80")
      center / cover no-repeat;
  filter: contrast(1.1);
  animation: bgPulse 20s ease-in-out infinite alternate;
}

/* Preloader */
#preloader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--black);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.8s;
}

#preloader.loaded {
  opacity: 0;
  visibility: hidden;
}

.loader-content {
  text-align: center;
  width: min(300px, 80%);
}

.loader-logo {
  font-family: var(--font-heading);
  font-size: 4.5rem;
  font-weight: 900;
  margin-bottom: 2.5rem;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: loaderPulse 1.5s infinite ease-in-out;
  filter: drop-shadow(0 0 30px rgba(59, 130, 246, 0.6));
}

.loader-bar-container {
  width: 100%;
  height: 4px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 1rem;
}

.loader-bar {
  width: 0%;
  height: 100%;
  background: var(--gradient);
  box-shadow: 0 0 15px var(--blue);
  transition: width 0.4s ease;
}

.loader-text {
  font-size: 1rem;
  font-weight: 700;
  color: var(--white);
  text-transform: uppercase;
  letter-spacing: 4px;
  animation: loaderTextFade 1.2s infinite alternate;
}

/* Header & Navbar V2 */
.site-header {
  position: fixed;
  top: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  width: min(1200px, 92%);
  z-index: 1000;
  border-radius: 24px;
  backdrop-filter: blur(20px) saturate(180%);
  background: rgba(15, 18, 30, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 15px 50px rgba(0, 0, 0, 0.3);
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.site-header.scrolled {
  top: 0;
  width: 100%;
  border-radius: 0;
  background: rgba(6, 7, 10, 0.95);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding: 0.2rem 0;
}

.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  padding: 0 2.5rem;
}

.brand {
  font-family: var(--font-heading);
  text-decoration: none;
  color: var(--white);
  font-weight: 800;
  letter-spacing: 1px;
  font-size: 1.7rem;
  display: flex;
  align-items: center;
  transition: transform 0.3s ease;
}

.brand:hover {
  transform: scale(1.05);
}

.nav-links {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.03);
  padding: 0.4rem;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.nav-links a {
  color: var(--text-soft);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  padding: 0.7rem 1.4rem;
  border-radius: 14px;
  position: relative;
}

.nav-links a:hover {
  color: var(--white);
  background: rgba(255, 255, 255, 0.08);
}

.nav-links a.active {
  color: var(--white);
  background: var(--gradient);
  box-shadow: 0 5px 15px rgba(59, 130, 246, 0.3);
}

.nav-right {
  display: flex;
  justify-content: flex-end;
}

/* User Menu V2 */
.user-menu-v2 {
  position: relative;
}

.user-trigger {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.4rem 0.8rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.user-trigger:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--blue);
}

.nav-avatar {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  object-fit: cover;
}

.username-nav {
  font-weight: 700;
  font-size: 0.9rem;
}

.user-dropdown-v2 {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  width: 220px;
  background: rgba(15, 18, 30, 0.95);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  padding: 0.8rem;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.user-menu-v2:hover .user-dropdown-v2 {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-header {
  padding: 0.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  margin-bottom: 0.5rem;
}

.dropdown-user-id {
  font-size: 0.7rem;
  color: var(--text-muted);
  font-family: monospace;
}

.dropdown-links a {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  color: var(--text-soft);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: 12px;
  transition: all 0.2s ease;
}

.dropdown-links a:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--white);
  padding-left: 1.25rem;
}

.dropdown-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.05);
  margin: 0.5rem 0;
}

.logout-btn-v2:hover {
  color: var(--rose) !important;
}

.btn-discord-v2 {
  background: #5865f2;
  color: white;
  padding: 0.6rem 1.4rem;
  border-radius: 16px;
  font-weight: 700;
  font-size: 0.85rem;
  border: none;
  transition: all 0.3s ease;
  text-decoration: none;
}

.btn-discord-v2:hover {
  background: #4752c4;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(88, 101, 242, 0.3);
}

.nav-toggle-v2 {
  display: none;
  flex-direction: column;
  gap: 6px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  cursor: pointer;
  padding: 0.6rem;
  border-radius: 12px;
  width: 44px;
  height: 44px;
  justify-content: center;
  align-items: center;
  transition: all 0.3s ease;
}

.nav-toggle-v2 span {
  width: 22px;
  height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-toggle-v2.active span:nth-child(1) {
  transform: translateY(4px) rotate(45deg);
}

.nav-toggle-v2.active span:nth-child(2) {
  transform: translateY(-4px) rotate(-45deg);
}

/* Hero Section */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  gap: 1.5rem;
  padding: 8rem 0 5rem;
  position: relative;
}

.hero-content > * {
  opacity: 0;
  transform: translateY(20px);
}

.loaded .hero-content > * {
  animation: entranceFadeUp 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

.loaded .hero-content > *:nth-child(1) { animation-delay: 0.2s; }
.loaded .hero-content > *:nth-child(2) { animation-delay: 0.3s; }
.loaded .hero-content > *:nth-child(3) { animation-delay: 0.4s; }
.loaded .hero-content > *:nth-child(4) { animation-delay: 0.5s; }
.loaded .hero-content > *:nth-child(5) { animation-delay: 0.6s; }

.hero-logo-v2 {
  width: 120px;
  height: 120px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  position: relative;
  animation: floatLogo 6s ease-in-out infinite;
}

.hero-logo-v2::after {
  content: "";
  position: absolute;
  inset: -10px;
  background: var(--gradient);
  filter: blur(25px);
  opacity: 0.15;
  z-index: -1;
}

.logo-text {
  font-family: var(--font-heading);
  font-size: 2.5rem;
  font-weight: 900;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

h1 {
  font-family: var(--font-heading);
  font-size: clamp(3rem, 10vw, 6rem);
  font-weight: 800;
  line-height: 0.9;
  letter-spacing: -3px;
  margin-bottom: 1.5rem;
}

.text-gradient {
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 10px 30px rgba(59, 130, 246, 0.3));
}

/* Buttons */
.btn {
  text-decoration: none;
  border: none;
  border-radius: 16px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.9rem 1.8rem;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  font-family: var(--font-heading);
  font-size: 0.95rem;
}

.btn:hover {
  transform: translateY(-4px) scale(1.02);
}

.btn-gradient {
  background: var(--gradient);
  color: var(--white);
  box-shadow: 0 10px 25px rgba(59, 130, 246, 0.3);
}

/* Sections */
.section {
  padding: 8rem 0;
}

.section-header h2 {
  font-family: var(--font-heading);
  font-size: clamp(2.5rem, 5vw, 4rem);
  margin-bottom: 1rem;
  letter-spacing: -2px;
}

/* Bento Grid */
.bento-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 200px;
  gap: 1.5rem;
}

.bento-item {
  background: rgba(20, 24, 40, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 32px;
  padding: 2.5rem;
  backdrop-filter: blur(10px);
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.bento-item:hover {
  border-color: rgba(59, 130, 246, 0.3);
  background: rgba(20, 24, 40, 0.6);
  transform: translateY(-10px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

/* Cards */
.card {
  background: rgba(20, 24, 40, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 24px;
  padding: 2rem;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.card:hover {
  transform: translateY(-8px);
  border-color: var(--blue);
  background: rgba(20, 24, 40, 0.6);
}

/* Footer V2 */
.site-footer {
  background: rgba(6, 7, 10, 0.8);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding: 5rem 0 3rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 4rem;
  margin-bottom: 4rem;
}

.footer-brand .brand {
  margin-bottom: 1.5rem;
}

.footer-brand p {
  color: var(--text-muted);
  max-width: 300px;
  font-size: 0.95rem;
}

.footer-col h4 {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  margin-bottom: 1.5rem;
  color: var(--white);
}

.footer-col ul {
  list-style: none;
}

.footer-col ul li {
  margin-bottom: 0.8rem;
}

.footer-col ul a {
  color: var(--text-muted);
  text-decoration: none;
  transition: all 0.2s ease;
  font-size: 0.95rem;
}

.footer-col ul a:hover {
  color: var(--blue);
  padding-left: 5px;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
  font-size: 0.9rem;
}

.footer-legal {
  display: flex;
  gap: 1.5rem;
}

.footer-legal a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.2s ease;
}

.footer-legal a:hover {
  color: var(--white);
}

/* Animations */
@keyframes entranceFadeUp {
  to { opacity: 1; transform: translateY(0); }
}

@keyframes bgPulse {
  0% { filter: contrast(1.1) brightness(1); }
  100% { filter: contrast(1.1) brightness(1.2); }
}

@keyframes loaderPulse {
  0%, 100% { transform: scale(1); opacity: 0.8; }
  50% { transform: scale(1.1); opacity: 1; }
}

@keyframes floatLogo {
  0%, 100% { transform: translateY(0) rotate(0); }
  50% { transform: translateY(-10px) rotate(5deg); }
}

@media (max-width: 1024px) {
  .nav-links {
    display: none;
  }

  .nav-links.open {
    display: flex;
  }

  .nav-left, .nav-right {
    flex: initial;
  }
  
  .nav-toggle-v2 {
    display: flex;
  }
}

@media (max-width: 768px) {
  .nav-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
  .footer-brand {
    grid-column: span 2;
  }
}

@media (max-width: 768px) {
  .footer-bottom {
    flex-direction: column;
    gap: 1.5rem;
    text-align: center;
  }
  
  .footer-grid {
    grid-template-columns: 1fr;
  }
  .footer-brand {
    grid-column: span 1;
  }
}
