@font-face {
  font-family: "The Bold Font";
  src: url("./assets/fonts/theboldfont.ttf") format("truetype");
  font-display: swap;
}

:root {
  --bg: #0b0d12;
  --panel: #151922;
  --panel-soft: #1c2230;
  --text: #f7f7fb;
  --muted: #aab0be;
  --line: rgba(255, 255, 255, 0.12);
  --blue: #2aa8ff;
  --green: #2dff9a;
  --pink: #ff4f9f;
  --yellow: #ffe66d;
  --radius: 8px;
  --shadow: 0 18px 60px rgba(0, 0, 0, 0.34);
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #f5f7fb;
    --panel: #ffffff;
    --panel-soft: #eef3fb;
    --text: #121722;
    --muted: #586173;
    --line: rgba(13, 22, 35, 0.14);
    --shadow: 0 18px 50px rgba(38, 54, 78, 0.16);
  }
}

:root[data-theme="dark"] {
  --bg: #0b0d12;
  --panel: #151922;
  --panel-soft: #1c2230;
  --text: #f7f7fb;
  --muted: #aab0be;
  --line: rgba(255, 255, 255, 0.12);
  --shadow: 0 18px 60px rgba(0, 0, 0, 0.34);
}

:root[data-theme="light"] {
  --bg: #f5f7fb;
  --panel: #ffffff;
  --panel-soft: #eef3fb;
  --text: #121722;
  --muted: #586173;
  --line: rgba(13, 22, 35, 0.14);
  --shadow: 0 18px 50px rgba(38, 54, 78, 0.16);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    linear-gradient(180deg, rgba(42, 168, 255, 0.14), transparent 320px),
    linear-gradient(135deg, rgba(45, 255, 154, 0.08), transparent 360px),
    var(--bg);
}

:root[data-reduce-motion="true"] *,
:root[data-reduce-motion="true"] *::before,
:root[data-reduce-motion="true"] *::after {
  scroll-behavior: auto !important;
  animation: none !important;
  transition-duration: 0.01ms !important;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  content: "";
  background-image: linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 100% 42px;
  mask-image: linear-gradient(to bottom, black, transparent 82%);
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

button,
input,
textarea,
select {
  font: inherit;
}

[hidden] {
  display: none !important;
}

.skip-link {
  position: fixed;
  left: 1rem;
  top: 1rem;
  z-index: 50;
  padding: 0.7rem 0.9rem;
  color: #061018;
  background: var(--green);
  border-radius: var(--radius);
  transform: translateY(-150%);
}

.skip-link:focus {
  transform: translateY(0);
}

.site-shell {
  width: min(100% - 1rem, 760px);
  margin: 0 auto;
  padding: clamp(1rem, 4vw, 2.4rem) 0 4rem;
}

.profile-card,
.panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(21, 25, 34, 0.88);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.profile-card {
  position: relative;
  overflow: hidden;
  padding: clamp(1rem, 4vw, 2rem);
  text-align: center;
  animation: rise-in 520ms ease both;
}

.cover-line {
  position: absolute;
  inset: 0 0 auto;
  height: 112px;
  background:
    linear-gradient(90deg, rgba(42, 168, 255, 0.9), rgba(45, 255, 154, 0.75), rgba(255, 79, 159, 0.8)),
    #263142;
}

.admin-icon {
  position: absolute;
  right: 0.9rem;
  top: 0.9rem;
  z-index: 2;
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.32);
  border-radius: 50%;
  background: rgba(11, 13, 18, 0.55);
  cursor: pointer;
  transition: transform 160ms ease, background 160ms ease;
}

.admin-icon:hover {
  transform: rotate(35deg) scale(1.04);
  background: rgba(11, 13, 18, 0.82);
}

.admin-icon img,
.icon-white {
  width: 22px;
  filter: brightness(0) invert(1);
}

.avatar {
  position: relative;
  width: 132px;
  aspect-ratio: 1;
  margin: 48px auto 1rem;
  object-fit: cover;
  border: 4px solid var(--panel);
  border-radius: 50%;
  background: var(--panel-soft);
  animation: soft-float 6s ease-in-out infinite;
}

.profile-name {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 0.98;
  letter-spacing: 0;
}

h1,
.admin-title,
.brand-word {
  font-family: "The Bold Font", Impact, Haettenschweiler, "Arial Black", sans-serif;
  text-transform: uppercase;
}

h1 {
  font-size: clamp(2.5rem, 12vw, 5.1rem);
}

.handle,
.location,
.bio {
  margin: 0;
}

.handle {
  color: var(--blue);
  font-weight: 800;
}

.location {
  margin-top: 0.35rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.bio {
  max-width: 48ch;
  margin: 1rem auto 0;
  color: #d7dbea;
  line-height: 1.6;
}

.social-icons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.55rem;
  margin-top: 1.2rem;
}

.social-icon {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.07);
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.social-icon:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.13);
}

.social-icon img {
  width: 21px;
  max-height: 21px;
  filter: brightness(0) invert(1);
}

.text-icon {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  color: white;
  font-size: 0.72rem;
  font-weight: 950;
  letter-spacing: 0;
}

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(92px, 1fr));
  gap: 0.5rem;
  margin-top: 1.3rem;
}

.stat-item {
  min-width: 0;
  padding: 0.78rem 0.5rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.06);
  transition: transform 160ms ease, background 160ms ease;
}

.stat-item:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.1);
}

.stat-item strong,
.stat-item span {
  display: block;
}

.stat-item strong {
  font-size: 1.25rem;
}

.stat-item span {
  margin-top: 0.12rem;
  color: var(--muted);
  font-size: 0.78rem;
}

.panel {
  margin-top: 0.8rem;
  padding: clamp(0.9rem, 3vw, 1.2rem);
  animation: rise-in 520ms ease both;
  animation-delay: 90ms;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.8rem;
}

.panel-head h2 {
  font-size: 1.05rem;
}

.panel-head span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.link-list {
  display: grid;
  gap: 0.62rem;
}

.link-card {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.78rem;
  min-height: 74px;
  padding: 0.58rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.06);
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease;
}

.link-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.1);
}

.thumb {
  display: grid;
  width: 56px;
  aspect-ratio: 1;
  place-items: center;
  overflow: hidden;
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(42, 168, 255, 0.32), rgba(45, 255, 154, 0.22));
}

.thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.thumb img.icon-white {
  width: 26px;
  height: 26px;
  object-fit: contain;
}

.link-copy {
  min-width: 0;
}

.link-copy small,
.link-copy strong,
.link-copy em {
  display: block;
}

.link-copy small {
  color: var(--blue);
  font-size: 0.72rem;
  font-style: normal;
  font-weight: 900;
  text-transform: uppercase;
}

.link-copy strong {
  overflow: hidden;
  margin-top: 0.08rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.link-copy em {
  overflow: hidden;
  margin-top: 0.14rem;
  color: var(--muted);
  font-size: 0.85rem;
  font-style: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.arrow {
  color: var(--muted);
  font-size: 1.8rem;
}

.embed-grid {
  display: grid;
  gap: 0.75rem;
}

.embed-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.055);
}

.embed-title-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.8rem;
}

.embed-title-row img,
.discord-mark {
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
}

.embed-title-row img {
  filter: brightness(0) invert(1);
}

.discord-mark {
  display: grid;
  place-items: center;
  color: white;
  font-size: 0.75rem;
  font-weight: 900;
  border-radius: var(--radius);
  background: #5865f2;
}

.embed-title-row h3 {
  font-size: 1rem;
}

.embed-title-row p {
  margin: 0.2rem 0 0;
  color: var(--muted);
  font-size: 0.85rem;
}

.responsive-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #090b0f;
}

.responsive-frame iframe,
.discord-widget iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.discord-widget {
  position: relative;
  height: 260px;
  background: #10131b;
}

.discord-fallback {
  padding: 0 0.9rem 0.9rem;
}

.discord-overlay-link {
  position: absolute;
  right: 0.65rem;
  bottom: 0.65rem;
  z-index: 2;
  padding: 0.48rem 0.62rem;
  color: white;
  font-size: 0.78rem;
  font-weight: 900;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: var(--radius);
  background: rgba(0, 0, 0, 0.55);
}

.discord-fallback a,
.primary-link {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  padding: 0.72rem 0.9rem;
  color: #061018;
  font-weight: 900;
  border-radius: var(--radius);
  background: var(--green);
}

.music-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.62rem;
}

.music-link {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-width: 0;
  padding: 0.76rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.06);
  transition: transform 160ms ease, background 160ms ease;
}

.music-link:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.11);
}

.music-link img {
  width: 24px;
  height: 24px;
  flex: 0 0 auto;
  filter: brightness(0) invert(1);
}

.music-link span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.preferences-panel {
  position: fixed;
  right: clamp(0.75rem, 4vw, 1.5rem);
  top: clamp(0.75rem, 4vw, 1.5rem);
  z-index: 80;
  display: grid;
  width: min(100% - 1.5rem, 320px);
  gap: 0.8rem;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--panel) 92%, transparent);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
  animation: pop-in 180ms ease both;
}

.preferences-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.preferences-head button {
  width: 34px;
  height: 34px;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  cursor: pointer;
}

.preferences-panel label {
  display: grid;
  gap: 0.35rem;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 800;
}

.preferences-panel select {
  width: 100%;
  padding: 0.72rem 0.8rem;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel-soft);
}

.compact-check {
  margin: 0;
}

.admin-access {
  width: 100%;
}

.news-modal[hidden],
.live-modal[hidden] {
  display: none;
}

.news-modal,
.live-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 1rem;
}

.news-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(10px);
}

.news-dialog {
  position: relative;
  width: min(100%, 680px);
  overflow: hidden;
  padding: clamp(1.1rem, 4vw, 2rem);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius);
  background: #111620;
  box-shadow: 0 24px 90px rgba(0, 0, 0, 0.65);
}

.news-close {
  position: absolute;
  right: 0.8rem;
  top: 0.8rem;
  width: 38px;
  height: 38px;
  color: white;
  font-size: 1.5rem;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.32);
  cursor: pointer;
}

.news-image {
  display: none;
  width: 100%;
  max-height: 270px;
  margin-bottom: 1rem;
  object-fit: cover;
  border-radius: var(--radius);
}

.news-image[src]:not([src=""]) {
  display: block;
}

.news-kicker {
  margin: 0 0 0.4rem;
  color: var(--green);
  font-weight: 900;
  text-transform: uppercase;
}

.news-dialog h2 {
  font-family: "The Bold Font", Impact, sans-serif;
  font-size: clamp(2rem, 9vw, 4rem);
  text-transform: uppercase;
}

.news-dialog p {
  color: #d7dbea;
  line-height: 1.65;
}

.live-dialog {
  position: relative;
  width: min(100%, 1180px);
  max-height: calc(100svh - 2rem);
  overflow: auto;
  padding: clamp(1rem, 3vw, 1.5rem);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius);
  background: #111620;
  box-shadow: 0 24px 90px rgba(0, 0, 0, 0.65);
}

.live-dialog-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.live-dialog-head .news-kicker {
  grid-column: 1 / -1;
  margin: 0;
}

.live-dialog-head h2 {
  font-family: "The Bold Font", Impact, sans-serif;
  font-size: clamp(2rem, 6vw, 4.4rem);
  text-transform: uppercase;
}

.live-dialog-head a {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  padding: 0.72rem 0.9rem;
  color: white;
  font-weight: 900;
  border-radius: var(--radius);
  background: #9146ff;
}

.live-embed-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 340px);
  gap: 0.75rem;
}

.live-embed-layout .responsive-frame {
  min-height: 420px;
}

.live-chat {
  position: relative;
  min-height: 420px;
  overflow: hidden;
  border-radius: var(--radius);
  background: #0e1016;
}

.live-chat iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.loading {
  color: var(--muted);
  text-align: center;
}

.admin-page {
  background:
    linear-gradient(180deg, rgba(42, 168, 255, 0.12), transparent 300px),
    #090b0f;
}

.admin-shell {
  width: min(100% - 1rem, 1180px);
  margin: 0 auto;
  padding: 1rem 0 4rem;
}

.admin-header {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.back-link,
.settings-pill,
.google-button,
.small-button,
.danger-button {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--text);
  background: rgba(255, 255, 255, 0.07);
  cursor: pointer;
}

.back-link,
.settings-pill {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  padding: 0.62rem 0.9rem;
  font-weight: 800;
}

.admin-kicker {
  margin: 0;
  color: var(--blue);
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
}

.admin-title {
  font-size: clamp(2.1rem, 6vw, 4.2rem);
}

.admin-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(21, 25, 34, 0.92);
  box-shadow: var(--shadow);
}

.admin-card.centered {
  max-width: 560px;
  margin: 3rem auto 0;
  padding: clamp(1rem, 4vw, 2rem);
  text-align: center;
}

.login-badge {
  width: 58px;
  margin: 0 auto 1rem;
}

.google-button {
  min-height: 48px;
  margin-top: 1rem;
  padding: 0.8rem 1rem;
  color: #061018;
  font-weight: 900;
  background: var(--text);
}

.admin-note,
[data-save-status] {
  color: var(--muted);
}

[data-save-status].is-error {
  color: #ff8f8f;
}

.admin-dashboard {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 1rem;
}

.admin-tabs {
  position: sticky;
  top: 1rem;
  display: grid;
  align-self: start;
  gap: 0.5rem;
  padding: 0.6rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(21, 25, 34, 0.92);
}

.admin-tabs button {
  min-height: 42px;
  color: var(--muted);
  text-align: left;
  border: 0;
  border-radius: 6px;
  background: transparent;
  cursor: pointer;
}

.admin-tabs button.is-active {
  color: var(--text);
  background: rgba(255, 255, 255, 0.1);
}

.admin-form {
  min-width: 0;
}

.tab-panel {
  display: none;
  padding: clamp(1rem, 3vw, 1.4rem);
}

.tab-panel.is-active {
  display: block;
}

.admin-section-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.admin-section-head.compact {
  align-items: center;
  margin: 1.4rem 0 0.75rem;
}

.admin-section-head h2,
.admin-section-head h3,
.admin-section-head p {
  margin: 0;
}

.admin-section-head p {
  color: var(--muted);
}

.field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
}

.field-grid .full {
  grid-column: 1 / -1;
}

.admin-form label {
  display: grid;
  gap: 0.38rem;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 800;
}

.admin-form input,
.admin-form textarea,
.json-editor {
  width: 100%;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(0, 0, 0, 0.22);
}

.admin-form input,
.admin-form textarea {
  padding: 0.72rem 0.8rem;
}

.upload-field input[type="file"] {
  padding: 0.55rem;
  border-style: dashed;
  cursor: pointer;
}

.admin-form textarea {
  resize: vertical;
}

.check-row {
  display: flex !important;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 0.6rem !important;
  margin-bottom: 0.8rem;
  color: var(--text) !important;
}

.check-row input {
  width: 20px;
  height: 20px;
}

.repeat-list {
  display: grid;
  gap: 0.75rem;
}

.repeat-row {
  display: grid;
  gap: 0.7rem;
  padding: 0.75rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.045);
}

.repeat-fields {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.62rem;
}

.small-button,
.danger-button {
  min-height: 36px;
  padding: 0.5rem 0.72rem;
  font-weight: 900;
}

.small-button {
  color: #061018;
  background: var(--green);
}

.danger-button {
  color: #ffd6d6;
  border-color: rgba(255, 143, 143, 0.32);
}

.json-editor {
  min-height: 520px;
  padding: 1rem;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.9rem;
  line-height: 1.55;
  resize: vertical;
}

.admin-actions {
  position: sticky;
  bottom: 0;
  z-index: 4;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.7rem;
  margin-top: 1rem;
  padding: 0.75rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(11, 13, 18, 0.92);
  backdrop-filter: blur(14px);
}

.admin-actions p {
  margin: 0;
}

@media (max-width: 620px) {
  .site-shell {
    width: min(100% - 0.75rem, 760px);
  }

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

  .music-grid {
    grid-template-columns: 1fr;
  }

  .link-card {
    grid-template-columns: 48px minmax(0, 1fr) auto;
  }

  .thumb {
    width: 48px;
  }

  .link-copy strong,
  .link-copy em {
    white-space: normal;
  }

  .admin-header,
  .admin-dashboard {
    grid-template-columns: 1fr;
  }

  .admin-tabs {
    position: static;
    grid-template-columns: repeat(3, 1fr);
  }

  .admin-tabs button {
    text-align: center;
  }

  .field-grid,
  .repeat-fields {
    grid-template-columns: 1fr;
  }

  .admin-section-head {
    display: block;
  }

  .live-dialog-head,
  .live-embed-layout {
    grid-template-columns: 1fr;
  }

  .live-embed-layout .responsive-frame,
  .live-chat {
    min-height: 300px;
  }
}

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pop-in {
  from {
    opacity: 0;
    transform: translateY(-6px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes soft-float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-5px);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.001ms !important;
    animation-duration: 0.001ms !important;
  }
}
