/**
 * TOP1 GROUP - Ultimate 3D Futuristic Gaming UI Theme
 * Pure High-Performance Modern CSS & Glassmorphism
 */

:root {
  --bg-main: #070913;
  --bg-card: rgba(16, 23, 42, 0.75);
  --bg-card-hover: rgba(22, 32, 60, 0.85);
  --border-color: rgba(255, 255, 255, 0.1);
  --border-glow: rgba(0, 240, 255, 0.4);
  
  --primary: #00f0ff;
  --primary-glow: rgba(0, 240, 255, 0.5);
  --secondary: #9d4edd;
  --secondary-glow: rgba(157, 78, 221, 0.5);
  --accent: #ff007f;
  --accent-glow: rgba(255, 0, 127, 0.5);
  --success: #00f59b;
  --warning: #ffb703;
  --danger: #ef4444;

  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  
  --font-heading: 'Rajdhani', 'Hind Siliguri', sans-serif;
  --font-body: 'Inter', 'Hind Siliguri', sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
}

body {
  background-color: var(--bg-main);
  background-image: 
    radial-gradient(circle at 15% 15%, rgba(157, 78, 221, 0.18) 0%, transparent 45%),
    radial-gradient(circle at 85% 20%, rgba(0, 240, 255, 0.18) 0%, transparent 45%),
    radial-gradient(circle at 50% 80%, rgba(255, 0, 127, 0.12) 0%, transparent 50%),
    linear-gradient(180deg, #070913 0%, #0b0f19 100%);
  background-attachment: fixed;
  color: var(--text-main);
  font-family: var(--font-body);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: #070913;
}
::-webkit-scrollbar-thumb {
  background: #1e293b;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--primary);
}

/* Typography & Headings */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  letter-spacing: 0.5px;
}

.text-gradient {
  background: linear-gradient(135deg, #00f0ff 0%, #a855f7 50%, #ff007f 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.text-gradient-cyan {
  background: linear-gradient(135deg, #00f0ff 0%, #3b82f6 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.text-gradient-gold {
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Navigation Bar */
.top1-navbar {
  background: rgba(7, 9, 19, 0.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 1000;
  transition: all 0.3s ease;
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  font-family: var(--font-heading);
  font-size: 1.6rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: 1px;
}

.logo-badge {
  background: linear-gradient(135deg, #00f0ff, #9d4edd);
  color: #000;
  font-weight: 900;
  padding: 4px 10px;
  border-radius: 8px;
  box-shadow: 0 0 15px var(--primary-glow);
}

.nav-link {
  color: var(--text-muted) !important;
  font-weight: 500;
  font-size: 0.95rem;
  transition: all 0.25s ease;
  padding: 8px 16px !important;
  border-radius: 8px;
}

.nav-link:hover, .nav-link.active {
  color: var(--primary) !important;
  background: rgba(0, 240, 255, 0.08);
  text-shadow: 0 0 10px var(--primary-glow);
}

/* 3D Glassmorphism Cards */
.top1-card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-color);
  border-radius: 18px;
  padding: 24px;
  position: relative;
  transition: transform 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.35s ease, border-color 0.35s ease;
  overflow: hidden;
}

.top1-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--primary), var(--secondary), transparent);
  opacity: 0.4;
  transition: opacity 0.3s;
}

.top1-card-3d:hover {
  transform: translateY(-8px) scale(1.02);
  border-color: var(--border-glow);
  box-shadow: 0 20px 40px -15px rgba(0, 240, 255, 0.25), 0 0 25px rgba(157, 78, 221, 0.15);
}

.top1-card-3d:hover::before {
  opacity: 1;
}

/* Buttons */
.btn-top1-primary {
  background: linear-gradient(135deg, #00f0ff 0%, #0084ff 100%);
  color: #030712;
  font-weight: 700;
  border: none;
  padding: 12px 26px;
  border-radius: 12px;
  box-shadow: 0 0 20px rgba(0, 240, 255, 0.4);
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
  cursor: pointer;
}

.btn-top1-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 0 30px rgba(0, 240, 255, 0.7);
  color: #000;
}

.btn-top1-secondary {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  font-weight: 600;
  padding: 12px 24px;
  border-radius: 12px;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
  cursor: pointer;
}

.btn-top1-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--primary);
  color: var(--primary);
  box-shadow: 0 0 15px rgba(0, 240, 255, 0.2);
}

.btn-top1-glow {
  background: linear-gradient(135deg, #9d4edd 0%, #ff007f 100%);
  color: #fff;
  font-weight: 700;
  border: none;
  padding: 12px 24px;
  border-radius: 12px;
  box-shadow: 0 0 25px rgba(255, 0, 127, 0.4);
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  text-decoration: none;
}

.btn-top1-glow:hover {
  transform: translateY(-3px);
  box-shadow: 0 0 35px rgba(255, 0, 127, 0.7);
  color: #fff;
}

/* Floating 3D Elements */
.float-animation {
  animation: floating 4s ease-in-out infinite;
}

@keyframes floating {
  0% { transform: translateY(0px) rotate(0deg); }
  50% { transform: translateY(-12px) rotate(1deg); }
  100% { transform: translateY(0px) rotate(0deg); }
}

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

@keyframes pulseGlow {
  0% { box-shadow: 0 0 10px rgba(0, 240, 255, 0.3); }
  50% { box-shadow: 0 0 25px rgba(0, 240, 255, 0.7); }
  100% { box-shadow: 0 0 10px rgba(0, 240, 255, 0.3); }
}

/* Badges */
.badge-neon-cyan {
  background: rgba(0, 240, 255, 0.15);
  color: #00f0ff;
  border: 1px solid rgba(0, 240, 255, 0.4);
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 700;
}

.badge-neon-purple {
  background: rgba(157, 78, 221, 0.15);
  color: #c084fc;
  border: 1px solid rgba(157, 78, 221, 0.4);
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 700;
}

.badge-neon-green {
  background: rgba(0, 245, 155, 0.15);
  color: #00f59b;
  border: 1px solid rgba(0, 245, 155, 0.4);
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 700;
}

/* Form Controls */
.top1-input {
  background: rgba(15, 23, 42, 0.8) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  color: #fff !important;
  border-radius: 12px !important;
  padding: 12px 18px !important;
  transition: all 0.3s ease !important;
}

.top1-input:focus {
  background: rgba(20, 30, 55, 0.9) !important;
  border-color: var(--primary) !important;
  box-shadow: 0 0 15px var(--primary-glow) !important;
  outline: none !important;
}

.top1-input::placeholder {
  color: #64748b !important;
}

/* Code Snippet / Terminal Box */
.terminal-box {
  background: #030712;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  padding: 18px;
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  font-size: 0.88rem;
  color: #38bdf8;
  position: relative;
  overflow-x: auto;
}

.terminal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.terminal-dots {
  display: flex;
  gap: 6px;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
.dot-red { background: #ef4444; }
.dot-yellow { background: #f59e0b; }
.dot-green { background: #10b981; }

/* Custom Tables */
.top1-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 8px;
}

.top1-table thead th {
  background: transparent;
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 12px 16px;
  border: none;
}

.top1-table tbody tr {
  background: rgba(16, 23, 42, 0.6);
  border-radius: 12px;
  transition: all 0.2s ease;
}

.top1-table tbody tr:hover {
  background: rgba(30, 41, 69, 0.8);
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.top1-table tbody td {
  padding: 16px;
  color: #fff;
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
}

.top1-table tbody td:first-child {
  border-left: 1px solid var(--border-color);
  border-top-left-radius: 12px;
  border-bottom-left-radius: 12px;
}

.top1-table tbody td:last-child {
  border-right: 1px solid var(--border-color);
  border-top-right-radius: 12px;
  border-bottom-right-radius: 12px;
}

/* User Balance Pill */
.balance-pill {
  background: linear-gradient(135deg, rgba(0, 240, 255, 0.15), rgba(157, 78, 221, 0.15));
  border: 1px solid var(--primary);
  color: #fff;
  padding: 6px 16px;
  border-radius: 25px;
  font-weight: 700;
  font-size: 0.95rem;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 0 15px var(--primary-glow);
}

/* Room Code Reveal Display Box */
.room-code-display {
  background: linear-gradient(135deg, rgba(0, 240, 255, 0.1), rgba(157, 78, 221, 0.15));
  border: 2px dashed var(--primary);
  border-radius: 16px;
  padding: 24px;
  text-align: center;
  position: relative;
}

.room-code-number {
  font-size: 2.6rem;
  font-weight: 900;
  letter-spacing: 4px;
  color: #00f0ff;
  text-shadow: 0 0 20px var(--primary-glow);
  font-family: 'JetBrains Mono', monospace;
  margin: 10px 0;
}

/* Marquee Notice Bar */
.marquee-bar {
  background: rgba(157, 78, 221, 0.12);
  border-bottom: 1px solid rgba(157, 78, 221, 0.3);
  padding: 8px 0;
  font-size: 0.9rem;
  color: #e2e8f0;
}

/* Dashboard Sidebar */
.dashboard-sidebar {
  background: rgba(15, 23, 42, 0.7);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 20px;
  min-height: calc(100vh - 120px);
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 18px;
  border-radius: 12px;
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 600;
  margin-bottom: 6px;
  transition: all 0.25s ease;
}

.sidebar-link:hover, .sidebar-link.active {
  background: linear-gradient(90deg, rgba(0, 240, 255, 0.15), transparent);
  color: var(--primary);
  border-left: 3px solid var(--primary);
  transform: translateX(4px);
}

/* Footer */
.top1-footer {
  background: #04060b;
  border-top: 1px solid var(--border-color);
  padding: 50px 0 25px;
  margin-top: 80px;
}

/* 3D Cyber Particle Background Canvas */
#cyberCanvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: -1;
  opacity: 0.65;
}

/* Animated Flowing Neon Gradient Border */
.neon-border-animated {
  position: relative;
  border: 1px solid transparent;
  background-clip: padding-box;
}

.neon-border-animated::after {
  content: '';
  position: absolute;
  top: -2px; bottom: -2px;
  left: -2px; right: -2px;
  background: linear-gradient(60deg, #00f0ff, #9d4edd, #ff007f, #00f59b, #00f0ff);
  background-size: 300% 300%;
  border-radius: inherit;
  z-index: -1;
  animation: cyberBorderFlow 6s linear infinite;
  opacity: 0.7;
}

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

/* 3D Glow Card Highlights */
.top1-glow-cyan {
  box-shadow: 0 10px 30px -10px rgba(0, 240, 255, 0.45);
}
.top1-glow-purple {
  box-shadow: 0 10px 30px -10px rgba(157, 78, 221, 0.45);
}
.top1-glow-gold {
  box-shadow: 0 10px 30px -10px rgba(245, 158, 11, 0.45);
}
.top1-glow-green {
  box-shadow: 0 10px 30px -10px rgba(0, 245, 155, 0.45);
}

/* Pulsing Live Dots */
.live-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
  background-color: var(--success);
  box-shadow: 0 0 12px var(--success);
  animation: pulseDot 1.5s infinite;
}

@keyframes pulseDot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
}

/* Shimmer Highlight Effect */
.shimmer-text {
  background: linear-gradient(90deg, #fff 0%, #00f0ff 25%, #ff007f 50%, #00f59b 75%, #fff 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: textShine 4s linear infinite;
}

@keyframes textShine {
  to { background-position: 200% center; }
}
