@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* ----- CSS Reset & Base ----- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.6;
  color: #ffffff;
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
  background: #000;
}

/* ----- FIXED Video Background System ----- */
.video-background {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -10;
  overflow: hidden;
  background: linear-gradient(135deg, #0a0a0a 0%, #1a1a2e 50%, #16213e 100%);
}

.video-background video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.35) contrast(1.1) saturate(1.05);
  opacity: 0;
  transition: opacity 2s ease;
  will-change: auto;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  transform-style: flat;
  -webkit-transform-style: flat;
}

.video-background.loaded video {
  opacity: 1;
}

.video-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -9;
  background: 
    radial-gradient(circle at 25% 25%, rgba(0, 0, 0, 0.3) 0%, transparent 50%),
    radial-gradient(circle at 75% 75%, rgba(0, 0, 0, 0.4) 0%, transparent 50%),
    linear-gradient(135deg, rgba(0, 0, 0, 0.25) 0%, rgba(0, 0, 0, 0.6) 100%);
  pointer-events: none;
}

.video-background::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #0a0a0a 0%, #1a1a2e 50%, #16213e 100%);
  z-index: 1;
  opacity: 1;
  transition: opacity 2s ease;
}

.video-background.loaded::before {
  opacity: 0;
  pointer-events: none;
}

/* ----- Optimized Particles ----- */
.particles {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -8;
  pointer-events: none;
}

.particle {
  position: absolute;
  background: rgba(255, 255, 255, 0.6);
  border-radius: 50%;
  pointer-events: none;
  animation: particleFloat 12s linear infinite;
  will-change: transform;
}

.particle:nth-child(1) { width: 2px; height: 2px; left: 15%; top: 85%; animation-delay: 0s; }
.particle:nth-child(2) { width: 3px; height: 3px; left: 25%; top: 75%; animation-delay: 2s; }
.particle:nth-child(3) { width: 2px; height: 2px; left: 35%; top: 90%; animation-delay: 4s; }
.particle:nth-child(4) { width: 3px; height: 3px; left: 45%; top: 80%; animation-delay: 6s; }
.particle:nth-child(5) { width: 2px; height: 2px; left: 55%; top: 85%; animation-delay: 8s; }
.particle:nth-child(6) { width: 3px; height: 3px; left: 65%; top: 75%; animation-delay: 10s; }
.particle:nth-child(7) { width: 2px; height: 2px; left: 75%; top: 95%; animation-delay: 1s; }
.particle:nth-child(8) { width: 3px; height: 3px; left: 85%; top: 70%; animation-delay: 3s; }

@keyframes particleFloat {
  0% { 
    transform: translateY(0px) translateX(0px) rotate(0deg); 
    opacity: 0; 
  }
  5% { 
    opacity: 0.8; 
  }
  95% { 
    opacity: 0.8; 
  }
  100% { 
    transform: translateY(-100vh) translateX(15px) rotate(180deg); 
    opacity: 0; 
  }
}

/* main box for damn quote */
.main-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  position: relative;
  z-index: 1;
}

/* sus glass box idk what shi i made */
.profile-card {
  width: 100%;
  max-width: 420px;
  padding: 3rem 2.5rem;
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(12px) saturate(150%);
  -webkit-backdrop-filter: blur(12px) saturate(150%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 28px;
  box-shadow: 
    0 25px 50px rgba(0, 0, 0, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    0 0 0 1px rgba(255, 255, 255, 0.03);
  text-align: center;
  position: relative;
  transition: all 0.5s cubic-bezier(0.25, 0.8, 0.25, 1);
  overflow: hidden;
  transform: translateZ(0);
  will-change: transform;
}

.profile-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg, 
    transparent, 
    rgba(255, 255, 255, 0.1), 
    transparent
  );
  transition: left 0.7s ease;
  z-index: 1;
}

.profile-card:hover::before {
  left: 100%;
}

.profile-card::after {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: linear-gradient(
    45deg,
    rgba(255, 255, 255, 0.08),
    rgba(255, 255, 255, 0.04),
    rgba(255, 255, 255, 0.08)
  );
  border-radius: 30px;
  z-index: -1;
  opacity: 0;
  transition: opacity 0.5s ease;
}

.profile-card:hover {
  transform: translateY(-8px) scale(1.01);
  box-shadow: 
    0 35px 70px rgba(0, 0, 0, 0.6),
    inset 0 1px 0 rgba(255, 255, 255, 0.15),
    0 0 0 1px rgba(255, 255, 255, 0.08),
    0 0 40px rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
}

.profile-card:hover::after {
  opacity: 1;
}

/* ----- Profile Image ----- */
.profile-image-container {
  position: relative;
  display: inline-block;
  margin-bottom: 2rem;
}

.profile-image {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, 0.2);
  box-shadow: 
    0 0 0 4px rgba(255, 255, 255, 0.06),
    0 15px 35px rgba(0, 0, 0, 0.4);
  transition: all 0.5s cubic-bezier(0.25, 0.8, 0.25, 1);
  position: relative;
  z-index: 3;
  filter: brightness(1.05) contrast(1.05);
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
}

.profile-image-container::before {
  content: '';
  position: absolute;
  top: -8px;
  left: -8px;
  right: -8px;
  bottom: -8px;
  border-radius: 50%;
  background: conic-gradient(
    from 0deg,
    rgba(255, 255, 255, 0.15),
    rgba(255, 255, 255, 0.6),
    rgba(255, 255, 255, 0.15),
    rgba(255, 255, 255, 0.6),
    rgba(255, 255, 255, 0.15)
  );
  z-index: 2;
  animation: rotateGlow 6s linear infinite;
  opacity: 0;
  transition: opacity 0.5s ease;
}

.profile-image-container::after {
  content: '';
  position: absolute;
  top: -4px;
  left: -4px;
  right: -4px;
  bottom: -4px;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(255, 255, 255, 0.08) 0%,
    transparent 70%
  );
  z-index: 1;
  opacity: 0;
  transition: opacity 0.5s ease;
}

.profile-card:hover .profile-image-container::before,
.profile-card:hover .profile-image-container::after {
  opacity: 1;
}

.profile-card:hover .profile-image {
  transform: scale(1.04);
  border-color: rgba(255, 255, 255, 0.3);
  box-shadow: 
    0 0 0 6px rgba(255, 255, 255, 0.1),
    0 20px 40px rgba(0, 0, 0, 0.5);
}

@keyframes rotateGlow {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* ----- Typography ----- */
.profile-name {
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  font-weight: 700;
  margin-bottom: 0.75rem;
  background: linear-gradient(
    135deg, 
    #ffffff 0%, 
    #f1f3f4 50%, 
    #ffffff 100%
  );
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 0 25px rgba(255, 255, 255, 0.5);
  position: relative;
  z-index: 2;
  transition: all 0.3s ease;
}

.profile-card:hover .profile-name {
  text-shadow: 0 0 35px rgba(255, 255, 255, 0.7);
  transform: translateY(-1px);
}

.profile-bio {
  font-size: clamp(0.9rem, 2.5vw, 1.1rem);
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 2.5rem;
  line-height: 1.7;
  font-weight: 400;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  transition: all 0.3s ease;
}

.profile-card:hover .profile-bio {
  color: rgba(255, 255, 255, 0.95);
  transform: translateY(-1px);
}

/* ----- Social Links ----- */
.social-links {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  margin-bottom: 2.5rem;
}

.social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 1.2rem 2rem;
  text-decoration: none;
  color: white;
  font-weight: 500;
  font-size: 1rem;
  border-radius: 18px;
  position: relative;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transform: translateZ(0);
  will-change: transform;
}

.social-link::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--gradient);
  opacity: 0;
  transition: all 0.3s ease;
  z-index: -1;
  border-radius: 18px;
}

.social-link::after {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: var(--gradient);
  opacity: 0;
  filter: blur(6px);
  transition: all 0.3s ease;
  z-index: -2;
  border-radius: 20px;
}

.social-link:hover::before {
  opacity: 1;
}

.social-link:hover::after {
  opacity: 0.5;
}

.social-link:hover {
  transform: translateY(-4px) scale(1.01);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.4);
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.05);
}

.social-link:active {
  transform: translateY(-2px) scale(0.99);
  transition: all 0.1s ease;
}

/* Social Link Colors */
.social-link.discord {
  --gradient: linear-gradient(135deg, #5865f2 0%, #4752c4 100%);
}

.social-link.instagram {
  --gradient: linear-gradient(135deg, #333 0%, #24292e 100%);
}

.social-link.twitter {
  --gradient: linear-gradient(135deg, #1da1f2 0%, #0d8bd9 100%);
}

.social-link.github {
  --gradient: linear-gradient(135deg, #333 0%, #24292e 100%);
}

.social-link.youtube {
  --gradient: linear-gradient(135deg, #ff0000 0%, #cc0000 100%);
}

.social-link.tiktok {
  --gradient: linear-gradient(135deg, #000000 0%, #ff0050 100%);
}

.social-link.website {
  --gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

/* ----- Icons ----- */
.social-icon {
  width: 28px;
  height: 28px;
  fill: currentColor;
  transition: all 0.3s ease;
  flex-shrink: 0;
}

.social-link:hover .social-icon {
  transform: scale(1.08) rotate(10deg);
}

/* ----- Footer ----- */
.footer {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.6);
  font-weight: 300;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  transition: all 0.3s ease;
}

.profile-card:hover .footer {
  color: rgba(255, 255, 255, 0.8);
}

/* ----- Leaderboard System ----- */
.leaderboard-system {
  position: fixed;
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 15px;
  font-family: 'Inter', sans-serif;
}

.leaderboard-tab {
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(12px) saturate(150%);
  -webkit-backdrop-filter: blur(12px) saturate(150%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 18px;
  padding: 12px 16px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  min-width: 140px;
  position: relative;
  overflow: hidden;
}

.leaderboard-tab::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg, 
    transparent, 
    rgba(255, 255, 255, 0.1), 
    transparent
  );
  transition: left 0.7s ease;
  z-index: 1;
}

.leaderboard-tab:hover::before {
  left: 100%;
}

.leaderboard-tab:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateX(5px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}

.leaderboard-tab.active {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.15);
  transform: translateX(10px);
  box-shadow: 
    0 15px 45px rgba(0, 0, 0, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.leaderboard-tab-content {
  display: flex;
  align-items: center;
  gap: 8px;
  color: white;
  font-weight: 600;
  font-size: 14px;
  position: relative;
  z-index: 2;
}

.leaderboard-icon {
  width: 20px;
  height: 20px;
  color: #ffd700;
  transition: all 0.3s ease;
}

.leaderboard-tab:hover .leaderboard-icon {
  transform: scale(1.1);
}

.leaderboard-text {
  white-space: nowrap;
}

.leaderboard-notification {
  font-size: 12px;
  animation: pulse 2s ease-in-out infinite;
}

.bounty-tab .leaderboard-icon {
  color: #00ff88;
}

/* Leaderboard Panels */
.leaderboard-panel {
  position: fixed;
  left: -400px;
  top: 50%;
  transform: translateY(-50%);
  width: 350px;
  max-height: 80vh;
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(16px) saturate(150%);
  -webkit-backdrop-filter: blur(16px) saturate(150%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 28px;
  box-shadow: 
    0 25px 60px rgba(0, 0, 0, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
  z-index: 999;
  overflow: hidden;
}

.leaderboard-panel.open {
  left: 180px;
}

.leaderboard-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 25px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.02);
}

.leaderboard-panel-header h3 {
  margin: 0;
  color: white;
  font-size: 18px;
  font-weight: 700;
}

.close-btn {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.7);
  cursor: pointer;
  padding: 8px;
  border-radius: 12px;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.close-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  transform: scale(1.1);
}

.close-btn svg {
  width: 18px;
  height: 18px;
}

.leaderboard-panel-content {
  padding: 20px 25px;
  max-height: calc(80vh - 80px);
  overflow-y: auto;
}

.countdown-section {
  background: rgba(255, 255, 255, 0.03);
  border-radius: 18px;
  padding: 15px;
  margin-bottom: 20px;
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.countdown-title {
  color: #ffd700;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 8px;
}

.countdown-timer {
  color: white;
  font-size: 18px;
  font-weight: 700;
  font-family: 'Inter', monospace;
  text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

/* Leaderboard List */
.leaderboard-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.leaderboard-item {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 12px 15px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  opacity: 0;
  transform: translateX(-20px);
  position: relative;
  overflow: hidden;
}

.leaderboard-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg, 
    transparent, 
    rgba(255, 255, 255, 0.05), 
    transparent
  );
  transition: left 0.7s ease;
  z-index: 1;
}

.leaderboard-item:hover::before {
  left: 100%;
}

.leaderboard-item.animate-in {
  opacity: 1;
  transform: translateX(0);
  animation: fadeInUp 0.5s ease-out;
}

.leaderboard-item:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.15);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.rank-number {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  background: rgba(255, 255, 255, 0.1);
  color: white;
  flex-shrink: 0;
  position: relative;
  z-index: 2;
}

.rank-number.gold {
  background: linear-gradient(135deg, #ffd700, #ffed4e);
  color: #000;
  box-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
}

.rank-number.silver {
  background: linear-gradient(135deg, #c0c0c0, #e8e8e8);
  color: #000;
  box-shadow: 0 0 15px rgba(192, 192, 192, 0.5);
}

.rank-number.bronze {
  background: linear-gradient(135deg, #cd7f32, #daa520);
  color: #000;
  box-shadow: 0 0 15px rgba(205, 127, 50, 0.5);
}

.member-info {
  flex: 1;
  position: relative;
  z-index: 2;
}

.member-name {
  color: white;
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 2px;
}

.member-score {
  color: #00ff88;
  font-size: 12px;
  font-weight: 500;
}

.rank-crown,
.rank-medal {
  font-size: 20px;
  animation: bounce 2s ease-in-out infinite;
  position: relative;
  z-index: 2;
}

/* Special styling for top 3 */
.leaderboard-item.rank-1 {
  background: rgba(255, 215, 0, 0.05);
  border-color: rgba(255, 215, 0, 0.2);
}

.leaderboard-item.rank-2 {
  background: rgba(192, 192, 192, 0.05);
  border-color: rgba(192, 192, 192, 0.2);
}

.leaderboard-item.rank-3 {
  background: rgba(205, 127, 50, 0.05);
  border-color: rgba(205, 127, 50, 0.2);
}

/* Bounty specific styling */
#bountyPanel .member-score {
  color: #ffd700;
}

#bountyPanel .countdown-timer {
  text-shadow: 0 0 10px rgba(0, 255, 136, 0.5);
}

/* ----- Events System ----- */
.events-system {
  position: fixed;
  top: 50%;
  right: 0;
  transform: translateY(-50%);
  z-index: 1000;
  font-family: 'Inter', sans-serif;
}

.event-tab {
  position: relative;
  right: 0;
  top: 0;
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(12px) saturate(150%);
  -webkit-backdrop-filter: blur(12px) saturate(150%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-right: none;
  border-radius: 20px 0 0 20px;
  padding: 1rem 0.8rem;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  box-shadow: -5px 0 20px rgba(0, 0, 0, 0.3);
  min-width: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  user-select: none;
  overflow: hidden;
}

.event-tab::before {
  content: '';
  position: absolute;
  top: 0;
  right: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg, 
    transparent, 
    rgba(255, 255, 255, 0.1), 
    transparent
  );
  transition: right 0.7s ease;
  z-index: 1;
}

.event-tab:hover::before {
  right: 100%;
}

.event-tab:hover {
  background: rgba(255, 255, 255, 0.08);
  transform: translateX(-5px);
  box-shadow: -10px 0 30px rgba(0, 0, 0, 0.4);
}

.event-tab.active {
  background: rgba(255, 255, 255, 0.06);
  transform: translateX(-10px);
  border-color: rgba(255, 255, 255, 0.15);
}

.event-tab-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  position: relative;
  z-index: 2;
}
.event-icon {
  width: 24px;
   height: 24px;
  color: #ffffff;
  transition: all 0.3s ease;
}

.event-tab:hover .event-icon {
  transform: scale(1.1);
  color: #4fc3f7;
}

.event-text {
  font-size: 0.75rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.9);
  writing-mode: vertical-rl;
  text-orientation: mixed;
  letter-spacing: 1px;
}

.event-notification {
  position: absolute;
  top: -8px;
  right: -8px;
  background: linear-gradient(135deg, #ff4757, #ff3742);
  color: white;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 600;
  animation: pulse 2s ease-in-out infinite;
  box-shadow: 0 2px 8px rgba(255, 71, 87, 0.4);
}

/* Event Panel */
.event-panel {
  position: absolute;
  right: 60px;
  top: 50%;
  transform: translateY(-50%) translateX(100%);
  width: 350px;
  max-height: 500px;
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(16px) saturate(150%);
  -webkit-backdrop-filter: blur(16px) saturate(150%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 28px;
  box-shadow: 
    -10px 0 40px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  opacity: 0;
  visibility: hidden;
  transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
  overflow: hidden;
  pointer-events: none;
}

.event-panel.open {
  transform: translateY(-50%) translateX(0);
  opacity: 1;
  visibility: visible;
  pointer-events: all;
}

.event-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem 1.5rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.02);
}

.event-panel-header h3 {
  font-size: 1.1rem;
  font-weight: 600;
  color: #ffffff;
  margin: 0;
}

.event-panel-content {
  padding: 1rem 1.5rem 1.5rem;
  max-height: 400px;
  overflow-y: auto;
}

/* Custom Scrollbar */
.event-panel-content::-webkit-scrollbar,
.leaderboard-panel-content::-webkit-scrollbar {
  width: 4px;
}

.event-panel-content::-webkit-scrollbar-track,
.leaderboard-panel-content::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 2px;
}

.event-panel-content::-webkit-scrollbar-thumb,
.leaderboard-panel-content::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 2px;
}

.event-panel-content::-webkit-scrollbar-thumb:hover,
.leaderboard-panel-content::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* Event Sections */
.event-section {
  margin-bottom: 1.5rem;
}

.event-section:last-child {
  margin-bottom: 0;
}

.event-section h4 {
  font-size: 0.9rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 0.8rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

/* Event Items */
.event-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  margin-bottom: 0.8rem;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  opacity: 0;
  transform: translateX(20px);
  position: relative;
  overflow: hidden;
}

.event-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg, 
    transparent, 
    rgba(255, 255, 255, 0.05), 
    transparent
  );
  transition: left 0.7s ease;
  z-index: 1;
}

.event-item:hover::before {
  left: 100%;
}

.event-item:last-child {
  margin-bottom: 0;
}

.event-item.animate-in {
  animation: slideInLeft 0.5s ease forwards;
}

.event-item:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.15);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

/* Event Status Indicators */
.event-status {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 0.2rem;
  position: relative;
  z-index: 2;
}

.event-status.live {
  background: #4caf50;
  box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.3);
  animation: livePulse 2s ease-in-out infinite;
}

.event-status.scheduled {
  background: #2196f3;
  box-shadow: 0 0 0 2px rgba(33, 150, 243, 0.3);
}

.event-status.ended {
  background: #757575;
  opacity: 0.6;
}

@keyframes livePulse {
  0%, 100% {
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.3);
  }
  50% {
    box-shadow: 0 0 0 6px rgba(76, 175, 80, 0.1);
  }
}

/* Event Details */
.event-details {
  flex: 1;
  position: relative;
  z-index: 2;
}

.event-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: #ffffff;
  margin-bottom: 0.3rem;
  line-height: 1.3;
}

.event-time {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 0.4rem;
  font-weight: 500;
}

.event-description {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.8);
  line-height: 1.4;
}

/* Event Item States */
.event-item.current {
  border-color: rgba(76, 175, 80, 0.3);
  background: rgba(76, 175, 80, 0.05);
}

.event-item.upcoming {
  border-color: rgba(33, 150, 243, 0.3);
  background: rgba(33, 150, 243, 0.05);
}

.event-item.past {
  opacity: 0.7;
  background: rgba(255, 255, 255, 0.02);
}

.event-item.past .event-title,
.event-item.past .event-time,
.event-item.past .event-description {
  opacity: 0.8;
}

/* ----- Animations ----- */
@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-5px);
  }
  60% {
    transform: translateY(-3px);
  }
}

@keyframes ripple {
  to {
    transform: scale(4);
    opacity: 0;
  }
}

@keyframes bounceIn {
  0% {
    transform: scale(0.3);
    opacity: 0;
  }
  50% {
    transform: scale(1.05);
  }
  70% {
    transform: scale(0.9);
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

@keyframes shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

.event-notification.new {
  animation: bounceIn 0.6s ease;
}

/* ----- Mobile Optimizations ----- */
@media (max-width: 768px) {
  .profile-card {
    margin: 1rem;
    padding: 2.5rem 2rem;
    border-radius: 24px;
    max-width: calc(100vw - 2rem);
  }
  
  .profile-image {
    width: 140px;
    height: 140px;
  }
  
  .social-links {
    gap: 1rem;
  }
  
  .social-link {
    padding: 1rem 1.5rem;
    font-size: 0.95rem;
  }
  
  .social-icon {
    width: 24px;
    height: 24px;
  }
  
  .social-link:hover {
    transform: translateY(-3px) scale(1.01);
  }
  
  /* Leaderboard Mobile */
  .leaderboard-system {
    left: 10px;
  }
  
  .leaderboard-panel {
    width: 300px;
    max-height: 70vh;
  }
  
  .leaderboard-panel.open {
    left: 130px;
  }
  
  .leaderboard-tab {
    min-width: 120px;
    padding: 10px 12px;
  }
  
  .leaderboard-tab-content {
    font-size: 12px;
  }
  
  .leaderboard-icon {
    width: 16px;
    height: 16px;
  }
  
  /* Events Mobile */
  .events-system {
    position: fixed;
    top: auto;
    bottom: 20px;
    right: 20px;
    transform: none;
  }
  
  .event-tab {
    position: relative;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    min-width: auto;
  }
  
  .event-tab:hover,
  .event-tab.active {
    transform: scale(1.05);
  }
  
  .event-tab-content {
    flex-direction: row;
    gap: 0;
  }
  
  .event-text {
    display: none;
  }
  
  .event-icon {
    width: 28px;
    height: 28px;
  }
  
  .event-notification {
    top: -5px;
    right: -5px;
    width: 18px;
    height: 18px;
    font-size: 0.65rem;
  }
  
  .event-panel {
    position: fixed;
    right: 20px;
    bottom: 90px;
    top: auto;
    width: calc(100vw - 40px);
    max-width: 320px;
    max-height: 60vh;
    transform: translateY(100%);
  }
  
  .event-panel.open {
    transform: translateY(0);
  }
  
  .event-panel-content {
    max-height: calc(60vh - 80px);
  }
  
  .event-item {
    padding: 0.8rem;
  }
  
  .event-title {
    font-size: 0.9rem;
  }
  
  .event-time {
    font-size: 0.75rem;
  }
  
  .event-description {
    font-size: 0.8rem;
  }
  
  /* Reduce particles on mobile */
  .particle:nth-child(n+6) {
    display: none;
  }
}

@media (max-width: 480px) {
  .main-wrapper {
    padding: 0.5rem;
  }
  
  .profile-card {
    padding: 2rem 1.5rem;
  }
  
  .profile-image {
    width: 120px;
    height: 120px;
  }
  
  .social-icon {
    width: 22px;
    height: 22px;
  }
  
  /* Leaderboard Mobile Small */
  .leaderboard-panel {
    width: calc(100vw - 40px);
    left: -100vw;
  }
  
  .leaderboard-panel.open {
    left: 20px;
  }
  
  /* Events Mobile Small */
  .events-system {
    bottom: 15px;
    right: 15px;
  }
  
  .event-tab {
    width: 55px;
    height: 55px;
  }
  
  .event-icon {
    width: 24px;
    height: 24px;
  }
  
  .event-panel {
    right: 15px;
    bottom: 80px;
    width: calc(100vw - 30px);
    max-height: 50vh;
  }
  
  .event-panel-header {
    padding: 1rem 1rem 0.8rem;
  }
  
  .event-panel-header h3 {
    font-size: 1rem;
  }
  
  .event-panel-content {
    padding: 0.8rem 1rem 1rem;
    max-height: calc(50vh - 60px);
  }
  
  .event-section h4 {
    font-size: 0.85rem;
  }
  
  .event-item {
    padding: 0.7rem;
    gap: 0.8rem;
  }
}

@media (max-width: 360px) {
  .profile-card {
    padding: 2rem 1.5rem;
  }
  
  .profile-image {
    width: 120px;
    height: 120px;
  }
  
  .social-icon {
    width: 22px;
    height: 22px;
  }
}

/* ----- Desktop Enhancements ----- */
@media (min-width: 768px) {
  .profile-card {
    max-width: 450px;
    padding: 3.5rem 3rem;
  }
  
  .profile-image {
    width: 180px;
    height: 180px;
  }
  
  .social-icon {
    width: 30px;
    height: 30px;
  }
  
  .social-link:hover {
    transform: translateY(-6px) scale(1.02);
  }
}

@media (min-width: 1024px) {
  .profile-card:hover {
    transform: translateY(-10px) scale(1.02);
  }
  
  .profile-image {
    width: 200px;
    height: 200px;
  }
  
  .social-icon {
    width: 32px;
    height: 32px;
  }
}

/* ----- Performance Optimizations ----- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  
  .video-background video {
    animation: none;
  }
  
  .particles {
    display: none;
  }
  
  .reduced-motion * {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  
  .performance-mode .particles {
    display: none;
  }
}

/* Hide particles on low-end devices */
@media (max-width: 768px) and (max-height: 1024px) {
  .particle:nth-child(n+5) {
    display: none;
  }
}

/* ----- Loading Animation ----- */
.profile-card {
  animation: slideInUp 0.8s cubic-bezier(0.25, 0.8, 0.25, 1);
}

@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(40px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* ----- Custom Scrollbar ----- */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
}

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

::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.4);
}

/* ----- Focus States for Accessibility ----- */
.event-tab:focus-visible,
.leaderboard-tab:focus-visible {
  outline: 2px solid #4fc3f7;
  outline-offset: 2px;
}

.close-btn:focus-visible {
  outline: 2px solid #4fc3f7;
  outline-offset: 2px;
}

.event-item:focus-visible,
.leaderboard-item:focus-visible {
  outline: 2px solid #4fc3f7;
  outline-offset: 2px;
}

/* ----- High Contrast Mode ----- */
@media (prefers-contrast: high) {
  .event-tab,
  .leaderboard-tab {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
  }
  
  .event-panel,
  .leaderboard-panel {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
  }
  
  .event-item,
  .leaderboard-item {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.15);
  }
}

/* ----- Loading States ----- */
.event-item.loading,
.leaderboard-item.loading {
  opacity: 0.5;
  pointer-events: none;
}

.event-item.loading::after,
.leaderboard-item.loading::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.1),
    transparent
  );
  animation: shimmer 1.5s ease-in-out infinite;
}

/* ----- High Performance Video Styles ----- */
@media (min-width: 1920px) {
  .video-background video {
    width: 1920px;
    height: 1080px;
    max-width: 1920px;
    max-height: 1080px;
  }
}

/* Force hardware acceleration */
.video-background,
.video-background video,
.profile-card,
.social-link,
.leaderboard-tab,
.event-tab {
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
}

/* Optimize for 60fps */
@media (min-resolution: 120dpi) {
  .profile-card,
  .social-link,
  .leaderboard-tab,
  .event-tab {
    will-change: transform;
  }
}

/* ----- Dark Mode Enhancements ----- */
@media (prefers-color-scheme: dark) {
  .event-tab,
  .leaderboard-tab {
    background: rgba(255, 255, 255, 0.06);
  }
  
  .event-panel,
  .leaderboard-panel {
    background: rgba(255, 255, 255, 0.04);
  }
  
  .event-item,
  .leaderboard-item {
    background: rgba(255, 255, 255, 0.02);
  }
}

/* ----- Smooth Transitions ----- */
* {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.events-system *,
.leaderboard-system * {
  will-change: auto;
}

.event-panel.open .event-item,
.leaderboard-panel.open .leaderboard-item {
  will-change: transform, opacity;
}
/* Base: allow sliding when needed */
/* Base glass bottom bar */
.glass-bottombar {
  width: fit-content;
  max-width: 90vw;          /* IMPORTANT: prevents going out of screen */
  margin: 40px auto 20px;

  display: flex;
  gap: 20px;

  padding: 10px 25px;
  border-radius: 14px;

  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(12px) saturate(160%);
  -webkit-backdrop-filter: blur(12px) saturate(160%);

  border: 1px solid rgba(255, 255, 255, 0.25);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);

  overflow-x: auto;         /* 🔥 SLIDING ENABLED */
  white-space: nowrap;      /* prevents wrapping */
  scrollbar-width: none;    /* hides scrollbar (Firefox) */
}

.glass-bottombar::-webkit-scrollbar {
  display: none;            /* hides scrollbar (Chrome) */
}

/* Links */
.glass-bottombar a {
  color: white;
  text-decoration: none;
  font-weight: 600;
  padding: 6px 10px;
  border-radius: 8px;
  transition: 0.2s ease;
  white-space: nowrap;      /* do NOT break text */
}

.glass-bottombar a:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-3px);
}

/* -------------------------------
   RESPONSIVE: shrink padding + gap
-------------------------------- */

/* Tablets */
@media (max-width: 900px) {
  .glass-bottombar {
    gap: 14px;
    padding: 8px 20px;
  }
  .glass-bottombar a {
    font-size: 0.9rem;
  }
}

/* Large phones */
@media (max-width: 600px) {
  .glass-bottombar {
    gap: 12px;
    padding: 8px 16px;
  }
  .glass-bottombar a {
    font-size: 0.85rem;
    padding: 6px 8px;
  }
}

/* Small phones */
@media (max-width: 430px) {
  .glass-bottombar {
    gap: 10px;
    padding: 6px 14px;
  }
  .glass-bottombar a {
    font-size: 0.8rem;
  }
}

/* Ultra small */
@media (max-width: 350px) {
  .glass-bottombar {
    gap: 8px;
    padding: 5px 12px;
  }
  .glass-bottombar a {
    font-size: 0.75rem;
  }
}