/* ==========================================================================
   1. BASE STYLES & VARIABLES
   ========================================================================== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap');

:root {
  --accent: #dc2626;
  --bg: #08080a; /* Deeper black for high contrast esports backdrop */
}

body {
  background-color: var(--bg) !important;
  background-image: 
    radial-gradient(at 0% 0%, rgba(220, 38, 38, 0.08) 0px, transparent 50%),
    radial-gradient(at 100% 100%, rgba(127, 29, 29, 0.08) 0px, transparent 50%),
    radial-gradient(at 50% 0%, rgba(31, 41, 55, 0.15) 0px, transparent 50%) !important;
  background-attachment: fixed !important;
  color: #e2e8f0;
  font-family: 'Inter', sans-serif !important;
  overflow-x: clip;
}

/* ==========================================================================
   Global Scrollbar (Sleek, Small, Professional)
   ========================================================================== */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background-color: rgba(255, 255, 255, 0.15);
  border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
  background-color: rgba(255, 255, 255, 0.25);
}

/* ==========================================================================
   2. THEME GRADIENTS & BACKGROUND ANIMATIONS
   ========================================================================== */
.steam-nav-bg {
  background: #070709;
}

.steam-gradient {
  background: linear-gradient(to bottom, #1a0f12 0%, #08080a 100%);
}

.sponsor-banner-bg {
  background: linear-gradient(135deg, #101014 0%, #251013 50%, #060608 100%);
}

/* Animated Ambient Background Blobs (Premium, High Contrast) */
body::before,
body::after {
  content: "";
  position: fixed;
  width: 800px;
  height: 800px;
  border-radius: 9999px;
  filter: blur(140px);
  opacity: 0.22 !important; /* Visual enhancement: clear glow visibility */
  z-index: -99;
  pointer-events: none;
}

body::before {
  background: #dc2626;
  top: -200px;
  left: -200px;
  animation: floatA 22s ease-in-out infinite alternate;
}

body::after {
  background: #7f1d1d;
  bottom: -250px;
  right: -250px;
  animation: floatB 28s ease-in-out infinite alternate;
}

.primary-sticky-nav {
  position: sticky !important;
  top: 0 !important;
  z-index: 100 !important;
  background-color: rgba(7, 7, 9, 0.85) !important;
  backdrop-filter: blur(16px) !important;
  width: 100% !important;
}

@keyframes floatA {
  0% {
    transform: translate(0, 0) scale(1);
  }
  50% {
    transform: translate(120px, 80px) scale(1.15);
  }
  100% {
    transform: translate(-40px, 40px) scale(0.9);
  }
}

@keyframes floatB {
  0% {
    transform: translate(0, 0) scale(1);
  }
  50% {
    transform: translate(-100px, -60px) scale(1.2);
  }
  100% {
    transform: translate(60px, -40px) scale(0.95);
  }
}

/* ==========================================================================
   3. CARD COMPONENTS & INTERACTION MATRIX
   ========================================================================== */
/* Live/Offline Crimson Optimization */
.spotlight-card-live {
  background: linear-gradient(135deg, #241216 0%, #0f090a 100%);
}

.spotlight-card-live:hover {
  background: linear-gradient(135deg, #32161c 0%, #241216 50%, #0f090a 100%);
}

.spotlight-card-offline {
  background: #121216;
}

.spotlight-card-offline:hover {
  background: #181820;
}

/* Premium Glass Cards Border Matrix */
#carouselTrack,
#calendarPage1>div,
#calendarPage2>div,
#creatorsRealContent a {
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(12px);
  background: rgba(18, 18, 22, .75);
  border-color: rgba(255, 255, 255, .08) !important;
  box-shadow: 0 12px 32px rgba(0, 0, 0, .35);
  transition: transform .45s cubic-bezier(.22, 1, .36, 1),
    box-shadow .45s ease,
    border-color .45s ease;
}

#carouselTrack::before,
#calendarPage1>div::before,
#calendarPage2>div::before,
#creatorsRealContent a::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  background: linear-gradient(120deg, rgba(220, 38, 38, .0), rgba(220, 38, 38, .22), rgba(220, 38, 38, .0));
  background-size: 300% 300%;
  animation: borderFlow 8s linear infinite;
  opacity: 0;
  transition: opacity .35s ease;
  pointer-events: none;
}

#carouselTrack:hover::before,
#calendarPage1>div:hover::before,
#calendarPage2>div:hover::before,
#creatorsRealContent a:hover::before {
  opacity: 1;
}

#carouselTrack:hover,
#calendarPage1>div:hover,
#calendarPage2>div:hover,
#creatorsRealContent a:hover {
  transform: translateY(-10px);
  border-color: rgba(220, 38, 38, .35) !important;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .55), 0 0 35px rgba(220, 38, 38, .10);
}

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

  100% {
    background-position: 300% 50%;
  }
}

/* Metrics Tags */
.steam-green-tag {
  background-color: #991b1b;
  color: #fca5a5;
}

.steam-dark-tag {
  background-color: #26262b;
  color: #f87171;
}

.steam-blue-btn {
  background: linear-gradient(90deg, #dc2626 0%, #7f1d1d 100%);
}

/* ==========================================================================
   4. PODIUM DYNAMIC RANKING BADGES
   ========================================================================== */
.clean-rank-badge {
  background: rgba(7, 7, 9, 0.85);
  backdrop-filter: blur(4px);
  border: 1px solid rgba(255, 255, 255, 0.05);
  color: #e2e8f0;
}

.card-rank-1,
.card-rank-2,
.card-rank-3,
.card-rank-4 {
  transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* Crimson Rank Hover State Matrix */
.card-rank-1:hover {
  transform: translateY(-8px);
  border-color: #f87171;
  box-shadow: 0 15px 30px rgba(248, 113, 113, 0.2);
}

.card-rank-1:hover img {
  transform: scale(1.08);
}

.card-rank-2:hover {
  transform: translateY(-5px);
  border-color: #cbd5e1;
  box-shadow: 0 12px 20px rgba(203, 213, 225, 0.1);
}

.card-rank-2:hover img {
  transform: scale(1.04);
}

.card-rank-3:hover {
  transform: translateY(-4px);
  border-color: #b45309;
  box-shadow: 0 10px 18px rgba(180, 83, 9, 0.08);
}

.card-rank-3:hover img {
  transform: scale(1.03);
}

.card-rank-4:hover {
  transform: translateY(-2px);
  border-color: rgba(220, 38, 38, 0.4);
  box-shadow: 0 8px 15px rgba(220, 38, 38, 0.05);
}

.card-rank-4:hover img {
  transform: scale(1.02);
}

/* ==========================================================================
   5. CAROUSEL & INTERACTIVE LAYOUT ELEMENTS
   ========================================================================== */
.carousel-sidebar {
  background: #070709;
}

.carousel-dot {
  background-color: rgba(255, 255, 255, 0.1);
}

.carousel-dot.active {
  background-color: #dc2626;
}

/* Animation Engine Frames */
.carousel-fade-in {
  animation: carouselFade 0.4s ease-in-out forwards;
}

@keyframes carouselFade {
  from {
    opacity: 0.4;
  }

  to {
    opacity: 1;
  }
}

.reveal {
  opacity: 0;
  transform: translateY(24px) scale(.98);
  transition: all .9s cubic-bezier(.22, 1, .36, 1);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* Skeleton State Shimmer Mechanics */
.skeleton-pulse {
  background: linear-gradient(90deg, #181214 25%, #261a1d 50%, #181214 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite linear;
}

@keyframes shimmer {
  0% {
    background-position: 200% 0;
  }

  100% {
    background-position: -200% 0;
  }
}

/* Custom Scrollbar Design Engine */
.custom-scrollbar::-webkit-scrollbar {
  height: 4px;
}

.custom-scrollbar::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.02);
}

.custom-scrollbar::-webkit-scrollbar-thumb {
  background: #26262b;
  border-radius: 2px;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
  background: #dc2626;
}

/* ==========================================================================
   6. CINEMATIC HERO ELEMENTS & UTILITIES
   ========================================================================== */
#sponsorBanner {
  perspective: 1000px;
}

#sponsorBanner .hero-content {
  transform-style: preserve-3d;
  transition: transform .25s ease;
}

#sponsorBanner::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 30%, rgba(220, 38, 38, .18), transparent 40%),
    radial-gradient(circle at 80% 70%, rgba(220, 38, 38, .12), transparent 40%);
  animation: heroPulse 10s ease-in-out infinite alternate;
  pointer-events: none;
}

@keyframes heroPulse {
  from {
    opacity: .6;
  }

  to {
    opacity: 1;
  }
}

/* Micro-Particle Floating Effects */
.hero-particle {
  position: absolute;
  width: 4px;
  height: 4px;
  border-radius: 9999px;
  background: rgba(248, 113, 113, .7);
  box-shadow: 0 0 12px rgba(248, 113, 113, .8);
  animation: floatUp linear infinite;
  pointer-events: none;
}

@keyframes floatUp {
  from {
    transform: translateY(30px) scale(.6);
    opacity: 0;
  }

  15% {
    opacity: 1;
  }

  to {
    transform: translateY(-220px) scale(1.2);
    opacity: 0;
  }
}

/* Nav Interface Underline Effect */
nav {
  backdrop-filter: blur(16px);
  background: rgba(7, 7, 9, .82) !important;
}

nav a {
  position: relative;
  padding-top: 6px;
  padding-bottom: 6px;
}

nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 2px;
  background: #dc2626;
  transition: width .3s ease;
}

nav a:hover::after {
  width: 100%;
}

/* Disable the underline effect for the main logo */
nav a.logo-link::after {
  display: none !important;
}

/* General Interactive Buttons Elements */
button {
  transition: transform .25s ease, box-shadow .25s ease !important;
}

button:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(220, 38, 38, .28);
}

body nav.primary-sticky-nav,
nav.primary-sticky-nav {
  background: #0d0d11 !important;
  border-bottom: 1px solid rgba(220, 38, 38, 0.18) !important;
  box-shadow:
    0 1px 0 rgba(220, 38, 38, 0.08),
    0 4px 24px rgba(0, 0, 0, 0.55) !important;
}

/* ==========================================================================
   7. PREMIUM COMPONENT GLASSMORPHIC OVERRIDES & DESIGN ENHANCEMENTS
   ========================================================================== */

/* Setup Page details accordion design */
details {
  background: rgba(18, 18, 24, 0.55) !important;
  backdrop-filter: blur(12px) !important;
  -webkit-backdrop-filter: blur(12px) !important;
  border: 1px solid rgba(255, 255, 255, 0.05) !important;
  border-radius: 10px !important;
  margin-bottom: 16px !important;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1) !important;
}

details[open] {
  border-color: rgba(220, 38, 38, 0.35) !important;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.45), 0 0 20px rgba(220, 38, 38, 0.08) !important;
}

summary {
  padding: 16px 20px !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  color: #ffffff !important;
  text-transform: uppercase !important;
  letter-spacing: 0.06em !important;
  cursor: pointer !important;
  list-style: none !important;
  position: relative !important;
  transition: background 0.25s ease, color 0.25s ease !important;
  outline: none !important;
}

summary::-webkit-details-marker {
  display: none !important;
}

summary:hover {
  background: rgba(220, 38, 38, 0.08) !important;
  color: #ef4444 !important;
}

summary::after {
  content: "+";
  position: absolute;
  right: 24px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 18px;
  font-weight: 500;
  transition: transform 0.25s ease;
  color: rgba(255, 255, 255, 0.4);
}

details[open] summary::after {
  content: "-";
  transform: translateY(-50%) rotate(180deg);
  color: #dc2626;
}

.content-inner {
  padding: 20px 24px !important;
  border-top: 1px solid rgba(255, 255, 255, 0.05) !important;
  background: rgba(10, 10, 14, 0.35) !important;
  color: #94a3b8 !important;
  font-size: 14px !important;
  line-height: 1.6 !important;
}

.info-box {
  background: rgba(220, 38, 38, 0.06) !important;
  border: 1px solid rgba(220, 38, 38, 0.2) !important;
  border-radius: 10px !important;
  padding: 16px 20px !important;
  margin-bottom: 24px !important;
  backdrop-filter: blur(8px) !important;
}

/* Global button elements overrides */
.btn,
.add-channel-btn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: linear-gradient(135deg, #dc2626 0%, #991b1b 100%) !important;
  border: 1px solid rgba(255, 255, 255, 0.05) !important;
  border-radius: 6px !important;
  color: #ffffff !important;
  font-weight: 700 !important;
  font-size: 11px !important;
  letter-spacing: 0.08em !important;
  text-transform: uppercase !important;
  padding: 10px 20px !important;
  box-shadow: 0 4px 12px rgba(220, 38, 38, 0.2) !important;
  transition: all 0.25s cubic-bezier(0.25, 0.8, 0.25, 1) !important;
  text-decoration: none !important;
}

.btn:hover,
.add-channel-btn:hover {
  transform: translateY(-2px) !important;
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%) !important;
  box-shadow: 0 6px 20px rgba(220, 38, 38, 0.4), 0 0 12px rgba(220, 38, 38, 0.2) !important;
  color: #ffffff !important;
}

/* Form container glassmorphic styles */
form {
  background: rgba(18, 18, 24, 0.55) !important;
  backdrop-filter: blur(16px) saturate(130%) !important;
  -webkit-backdrop-filter: blur(16px) saturate(130%) !important;
  border: 1px solid rgba(255, 255, 255, 0.05) !important;
  border-radius: 12px !important;
  padding: 28px !important;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35) !important;
}

/* Global Form input overrides */
input[type="text"],
input[type="email"],
input[type="password"],
textarea,
select,
input[class*="bg-[#203043]"] {
  background: rgba(10, 10, 14, 0.6) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 6px !important;
  color: #f8fafc !important;
  padding: 10px 14px !important;
  transition: all 0.25s ease !important;
  outline: none !important;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
textarea:focus,
select:focus,
input[class*="bg-[#203043]"]:focus {
  border-color: rgba(220, 38, 38, 0.5) !important;
  box-shadow: 0 0 12px rgba(220, 38, 38, 0.15) !important;
  background: rgba(10, 10, 14, 0.8) !important;
}

/* Remove global borders from search inputs specifically */
#searchInput, #clipSearchInput,
#searchInput:focus, #clipSearchInput:focus {
  border: none !important;
  background: transparent !important;
  box-shadow: none !important;
}

/* Profile cards & Channel custom panels */
div[class*="bg-[#121216] border border-white/5 rounded p-4 mb-6"] {
  background: rgba(18, 18, 24, 0.55) !important;
  backdrop-filter: blur(16px) saturate(130%) !important;
  border: 1px solid rgba(255, 255, 255, 0.05) !important;
  border-radius: 12px !important;
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3) !important;
}

/* Nav links glow on hover */
nav a:hover {
  color: #ef4444 !important;
  text-shadow: 0 0 10px rgba(239, 68, 68, 0.3) !important;
}

/* Section Headings accent decoration */
h2.text-sm.tracking-widest.uppercase {
  border-left: 3px solid #dc2626;
  padding-left: 10px;
  letter-spacing: 0.15em !important;
  font-weight: 800 !important;
}

/* Daily highlights cards (Home & Channel pages) */
div[class*="bg-[#070709] border border-white/5"] {
  background: rgba(18, 18, 24, 0.55) !important;
  backdrop-filter: blur(12px) !important;
  border: 1px solid rgba(255, 255, 255, 0.05) !important;
  border-radius: 12px !important;
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3) !important;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1) !important;
}

div[class*="bg-[#070709] border border-white/5"]:hover {
  transform: translateY(-5px) !important;
  border-color: rgba(220, 38, 38, 0.35) !important;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5), 0 0 25px rgba(220, 38, 38, 0.12) !important;
}

/* Creators grid list items (Home & Creators pages) */
.creators-grid a,
div[id="creatorsRealContent"] > a,
div[class*="grid-cols-2"] > a {
  background: rgba(18, 18, 24, 0.55) !important;
  backdrop-filter: blur(12px) !important;
  border: 1px solid rgba(255, 255, 255, 0.05) !important;
  border-radius: 12px !important;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1) !important;
}

.creators-grid a:hover,
div[id="creatorsRealContent"] > a:hover,
div[class*="grid-cols-2"] > a:hover {
  transform: translateY(-6px) !important;
  border-color: rgba(220, 38, 38, 0.35) !important;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5), 0 0 25px rgba(220, 38, 38, 0.12) !important;
}
