@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;600;800;900&family=Space+Grotesk:wght@400;700&display=swap');

:root {
  --bg-dark: #0a0a0f;
  --bg-darker: #050508;
  --accent-gold: #FFD700;
  --accent-blue: #00F0FF;
  --accent-purple: #B026FF;
  --text-main: #FFFFFF;
  --text-muted: #8A8A93;
  --glass-bg: rgba(255, 255, 255, 0.03);
  --glass-border: rgba(255, 255, 255, 0.08);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  scroll-behavior: smooth;
}

body {
  font-family: 'Outfit', sans-serif;
  background-color: var(--bg-dark);
  color: var(--text-main);
  overflow-x: hidden;
  background-image: 
    radial-gradient(circle at 15% 50%, rgba(176, 38, 255, 0.05), transparent 25%),
    radial-gradient(circle at 85% 30%, rgba(0, 240, 255, 0.05), transparent 25%);
  background-attachment: fixed;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Space Grotesk', sans-serif;
}

/* Typography & Gradients */
.text-gradient-gold {
  background: linear-gradient(to right, var(--accent-gold), #FFaa00);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.text-gradient-blue {
  background: linear-gradient(to right, var(--accent-blue), #0077FF);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.text-gradient-purple {
  background: linear-gradient(to right, var(--accent-purple), #FF00FF);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Layout & Glassmorphism */
.glass-panel {
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  border-radius: 24px;
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
}

.glass-card {
  background: linear-gradient(145deg, rgba(255,255,255,0.05) 0%, rgba(255,255,255,0.01) 100%);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: 16px;
  transition: box-shadow 0.3s ease, border-color 0.3s ease;
}

.glass-card:hover {
  transform: translateY(-5px);
  border-color: rgba(255,255,255,0.2);
  box-shadow: 0 10px 30px -10px var(--accent-blue);
}

.glass-card.gold:hover {
  box-shadow: 0 10px 30px -10px var(--accent-gold);
}

.glass-card.purple:hover {
  box-shadow: 0 10px 30px -10px var(--accent-purple);
}

/* Navigation */
nav {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
  padding: 1rem 2rem;
  transition: all 0.3s ease;
}

nav.scrolled {
  background: rgba(5, 5, 8, 0.8);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--glass-border);
}

/* Buttons */
.btn-primary {
  position: relative;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  padding: 12px 32px;
  background: transparent;
  color: #fff;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  border: 1px solid var(--accent-blue);
  border-radius: 8px;
  overflow: hidden;
  transition: background-color 0.3s ease, box-shadow 0.3s ease, color 0.3s ease, border-color 0.3s ease;
  cursor: pointer;
  z-index: 1;
}

.btn-primary::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 0%;
  height: 100%;
  background: var(--accent-blue);
  z-index: -1;
  transition: all 0.3s ease;
}

.btn-primary:hover::before {
  width: 100%;
}

.btn-primary:hover {
  box-shadow: 0 0 20px rgba(0, 240, 255, 0.5);
  color: #000;
}

.btn-gold {
  border-color: var(--accent-gold);
}
.btn-gold::before { background: var(--accent-gold); }
.btn-gold:hover { box-shadow: 0 0 20px rgba(255, 215, 0, 0.5); }

/* Hero Section */
.hero {
  min-height: 100vh;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding-top: 80px;
}

.hero-content {
  position: relative;
  z-index: 10;
  text-align: center;
}

.glitch-wrapper {
  position: relative;
}

.glitch {
  font-size: 6rem;
  font-weight: 900;
  text-transform: uppercase;
  position: relative;
  text-shadow: 0 0 20px rgba(0, 240, 255, 0.5);
}

/* Floating Elements Canvas */
#canvas-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
}

/* AI Chatbot */
.chatbot-container {
  position: fixed;
  bottom: 30px;
  right: 30px;
  z-index: 999;
}

.chat-toggle {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-purple), var(--accent-blue));
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  color: white;
  box-shadow: 0 0 20px rgba(176, 38, 255, 0.5);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.chat-toggle:hover {
  transform: scale(1.1);
  box-shadow: 0 0 30px rgba(176, 38, 255, 0.8);
}

.chat-window {
  position: absolute;
  bottom: 80px;
  right: 0;
  width: 350px;
  height: 450px;
  border-radius: 20px;
  display: flex;
  flex-direction: column;
  transform-origin: bottom right;
  transform: scale(0);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.chat-window.open {
  transform: scale(1);
  opacity: 1;
}

.chat-header {
  padding: 15px 20px;
  background: rgba(0, 0, 0, 0.5);
  border-bottom: 1px solid var(--glass-border);
  border-top-left-radius: 20px;
  border-top-right-radius: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.chat-header .status-dot {
  width: 8px;
  height: 8px;
  background: #00ff00;
  border-radius: 50%;
  box-shadow: 0 0 10px #00ff00;
}

.chat-body {
  flex: 1;
  padding: 15px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.message {
  max-width: 80%;
  padding: 10px 15px;
  border-radius: 15px;
  font-size: 0.9rem;
  line-height: 1.4;
}

.message.bot {
  background: rgba(176, 38, 255, 0.1);
  border: 1px solid rgba(176, 38, 255, 0.3);
  align-self: flex-start;
  border-bottom-left-radius: 0;
}

.message.user {
  background: rgba(0, 240, 255, 0.1);
  border: 1px solid rgba(0, 240, 255, 0.3);
  align-self: flex-end;
  border-bottom-right-radius: 0;
}

.chat-input {
  padding: 15px;
  background: rgba(0, 0, 0, 0.5);
  border-top: 1px solid var(--glass-border);
  border-bottom-left-radius: 20px;
  border-bottom-right-radius: 20px;
  display: flex;
  gap: 10px;
}

.chat-input input {
  flex: 1;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--glass-border);
  padding: 10px 15px;
  border-radius: 8px;
  color: white;
  outline: none;
  font-family: 'Outfit', sans-serif;
  transition: border-color 0.3s;
}

.chat-input input:focus {
  border-color: var(--accent-purple);
}

.chat-input button {
  background: var(--accent-purple);
  color: white;
  border: none;
  border-radius: 8px;
  padding: 0 15px;
  cursor: pointer;
  transition: background 0.3s;
}

.chat-input button:hover {
  background: #9015db;
}

/* Forms */
.input-group {
  position: relative;
  margin-bottom: 1.5rem;
}

.input-group input, .input-group select {
  width: 100%;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--glass-border);
  padding: 15px 20px;
  border-radius: 12px;
  color: white;
  font-family: 'Outfit', sans-serif;
  font-size: 1rem;
  outline: none;
  transition: all 0.3s;
}

.input-group input:focus, .input-group select:focus {
  border-color: var(--accent-blue);
  box-shadow: 0 0 15px rgba(0, 240, 255, 0.2);
  background: rgba(255, 255, 255, 0.05);
}

.input-group label {
  position: absolute;
  top: 50%;
  left: 20px;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
  transition: all 0.3s ease;
}

.input-group input:focus ~ label,
.input-group input:valid ~ label {
  top: -10px;
  left: 15px;
  font-size: 0.8rem;
  background: var(--bg-dark);
  padding: 0 5px;
  color: var(--accent-blue);
}

/* Sections */
section {
  padding: 100px 20px;
  position: relative;
}

.section-title {
  text-align: center;
  font-size: 3rem;
  margin-bottom: 3rem;
  text-transform: uppercase;
  letter-spacing: 2px;
}

/* Utility Animations */
@keyframes pulseGlow {
  0% { box-shadow: 0 0 10px rgba(0, 240, 255, 0.2); }
  50% { box-shadow: 0 0 30px rgba(0, 240, 255, 0.6); }
  100% { box-shadow: 0 0 10px rgba(0, 240, 255, 0.2); }
}

.pulse-glow {
  animation: pulseGlow 2s infinite;
}

/* Loader */
#loader {
  position: fixed;
  inset: 0;
  background: var(--bg-darker);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}

.loader-core {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  border: 4px solid transparent;
  border-top-color: var(--accent-blue);
  border-bottom-color: var(--accent-purple);
  animation: spin 1.5s linear infinite;
  position: relative;
}

.loader-core::before {
  content: '';
  position: absolute;
  top: 10px; left: 10px; right: 10px; bottom: 10px;
  border-radius: 50%;
  border: 4px solid transparent;
  border-left-color: var(--accent-gold);
  border-right-color: var(--accent-gold);
  animation: spin 1s linear infinite reverse;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 10px;
}
::-webkit-scrollbar-track {
  background: var(--bg-darker);
}
::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.1);
  border-radius: 5px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--accent-blue);
}

/* Custom cursors for aesthetic */
.cursor-dot {
  width: 8px;
  height: 8px;
  background-color: var(--accent-blue);
  border-radius: 50%;
  position: fixed;
  pointer-events: none;
  z-index: 10000;
  transform: translate(-50%, -50%);
  transition: width 0.2s, height 0.2s;
}

.cursor-outline {
  width: 40px;
  height: 40px;
  border: 1px solid rgba(0, 240, 255, 0.5);
  border-radius: 50%;
  position: fixed;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  transition: width 0.2s, height 0.2s, border-color 0.2s;
}

/* Leaderboard Table */
.leaderboard-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 10px;
}

.leaderboard-table th {
  padding: 15px;
  text-align: left;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.leaderboard-table td {
  padding: 20px 15px;
  background: rgba(255,255,255,0.02);
  border-top: 1px solid var(--glass-border);
  border-bottom: 1px solid var(--glass-border);
}

.leaderboard-table tr td:first-child {
  border-left: 1px solid var(--glass-border);
  border-top-left-radius: 12px;
  border-bottom-left-radius: 12px;
}

.leaderboard-table tr td:last-child {
  border-right: 1px solid var(--glass-border);
  border-top-right-radius: 12px;
  border-bottom-right-radius: 12px;
}

.leaderboard-table tr:hover td {
  background: rgba(255,255,255,0.05);
}

.rank-1 td { border-color: rgba(255, 215, 0, 0.5) !important; box-shadow: inset 0 0 20px rgba(255, 215, 0, 0.1); }
.rank-2 td { border-color: rgba(192, 192, 192, 0.5) !important; }
.rank-3 td { border-color: rgba(205, 127, 50, 0.5) !important; }

/* Dashboard Cards */
.stat-card {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 20px;
}

.stat-icon {
  width: 60px;
  height: 60px;
  border-radius: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  background: rgba(255,255,255,0.05);
}

.stat-info h4 {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 5px;
}

.stat-info p {
  font-size: 1.5rem;
  font-weight: 700;
  font-family: 'Space Grotesk', sans-serif;
}
