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

/* Theme */
:root {
  /* Background */
  --bg-1: #0b0b10;
  --bg-2: #14141b;

  /* Text */
  --text: #f2eff8;
  --muted: #b4aebe;

  /* Surfaces */
  --panel-bg: rgba(22, 20, 31, 0.88);
  --card-bg: rgba(39, 34, 52, 0.94);
  --line: #4b415f;

  /* Buttons */
  --btn-bg: #24202f;
  --btn-hover: #2f2940;

  /* Accent */
  --accent: #9146ff;
  --accent-soft: #c2a1ff;
  --accent-faint: #d8c7fb;
  --accent-rgb: 145, 70, 255;

  /* Effects and sizing */
  --shadow: 0 20px 52px rgba(0, 0, 0, 0.58);
  --radius: 16px;
  --bottom-box-width: min(760px, calc(100% - 28px));
  --bottom-box-height: 160px;
  --font-ui: "Manrope", "Sora", "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

/* Page Base */
body {
  position: relative;
  isolation: isolate;
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  background: linear-gradient(180deg, var(--bg-1), var(--bg-2));
  background-repeat: no-repeat;
  font-family: var(--font-ui);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  padding-bottom: 40px;
}

/* Background Layers */
body::before,
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  transition: opacity 420ms ease;
}

/* Desktop halos */
body::before {
  background:
    radial-gradient(1700px 900px at 100% -10%, rgba(var(--accent-rgb), 0.36) 0%, rgba(var(--accent-rgb), 0.12) 46%, transparent 82%),
    radial-gradient(1560px 840px at -10% 110%, rgba(var(--accent-rgb), 0.28) 0%, rgba(var(--accent-rgb), 0.1) 48%, transparent 84%);
  opacity: 1;
}

/* Mobile horizontal halos */
body::after {
  background:
    linear-gradient(
      180deg,
      rgba(var(--accent-rgb), 0.24) 0%,
      rgba(var(--accent-rgb), 0.12) 16%,
      rgba(var(--accent-rgb), 0.05) 30%,
      transparent 52%
    ),
    linear-gradient(
      0deg,
      rgba(var(--accent-rgb), 0.2) 0%,
      rgba(var(--accent-rgb), 0.1) 14%,
      rgba(var(--accent-rgb), 0.04) 28%,
      transparent 50%
    );
  opacity: 0;
}

/* Banner */
.banner {
  position: relative;
  z-index: 1;
  width: 100%;
  display: flex;
  justify-content: center;
  padding-top: 30px;
}

.back_home_link {
  display: inline-block;
  margin: 0 0 12px;
  color: var(--accent-soft);
  text-decoration: none;
  font-weight: 700;
}

.back_home_link:hover {
  color: var(--accent-faint);
  text-decoration: underline;
}

.banner img {
  width: min(700px, 100%);
  height: auto;
  display: block;
}

.important_dropdown_wrap {
  display: none;
  position: relative;
  z-index: 1;
  width: min(760px, calc(100% - 28px));
  margin: 8px auto 0;
}

.important_dropdown {
  border: 1px solid rgba(120, 98, 170, 0.45);
  border-radius: var(--radius);
  background: rgba(17, 15, 30, 0.9);
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow);
  padding: 10px 12px;
}

.important_dropdown > summary {
  list-style: none;
  cursor: pointer;
  color: var(--text);
  font-weight: 700;
}

.important_dropdown > summary::-webkit-details-marker {
  display: none;
}

.important_dropdown > summary::after {
  content: "▾";
  float: right;
  color: var(--accent-soft);
  transition: transform 180ms ease;
}

.important_dropdown[open] > summary::after {
  transform: rotate(180deg);
}

.important_dropdown_list {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.home_panels {
  position: relative;
  z-index: 1;
  width: min(1360px, calc(100% - 32px));
  margin: 0 auto 48px;
  display: grid;
  grid-template-columns: minmax(220px, 280px) minmax(0, 1fr) minmax(260px, 340px);
  gap: 16px;
  align-items: start;
}

.community_intro_box {
  width: 100%;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel-bg);
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow);
  padding: clamp(18px, 2vw, 24px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.community_intro_title {
  margin: 0;
  text-align: center;
  color: var(--text);
}

.community_intro_subtitle {
  margin: 0;
  text-align: center;
  color: var(--muted);
}

.community_intro_button {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--btn-bg);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
  min-height: 52px;
  min-width: min(280px, 100%);
  padding: 8px 24px;
  box-shadow:
    0 6px 18px rgba(0, 0, 0, 0.26),
    inset 0 1px 0 rgba(var(--accent-rgb), 0.16);
  transition: background-color 180ms ease, transform 180ms ease, box-shadow 180ms ease;
}

.community_intro_button:hover {
  background: var(--btn-hover);
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
}

.community_intro_button:focus-visible {
  outline: 2px solid var(--accent-soft);
  outline-offset: 2px;
}

.game_box {
  width: 100%;
  min-height: 420px;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel-bg);
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow);
  padding: clamp(18px, 2vw, 24px);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.game_box_title {
  margin: 0;
  text-align: center;
  color: var(--text);
}

.game_box_main_title {
  font-size: clamp(1.5rem, 2.1vw, 1.9rem);
}

.game_box_subtitle {
  margin: 0;
  text-align: center;
  color: var(--muted);
}

.game_links {
  display: grid;
  flex: 1;
  min-height: 0;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  align-content: start;
  margin-top: 14px;
  padding-right: 4px;
  overflow-y: auto;
  overflow-x: hidden;
  min-height: calc((52px * 4) + (12px * 3));
  max-height: calc((52px * 4) + (12px * 3));
}

.game_links::-webkit-scrollbar,
.streamer_list::-webkit-scrollbar {
  width: 6px;
}

.game_links::-webkit-scrollbar-thumb,
.streamer_list::-webkit-scrollbar-thumb {
  background: rgba(var(--accent-rgb), 0.42);
  border-radius: 999px;
}

.game_box_empty {
  margin: 0;
  text-align: center;
  color: var(--muted);
}

.game_links a {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--btn-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
  min-height: 52px;
  width: 100%;
  padding: 8px 10px;
  box-shadow:
    0 6px 18px rgba(0, 0, 0, 0.26),
    inset 0 1px 0 rgba(var(--accent-rgb), 0.16);
  transition: background-color 180ms ease, transform 180ms ease, box-shadow 180ms ease;
  overflow-wrap: anywhere;
}

.game_links a:hover {
  background: var(--btn-hover);
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
}

.game_links a:focus-visible {
  outline: 2px solid var(--accent-soft);
  outline-offset: 2px;
}

.game_page_wrap {
  position: relative;
  z-index: 1;
  width: min(900px, calc(100% - 32px));
  margin: 24px auto 48px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel-bg);
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow);
  color: var(--text);
}

.game_page_wrap h1 {
  margin: 0 0 12px;
}

.game_page_content {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
}

.game_page_description {
  flex: 1;
  min-width: 0;
}

.game_page_description p {
  margin: 0;
  color: var(--muted);
}

.discord_widget_box {
  display: flex;
  flex: 0 0 350px;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: var(--card-bg);
  box-shadow:
    inset 0 1px 0 rgba(var(--accent-rgb), 0.12),
    0 10px 24px rgba(0, 0, 0, 0.32);
}

.discord_widget_box iframe {
  display: block;
  width: min(100%, 350px);
  max-width: 100%;
}

.streamer_box {
  position: relative;
  width: 100%;
  min-height: 0;
  margin: 0;
  border: 1px solid rgba(120, 98, 170, 0.45);
  border-radius: var(--radius);
  background: rgba(17, 15, 30, 0.9);
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow);
  overflow: hidden;
  padding: 20px 12px;
  z-index: 1;
  background-clip: padding-box;
  grid-column: 3;
  grid-row: 1 / span 3;
}

.important_box {
  position: relative;
  width: 100%;
  min-height: 0;
  margin: 0;
  border: 1px solid rgba(120, 98, 170, 0.45);
  border-radius: var(--radius);
  background: rgba(17, 15, 30, 0.9);
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow);
  overflow: hidden;
  padding: 20px 12px;
  z-index: 1;
  background-clip: padding-box;
  grid-column: 1;
  grid-row: 1;
}

.alerts_box {
  position: relative;
  width: 100%;
  min-height: var(--bottom-box-height);
  border: 1px solid rgba(120, 98, 170, 0.45);
  border-radius: var(--radius);
  background: rgba(17, 15, 30, 0.92);
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow);
  padding: 10px 12px 8px;
  z-index: 1;
  grid-column: 1;
  grid-row: 2;
  margin-top: 0;
}

.alerts_box_title {
  margin: 0;
  color: var(--text);
  text-align: center;
  font-size: clamp(1.1rem, 1.7vw, 1.3rem);
}

.alerts_carousel {
  margin-top: 8px;
  display: block;
}

.alerts_track {
  min-height: 90px;
  height: 90px;
  display: flex;
  align-items: stretch;
  justify-content: center;
  padding: 0 6px;
}

.alerts_controls {
  margin-top: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.alerts_item {
  margin: 0;
  width: 100%;
  height: 100%;
  overflow-y: auto;
  color: var(--text);
  font-weight: 600;
  text-align: center;
  overflow-wrap: anywhere;
  padding: 8px 6px;
}

.alerts_item::-webkit-scrollbar {
  width: 6px;
}

.alerts_item::-webkit-scrollbar-thumb {
  background: rgba(var(--accent-rgb), 0.42);
  border-radius: 999px;
}

.alerts_nav_button {
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--text);
  min-height: 24px;
  min-width: 20px;
  padding: 0;
  font-size: 0.82rem;
  line-height: 1;
  font-weight: 700;
  cursor: pointer;
  transition: color 180ms ease, transform 180ms ease, opacity 180ms ease;
}

.alerts_nav_button:hover {
  color: var(--accent-soft);
  transform: translateY(-1px);
}

.alerts_nav_button:focus-visible {
  outline: 2px solid var(--accent-soft);
  outline-offset: 2px;
}

.alerts_nav_button:disabled {
  cursor: default;
  opacity: 0.5;
  transform: none;
}

.alerts_counter {
  margin: 0;
  color: var(--muted);
  text-align: center;
  font-size: 0.85rem;
  min-width: 46px;
}

.important_box_title {
  margin: 0 0 8px;
  margin-left: 10px;
  color: var(--text);
  font-size: clamp(1.2rem, 2vw, 1.4rem);
  letter-spacing: 0.01em;
}

.community_intro_box {
  grid-column: 2;
  align-self: stretch;
}

.game_box {
  grid-column: 2;
}

.important_box {
  align-self: stretch;
}

.important_list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-left: 10px;
  padding-right: 4px;
}

.important_link {
  border: 1px solid rgba(132, 106, 189, 0.42);
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(41, 36, 58, 0.96), rgba(35, 31, 52, 0.95));
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 8px 10px;
  text-decoration: none;
  color: var(--text);
  font-weight: 700;
  text-align: center;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 8px 22px rgba(0, 0, 0, 0.25);
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.important_link:hover {
  transform: translateY(-1px);
  border-color: rgba(194, 161, 255, 0.56);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 12px 24px rgba(0, 0, 0, 0.34);
}

.important_link:focus-visible {
  outline: 2px solid var(--accent-soft);
  outline-offset: 2px;
}

.streamer_box_title {
  margin: 0 0 8px;
  color: var(--text);
  font-size: clamp(1.9rem, 2.5vw, 2.2rem);
  letter-spacing: 0.01em;
}

.streamer_box_subtitle {
  margin: 4px 0 0;
  color: var(--muted);
}

.streamer_list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 12px;
  max-height: 520px;
  overflow-y: auto;
  overflow-x: hidden;
  padding-left: 10px;
  padding-right: 4px;
}

.streamer_row {
  position: relative;
  display: block;
  align-items: flex-start;
  border: 1px solid rgba(132, 106, 189, 0.42);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(41, 36, 58, 0.96), rgba(35, 31, 52, 0.95));
  padding: 14px 10px;
  text-decoration: none;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 8px 22px rgba(0, 0, 0, 0.25);
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.streamer_row:hover {
  transform: translateY(-1px);
  border-color: rgba(194, 161, 255, 0.56);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 12px 24px rgba(0, 0, 0, 0.34);
}

.streamer_row:focus-visible {
  outline: 2px solid var(--accent-soft);
  outline-offset: 2px;
}

.status_dot {
  display: block;
  position: absolute;
  left: -11px;
  top: 18px;
  transform: none;
  width: 11px;
  height: 44px;
  border-radius: 999px 0 0 999px;
}

.status_online {
  background: #21d164;
  box-shadow: 0 0 12px rgba(33, 209, 100, 0.45);
}

.status_offline {
  background: #ef3b34;
  box-shadow: 0 0 12px rgba(239, 59, 52, 0.35);
}

.streamer_label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  flex: 1;
  padding-right: 4px;
}

.streamer_head {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  min-width: 0;
}

.streamer_identity {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.streamer_logo_wrap {
  width: 26px;
  height: 26px;
  aspect-ratio: 1 / 1;
  border-radius: 999px;
  flex: 0 0 auto;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  background: transparent;
}

.streamer_logo {
  width: 100%;
  height: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  object-position: 50% 50%;
  display: block;
}

.streamer_logo_placeholder {
  color: #f3eefe;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1;
  text-transform: uppercase;
}

.streamer_name {
  color: var(--text);
  font-weight: 700;
  font-size: 1.06rem;
  letter-spacing: 0.01em;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.streamer_status_text {
  color: #bab3cc;
  font-size: 0.96rem;
  font-weight: 500;
  white-space: nowrap;
}

.status_online ~ .streamer_label .streamer_status_text,
.streamer_row .status_online + .streamer_label .streamer_status_text {
  color: #8fe9b3;
}

.status_offline ~ .streamer_label .streamer_status_text,
.streamer_row .status_offline + .streamer_label .streamer_status_text {
  color: #c1bbd1;
}

.streamer_meta_line {
  display: block;
  color: #c6bfd7;
  font-size: 0.96rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.streamer_meta_line strong {
  color: #f0ebfb;
  font-weight: 600;
  margin-right: 4px;
}

.streamer_live_title,
.streamer_live_category,
.streamer_last_online {
  color: #d6cfff;
  overflow-wrap: anywhere;
}

.streamer_live_category,
.streamer_last_online_line {
  color: #9f6bff;
  font-weight: 700;
}

.streamer_live_category {
  display: inline-block;
  margin-top: 2px;
}

.streamer_online_meta,
.streamer_offline_meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.is-hidden {
  display: none;
}

/* Responsive */
@media (max-width: 1100px) {
  .banner {
    padding-top: 18px;
  }

  .important_dropdown_wrap {
    display: block;
  }

  .home_panels {
    width: min(760px, calc(100% - 28px));
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
    margin-top: 12px;
  }

  .important_box,
  .community_intro_box,
  .game_box,
  .alerts_box,
  .streamer_box {
    grid-column: 1;
    grid-row: auto;
    margin-top: 0;
    min-height: 0;
    padding: 16px;
  }

  .important_box {
    display: none;
  }

  .community_intro_box {
    order: 1;
  }

  .game_box {
    order: 2;
  }

  .alerts_box {
    order: 3;
  }

  .streamer_box {
    order: 4;
  }

  .community_intro_button {
    width: 100%;
    max-width: 420px;
  }

  .game_links {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    min-height: 0;
    max-height: none;
  }

  .streamer_status_text {
    white-space: normal;
  }

  .alerts_track {
    min-height: 0;
    height: auto;
  }

  .alerts_item {
    min-height: 90px;
    height: auto;
    overflow: visible;
  }

  .streamer_list {
    max-height: none;
    overflow: visible;
  }
}

@media (max-width: 768px) {
  body::before {
    opacity: 0;
  }

  body::after {
    opacity: 1;
  }

  .game_page_wrap {
    margin-top: 16px;
    padding: 16px;
  }

  .game_page_content {
    flex-direction: column;
    gap: 16px;
  }

  .discord_widget_box {
    flex-basis: auto;
    width: 100%;
  }

  .home_panels {
    width: calc(100% - 28px);
    margin-top: 10px;
    margin-bottom: 28px;
    gap: 12px;
    grid-template-columns: minmax(0, 1fr);
  }

  .important_box,
  .community_intro_box,
  .game_box,
  .alerts_box,
  .streamer_box {
    grid-column: 1;
    margin-top: 0;
    padding: 16px;
  }
}

@media (max-width: 520px) {
  .banner {
    padding-top: 20px;
  }

  .game_links {
    grid-template-columns: minmax(0, 1fr);
  }

  .alerts_nav_button {
    min-height: 22px;
    min-width: 18px;
    font-size: 0.78rem;
  }

  .streamer_status_text {
    white-space: normal;
  }
}
