@import url('https://fonts.googleapis.com/css2?family=Lobster&display=swap');

:root {
  color-scheme: dark;
  --bg: #0b0b0b;
  --panel: #111111;
  --card: #161616;
  --border: rgba(255, 255, 255, 0.08);
  --text: #f4f4f4;
  --muted: #b0b0b0;
  --accent-red: #ff4a4a;
  --vod-top: #8d0048;
  --vod-bottom: #4b0026;
  --mv-top: #2f7bd6;
  --mv-bottom: #0e3f78;
  --shadow: 0 10px 24px rgba(0, 0, 0, 0.5);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 18px 24px 40px;
  min-height: 100vh;
  font-family: "SF Pro Display", -apple-system, BlinkMacSystemFont, "Segoe UI",
    Helvetica, Arial, sans-serif !important;
  color: var(--text) !important;
  background: #000 !important;
}

h1,
h2,
h3 {
  color: var(--text) !important;
  margin: 0 0 12px 0;
  font-weight: 600;
}

h1 {
  font-size: 34px;
}

h3 {
  font-size: 20px;
}

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

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 6px 0 20px;
}

.page {
  max-width: 1200px;
  margin: 0 auto;
}

.logo {
  font-family: "Lobster", cursive;
  font-size: 30px;
  letter-spacing: 0.02em;
}

.logo .logo-char {
  display: inline-block;
  color: #f4f4f4;
  transition: color 180ms ease, text-shadow 180ms ease;
}

.logo .logo-char.is-lit {
  color: #ffd84a;
  text-shadow: 0 0 7px rgba(255, 216, 74, 0.85), 0 0 16px rgba(255, 216, 74, 0.6);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.cta {
  padding: 10px 22px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 14px;
  color: #fff;
  box-shadow: var(--shadow);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.cta.vod {
  background: linear-gradient(180deg, var(--vod-top), var(--vod-bottom));
}

.cta.mv {
  background: linear-gradient(180deg, var(--mv-top), var(--mv-bottom));
}

.header-rotator {
  width: 100%;
  display: flex;
  justify-content: center;
  margin: 0 0 18px;
}

.header-rotator img {
  width: 100%;
  max-width: 728px;
  max-height: 90px;
  height: auto;
  display: block;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.header-rotator a {
  display: block;
}

.top-notification {
  display: none;
  margin: 0 0 14px;
  padding: 10px 14px;
  border: 1px solid #e5b800;
  background: #ffe84a;
  color: #111;
  border-radius: 10px;
  font-size: 14px;
  text-align: center;
  font-weight: 700;
}

.top-notification.is-visible {
  display: block;
}

.section-title {
  color: var(--accent-red) !important;
  margin-top: 6px;
}

.button-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  margin: 10px 0 18px;
}

.stream {
  width: 100%;
  max-width: none !important;
  min-width: 0 !important;
  min-height: 0 !important;
  padding: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}

.stream a {
  width: 100% !important;
  height: auto !important;
  display: grid !important;
  gap: 6px;
  color: inherit !important;
}

.stream img {
  width: 100% !important;
  height: auto !important;
  aspect-ratio: 16 / 9;
  object-fit: cover !important;
  border-radius: 2px !important;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.stream-info {
  font-size: 14px !important;
  font-weight: 600 !important;
}

.stream-tag,
.stream-time,
.stream-viewers,
.stream-ends,
.stream-countdown {
  font-size: 12px !important;
  color: var(--muted) !important;
}

.stream-viewers {
  color: #fff !important;
}

.stream-viewers strong {
  font-weight: 600;
}

.live-now {
  background: transparent !important;
  border: none !important;
  border-radius: 0 !important;
  padding: 0 !important;
}

.live-dot {
  display: none !important;
}

.footer {
  margin-top: 28px;
  text-align: center;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.stream-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 18px;
  align-items: stretch;
}

.player-panel {
  background: #0e0e0e;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow);
  width: 100%;
  max-width: 100%;
}

.player-media {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
  background: #000;
}

.player-panel iframe.player-media {
  border: none;
}

.player-panel video.player-media {
  background: #000;
  object-fit: contain;
}

.player-meta {
  padding: 12px 14px 14px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px 12px;
  align-items: center;
}

.player-title {
  font-size: 16px;
  font-weight: 600;
}

.player-subtitle {
  font-size: 12px;
  color: var(--muted);
}

.sources-button {
  padding: 8px 14px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: #0b0b0b;
  color: #fff;
  font-size: 12px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.chat-panel {
  background: #0e0e0e;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  height: min(70vh, 760px);
  min-height: 0;
  overflow: hidden;
}

.chat-messages {
  flex: 1;
  font-size: 12px;
  line-height: 1.4;
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 8px;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  background: #0a0a0a;
}

.chat-messages > div {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.chat-input {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: center;
}

.chat-field {
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: #0b0b0b;
  color: #fff;
  font-size: 12px;
}

.chat-send {
  padding: 8px 12px;
  border-radius: 8px;
  background: linear-gradient(180deg, #1e6dd1, #0f3e78);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  font-size: 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

iframe,
video {
  width: 100% !important;
  height: min(64vh, 560px) !important;
  border-radius: 10px !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  box-shadow: var(--shadow);
  background: #0f0f0f;
}

@media (max-width: 900px) {
  body {
    padding: 16px 16px 36px;
  }

  .site-header {
    flex-direction: column;
    align-items: flex-start;
  }

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

  .stream-layout {
    grid-template-columns: 1fr;
  }

  .chat-panel {
    height: min(58vh, 520px);
  }

  .header-rotator img {
    max-width: 468px;
    max-height: 60px;
  }
}

@media (max-width: 600px) {
  .button-grid {
    grid-template-columns: 1fr;
  }
}
