:root {
  --fx-bg: #07080b;
  --fx-surface: #0f1118;
  --fx-surface-hover: #171a26;
  --fx-glass: rgba(15, 17, 24, 0.75);
  --fx-glass-border: rgba(255, 255, 255, 0.08);
  --fx-accent: #ff3b30;
  --fx-accent-glow: rgba(255, 59, 48, 0.35);
  --fx-gold: #ffc107;
  --fx-text-main: #f1f5f9;
  --fx-text-muted: #94a3b8;
  --fx-radius: 14px;
}

[data-bs-theme="light"] {
  --fx-bg: #f8fafc;
  --fx-surface: #ffffff;
  --fx-surface-hover: #f1f5f9;
  --fx-glass: rgba(255, 255, 255, 0.85);
  --fx-glass-border: rgba(0, 0, 0, 0.08);
  --fx-text-main: #0f172a;
  --fx-text-muted: #64748b;
}

body {
  background-color: var(--fx-bg) !important;
  color: var(--fx-text-main);
  font-family: 'Outfit', sans-serif;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

.top-bar {
  background: var(--fx-glass) !important;
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border-bottom: 1px solid var(--fx-glass-border);
  padding: 12px 0;
  transition: all 0.3s ease;
}

.top-bar .container-fluid {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  max-width: 1600px;
}

#sidebarToggler {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--fx-glass-border);
  color: var(--fx-text-main);
  border-radius: 10px;
  padding: 8px 14px;
  transition: all 0.2s ease;
}

#sidebarToggler:hover {
  background: rgba(255, 255, 255, 0.12);
  transform: scale(1.03);
}

.futbolx-brand {
  font-family: 'Kanit', sans-serif;
  font-weight: 900;
  font-size: 1.5rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--fx-text-main);
  display: inline-flex;
  align-items: center;
  user-select: none;
  text-decoration: none;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  cursor: pointer;
  text-shadow: none !important;
  filter: none !important;
}

.futbolx-brand .ball-o {
  color: var(--fx-gold);
  font-size: 1.25rem;
  margin: 0 2px;
  filter: none !important;
  text-shadow: none !important;
  transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
  display: inline-block;
}

.futbolx-brand:hover .ball-o {
  transform: rotate(180deg) scale(1.1);
}

.futbolx-brand .ball-o.spinning {
  animation: ballSpin 0.6s cubic-bezier(0.25, 1, 0.5, 1);
}

@keyframes ballSpin {
  0% { transform: rotate(0deg) scale(1); }
  50% { transform: rotate(180deg) scale(1.3); }
  100% { transform: rotate(360deg) scale(1); }
}

.offcanvas {
  background-color: var(--fx-surface) !important;
  border-right: 1px solid var(--fx-glass-border) !important;
}

.offcanvas-header {
  border-bottom: 1px solid var(--fx-glass-border);
}

.offcanvas .nav-link {
  color: var(--fx-text-main);
  font-weight: 500;
  padding: 12px 16px;
  border-radius: 10px;
  transition: all 0.2s ease;
  margin-bottom: 4px;
}

.offcanvas .nav-link:hover {
  background: var(--fx-surface-hover);
  color: var(--fx-accent);
  transform: translateX(4px);
}

.hero-container-wrapper {
  padding-top: 80px;
}

.hero-background {
  background-image: linear-gradient(180deg, rgba(7, 8, 11, 0.1) 0%, var(--fx-bg) 100%),
                    url('https://cdn.phototourl.com/free/2026-07-30-b4eb4fe7-50b2-4b18-8f9b-605f09574de3.png') !important;
  background-size: contain !important;
  background-position: center center !important;
  background-repeat: no-repeat !important;
  width: 100%;
  aspect-ratio: 16 / 6;
  max-height: 420px;
  border-radius: var(--fx-radius);
  border: 1px solid var(--fx-glass-border);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
  position: relative;
}

h2 {
  font-family: 'Kanit', sans-serif;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 1.4rem;
  display: flex;
  align-items: center;
  gap: 10px;
}

h2::before {
  content: '';
  display: inline-block;
  width: 4px;
  height: 22px;
  background: var(--fx-accent);
  border-radius: 4px;
  box-shadow: 0 0 10px var(--fx-accent-glow);
}

.live-animation {
  display: inline-block;
  width: 10px;
  height: 10px;
  background-color: var(--fx-accent);
  border-radius: 50%;
  box-shadow: 0 0 0 rgba(255, 59, 48, 0.7);
  animation: pulseGlow 1.6s infinite;
  margin-left: 6px;
}

@keyframes pulseGlow {
  0% { box-shadow: 0 0 0 0 rgba(255, 59, 48, 0.7); }
  70% { box-shadow: 0 0 0 10px rgba(255, 59, 48, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 59, 48, 0); }
}

.event-grid,
#livecards.event-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 1.5rem;
  padding: 1rem 0;
}

.event-grid a {
  text-decoration: none;
  color: inherit;
}

.card {
  background: var(--fx-surface) !important;
  border: 1px solid var(--fx-glass-border) !important;
  border-radius: var(--fx-radius) !important;
  overflow: hidden;
  position: relative;
  transition: all 0.35s cubic-bezier(0.25, 1, 0.5, 1) !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.card:hover,
.card:focus-visible {
  transform: translateY(-6px) scale(1.01) !important;
  border-color: rgba(255, 59, 48, 0.6) !important;
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.5), 0 0 20px var(--fx-accent-glow) !important;
  outline: none;
}

.card-img-top {
  width: 100%;
  aspect-ratio: 16 / 9;
  height: auto;
  object-fit: cover;
  object-position: center;
  display: block;
  transition: transform 0.5s ease;
}

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

.card-body {
  padding: 1.2rem !important;
  background: linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(0,0,0,0.4) 100%);
  min-width: 0;
}

.card-title {
  font-family: 'Kanit', sans-serif;
  font-weight: 700;
  font-size: 1.15rem;
  line-height: 1.3;
  margin-bottom: 0.75rem;
  color: var(--fx-text-main);
  white-space: normal;
  overflow-wrap: break-word;
  word-break: normal;
  overflow: visible;
  display: block;
}

.card-text {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.event-tag {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background: rgba(255, 255, 255, 0.06);
  padding: 4px 10px;
  border-radius: 6px;
  color: var(--fx-text-muted);
  border: 1px solid var(--fx-glass-border);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.watch-button {
  background: var(--fx-accent) !important;
  border: none !important;
  font-weight: 700 !important;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 6px 16px !important;
  border-radius: 20px !important;
  box-shadow: 0 4px 12px var(--fx-accent-glow);
  flex-shrink: 0;
}

.live-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  background: var(--fx-accent) !important;
  color: #fff !important;
  padding: 4px 12px !important;
  border-radius: 20px !important;
  font-size: 0.7rem !important;
  font-weight: 800 !important;
  letter-spacing: 1px;
  z-index: 10;
  box-shadow: 0 0 12px var(--fx-accent-glow);
}

@media (min-width: 1921px) {
  html {
    font-size: 18px;
  }

  .container {
    max-width: 1800px !important;
  }

  .hero-background {
    aspect-ratio: 21 / 6;
    max-height: 480px;
  }

  .event-grid,
  #livecards.event-grid {
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 2rem;
  }

  .card-img-top {
    aspect-ratio: 16 / 9;
    height: auto;
  }

  .futbolx-brand {
    font-size: 2rem;
  }

  .futbolx-brand .ball-o {
    font-size: 1.6rem;
  }
}

@media (min-width: 1440px) and (max-width: 1920px) {
  .container {
    max-width: 1400px !important;
  }

  .event-grid,
  #livecards.event-grid {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  }
}

@media (min-width: 1025px) and (max-width: 1439px) {
  .container {
    max-width: 1140px !important;
  }

  .event-grid,
  #livecards.event-grid {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.25rem;
  }
}

@media (min-width: 768px) and (max-width: 1024px) {
  .container {
    max-width: 100% !important;
    padding: 0 24px;
  }

  .hero-background {
    aspect-ratio: 16 / 7;
    max-height: 320px;
  }

  .event-grid,
  #livecards.event-grid {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.2rem;
  }

  .card-img-top {
    aspect-ratio: 16 / 9;
    height: auto;
  }
}

@media (max-width: 767px) {
  .container {
    padding: 0 12px !important;
  }

  .hero-container-wrapper {
    padding-top: 72px;
  }

  .hero-background {
    aspect-ratio: 16 / 9;
    max-height: 220px;
  }

  .event-grid {
    display: flex !important;
    flex-direction: column;
    gap: 12px !important;
    padding: 0.5rem 0 !important;
  }

  .card {
    display: flex !important;
    flex-direction: row !important;
    min-height: 105px !important;
    height: auto !important;
    background: var(--fx-surface) !important;
    border-radius: var(--fx-radius) !important;
    align-items: stretch;
    border: 1px solid var(--fx-glass-border) !important;
  }

  .card-img-top {
    width: 38% !important;
    height: 100% !important;
    min-height: 105px;
    aspect-ratio: auto !important;
    flex-shrink: 0;
    object-fit: fill !important;
    object-position: center;
    border-radius: var(--fx-radius) 0 0 var(--fx-radius);
  }

  .card-body {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 10px 14px !important;
    height: auto;
    min-height: 105px;
    flex: 1;
    min-width: 0;
  }

  .card-title {
    font-size: 0.92rem !important;
    font-weight: 600;
    margin-bottom: 4px !important;
    line-height: 1.2 !important;
    display: block !important;
    white-space: normal !important;
    overflow: visible !important;
    overflow-wrap: break-word;
    word-break: normal;
    flex-shrink: 0;
  }

  .card-text {
    flex-wrap: nowrap !important;
    gap: 6px;
    min-width: 0;
    flex-shrink: 0;
  }

  .event-tag {
    max-width: 55%;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 0 1 auto;
  }

  .event-timer {
    flex-shrink: 0;
    white-space: nowrap;
  }

  .live-badge {
    top: 8px !important;
    left: 8px !important;
    right: auto !important;
    font-size: 0.6rem !important;
    padding: 2px 8px !important;
  }

  h2 {
    font-size: 1.2rem;
  }
}

@media (max-width: 480px) {
  .futbolx-brand {
    font-size: 1.25rem;
  }

  .futbolx-brand .ball-o {
    font-size: 1rem;
  }

  .card {
    min-height: 95px !important;
    height: auto !important;
  }

  .card-img-top {
    width: 38% !important;
    min-height: 95px;
    height: 100% !important;
    aspect-ratio: auto !important;
    object-fit: fill !important;
  }

  .card-body {
    min-height: 95px;
    padding: 8px 10px !important;
  }

  .card-title {
    font-size: 0.85rem !important;
    line-height: 1.2 !important;
  }

  .event-tag {
    font-size: 0.7rem;
    padding: 2px 6px;
  }

  .watch-button {
    font-size: 0.7rem !important;
    padding: 4px 10px !important;
  }

  .disclaimer-content {
    padding: 24px 16px;
  }

  #discordBtn img {
    width: 44px;
    height: 44px;
  }
}

#disclaimer-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(4, 5, 8, 0.85);
  z-index: 12000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  backdrop-filter: blur(16px);
}

.disclaimer-content {
  max-width: 520px;
  width: 100%;
  padding: 36px;
  border-radius: 24px;
  text-align: center;
  background: var(--fx-surface) !important;
  border: 1px solid var(--fx-glass-border);
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.8), 0 0 30px rgba(255, 59, 48, 0.15);
}

.btn-understood {
  background: linear-gradient(135deg, #ff3b30 0%, #e0281b 100%);
  color: white;
  border: none;
  padding: 14px 44px;
  border-radius: 50px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  box-shadow: 0 8px 20px var(--fx-accent-glow);
  transition: all 0.3s ease;
}

.btn-understood:hover {
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 12px 25px var(--fx-accent-glow);
}

.site-blurred {
  filter: blur(10px);
  pointer-events: none;
  user-select: none;
}

#splash-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--fx-bg);
  z-index: 11000;
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  transition: opacity 0.8s ease-out;
}

.splash-logo {
  width: 120px;
  border-radius: 24px;
  margin-bottom: 24px;
  filter: drop-shadow(0 0 20px var(--fx-accent-glow));
}

#cycling-text {
  color: var(--fx-accent);
  font-family: 'Kanit', sans-serif;
  font-weight: 700;
  font-size: 1.1rem;
  text-transform: uppercase;
  letter-spacing: 2px;
}

#discordBtn {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

#discordBtn:hover {
  transform: scale(1.1);
}

#discordBtn img {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  box-shadow: 0 8px 20px rgba(88, 101, 242, 0.4);
}

#pwaWrapper {
  position: fixed;
  bottom: 24px;
  left: 24px;
  z-index: 9999;
  display: none;
  align-items: center;
}

#installAppBtn {
  background: linear-gradient(135deg, var(--fx-accent) 0%, #d32f2f 100%);
  color: white;
  border: none;
  border-radius: 50px;
  padding: 12px 22px;
  font-weight: 700;
  box-shadow: 0 8px 20px var(--fx-accent-glow);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.9rem;
}

#closePwa {
  background: rgba(0, 0, 0, 0.8);
  color: white;
  border: 1px solid var(--fx-glass-border);
  border-radius: 50%;
  width: 24px;
  height: 24px;
  font-size: 10px;
  margin-left: -10px;
  margin-top: -30px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

footer {
  border-top: 1px solid var(--fx-glass-border) !important;
  color: var(--fx-text-muted);
  }
