/* Home & Arena Style Guidelines - Pure Vanilla CSS */
:root {
  --home-bg-primary: #0a0e17;
  --home-bg-secondary: rgba(20, 26, 40, 0.7);
  --home-border: rgba(255, 255, 255, 0.08);
  --home-accent: #38b6ff;
  --home-accent-glow: rgba(56, 182, 255, 0.3);
  --home-text-primary: #ffffff;
  --home-text-secondary: #a0aec0;

  --font-premium: 'Outfit', sans-serif;
}

html {
  background: var(--home-bg-primary);
}

body.home-page {
  background: transparent;
  color: var(--home-text-primary);
  font-family: var(--font-premium);
  margin: 0;
  overflow-x: hidden;
}

/* Background Atmospheric Grid */
.home-bg-texture {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -2;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: radial-gradient(ellipse at center, black 10%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse at center, black 10%, transparent 80%);
  pointer-events: none;
}

/* Base Wrapper Trick to breakout of default layout constraints */
.home-wrapper {
  width: 100%;
}

/* Hero Section */
.hero-section {
  width: 100vw;
  margin-left: calc(-50vw + 50%);
  padding: 6rem 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero-section::before {
  content: "";
  position: absolute;
  top: 20%;
  left: 50%;
  transform: translateX(-50%);
  width: 60vw;
  height: 30vw;
  background: radial-gradient(ellipse at center, rgba(56, 182, 255, 0.15), transparent 70%);
  filter: blur(80px);
  z-index: -1;
}

.hero-title {
  font-size: 4rem;
  font-weight: 700;
  margin: 0 0 1rem 0;
  background: linear-gradient(to right, #fff, #38b6ff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: -0.03em;
}

.hero-subtitle {
  font-size: 1.25rem;
  color: var(--home-text-secondary);
  max-width: 600px;
  line-height: 1.6;
  margin: 0 0 2.5rem 0;
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1rem 2.5rem;
  background: linear-gradient(135deg, #38b6ff 0%, #1e83cc 100%);
  color: white;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 600;
  font-size: 1.1rem;
  transition: all 0.3s ease;
  box-shadow: 0 10px 30px var(--home-accent-glow);
}

.hero-cta:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 15px 40px var(--home-accent-glow);
  filter: brightness(1.1);
}

/* Arena Layout Shell */
.arena-layout {
  display: block;
  max-width: 100vw;
  margin: 0 auto;
  padding: 2rem 0 6rem;
}

.feed-column {
  min-width: 0;
  width: 100%;
}

/* Section Headings */
.section-header {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.feed-filter-header {
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

@media (max-width: 768px) {
  .hero-section {
    padding: 3rem 1rem !important;
  }
  
  .hero-title {
    font-size: 2.25rem !important;
  }
  
  .hero-subtitle {
    font-size: 1rem !important;
    margin-bottom: 1.5rem !important;
  }

  .debate-grid {
    grid-auto-columns: 85vw !important;
    gap: 1rem !important;
  }

  .feed-filter-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }

  .feed-filter-header .search-input-segment {
    width: 100%;
  }

  .feed-filter-header .segmented-control {
    width: 100%;
    display: flex;
    justify-content: space-between;
  }

  .feed-filter-header .segment-link {
    flex: 1;
    text-align: center;
  }
}

/* Segmented Control Component */
.segmented-control {
  display: inline-flex;
  background: var(--home-bg-secondary);
  border: 1px solid var(--home-border);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: 50px;
  padding: 4px;
  gap: 4px;
}

.segment-link {
  padding: 6px 16px;
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--home-text-secondary);
  border-radius: 50px;
  transition: all 0.2s ease;
  cursor: pointer;
}

.segment-link:hover {
  color: var(--home-text-primary);
  background: rgba(255, 255, 255, 0.05);
}

.segment-link.active.filter-live {
  background: #f43f5e;
  color: #fff;
  box-shadow: 0 0 12px rgba(244, 63, 94, 0.5);
}

.segment-link.active.filter-scheduled {
  background: #38b6ff;
  color: #fff;
  box-shadow: 0 0 12px rgba(56, 182, 255, 0.5);
}

.segment-link.active.filter-completed {
  background: #64748b;
  color: #fff;
  box-shadow: 0 0 12px rgba(100, 116, 139, 0.5);
}

/* Dynamic Input Form Segment */
.search-input-segment {
  background: var(--home-bg-secondary);
  border: 1px solid var(--home-border);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: 50px;
  padding: 8px 16px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--home-text-primary);
  width: 220px;
  transition: all 0.2s ease;
  outline: none;
}

.search-input-segment::placeholder {
  color: var(--home-text-secondary);
  font-weight: 500;
}

.search-input-segment:focus {
  border-color: var(--home-accent);
  box-shadow: 0 0 10px rgba(56, 182, 255, 0.2);
}

/* Debate Grid Horizontal Snap Scroll (2 Rows) */
.debate-grid {
  display: grid;
  grid-template-rows: repeat(2, 1fr);
  grid-auto-flow: column;
  grid-auto-columns: 320px;
  overflow-x: auto;
  gap: 1.5rem;
  margin-bottom: 3rem;
  padding-bottom: 1rem;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
  scroll-snap-type: x mandatory;
  padding-top: 1rem;
}

.debate-grid::-webkit-scrollbar {
  height: 8px;
}

.debate-grid::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.1);
  border-radius: 4px;
}

.debate-grid::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 4px;
}

.debate-grid::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* Debate Card Glassmorphism */
.debate-card {
  scroll-snap-align: start;
  background: var(--home-bg-secondary);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--home-border);
  border-radius: 16px;
  padding: 1.5rem;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

.debate-card::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--home-accent), transparent);
  opacity: 0;
  transition: opacity 0.3s;
}

.debate-card:hover {
  transform: translateY(-5px);
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

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

.card-status {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.1);
  margin-bottom: 1rem;
  align-self: flex-start;
}

.status-live {
  background: rgba(229, 62, 62, 0.15);
  color: #fc8181;
  box-shadow: 0 0 10px rgba(229, 62, 62, 0.3);
}

.card-title {
  font-size: 1.15rem;
  font-weight: 600;
  line-height: 1.4;
  margin: 0 0 1.25rem 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-participants {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 1rem;
}

.participant {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: var(--home-text-secondary);
}

.participant-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 1.1rem;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.versus {
  font-size: 0.8rem;
  color: var(--home-accent);
  font-weight: 700;
  font-style: italic;
}

/* Leaderboard Sidebar */
.leaderboard-panel {
  background: rgba(10, 14, 23, 0.8);
  border: 1px solid var(--home-border);
  border-radius: 16px;
  padding: 1.5rem;
  height: fit-content;
  margin-bottom: 2rem;
}

.leader-item {
  display: flex;
  align-items: center;
  padding: 1rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.leader-item:last-child {
  border-bottom: none;
}

.leader-rank {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--home-accent);
  width: 30px;
}

.leader-info {
  flex: 1;
}

.leader-name {
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.leader-rating {
  font-size: 0.8rem;
  color: var(--home-text-secondary);
}

.leader-wins {
  opacity: 0.7;
  color: #4ade80 !important;
}

.leader-losses {
  opacity: 0.7;
  color: #f87171 !important;
}

.status-pulse {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #fc8181;
  margin-right: 6px;
  box-shadow: 0 0 8px #fc8181;
  animation: pulse 1.5s infinite;
}

@keyframes pulse {
  0% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(252, 129, 129, 0.7);
  }

  70% {
    transform: scale(1.1);
    box-shadow: 0 0 0 6px rgba(252, 129, 129, 0);
  }

  100% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(252, 129, 129, 0);
  }
}

.avatar-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}

/* Custom Header Icons */
.header-pulse {
  width: 14px !important;
  height: 14px !important;
  margin-right: 4px;
}

.header-svg-icon {
  width: 24px;
  height: 24px;
  margin-right: 4px;
}

.calendar-icon-animated {
  fill: none;
  stroke: #38b6ff;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  animation: calendar-bounce 4s cubic-bezier(0.28, 0.84, 0.42, 1) infinite;
  filter: drop-shadow(0 0 5px rgba(56, 182, 255, 0.4));
}

@keyframes calendar-bounce {

  0%,
  100% {
    transform: translateY(0);
  }

  10% {
    transform: translateY(-4px) rotate(-5deg);
  }

  20% {
    transform: translateY(0) rotate(5deg);
  }

  30% {
    transform: translateY(-2px) rotate(-3deg);
  }

  40% {
    transform: translateY(0) rotate(0deg);
  }
}

.laurel-wreath-icon {
  fill: none;
  stroke: #ffd700;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 0 8px rgba(255, 215, 0, 0.5));
}

/* -----------------[ Sidebar Floating Panel Optics ]----------------- */

.floating-sidebar {
  position: fixed;
  top: 0;
  right: -420px;
  width: 400px;
  height: 100vh;
  max-height: none;
  background: rgba(11, 17, 24, 0.85);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  border-left: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: -10px 0 50px rgba(0, 0, 0, 0.5);
  padding: 5.0rem 2.5rem 2.5rem 2.5rem;
  z-index: 1000;
  overflow-y: auto;
  transition: right 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.floating-sidebar.active {
  right: 0;
}

.toggle-sidebar-btn {
  position: fixed;
  top: 20vh;
  right: 0;
  background: linear-gradient(135deg, #0ed3ff 0%, #38b6ff 100%);
  color: #fff;
  border: none;
  padding: 0.85rem;
  border-top-left-radius: 16px;
  border-bottom-left-radius: 16px;
  cursor: pointer;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: -5px 0 20px rgba(14, 211, 255, 0.3);
  transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.toggle-sidebar-btn:hover {
  transform: translateX(-5px);
  box-shadow: -10px 0 30px rgba(14, 211, 255, 0.5);
}

/* Explicit Character View Profile Button Styles */
.view-profile-btn {
  background: rgba(56, 182, 255, 0.1);
}

.view-profile-btn:hover {
  background: rgba(56, 182, 255, 0.2) !important;
}