/* Live experience styling inspired by ShowroomLive JP */

body.live-page {
  margin: 0;
  font-family: "Inter", "Helvetica Neue", Arial, sans-serif;
  background: radial-gradient(circle at top left, #1a2854, #06070d 55%);
  color: #f3f6ff;
  min-height: 100vh;
}

body.live-page a {
  color: inherit;
}

.live-shell {
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 20px 80px;
}

.live-top-nav {
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(87, 146, 255, 0.35);
}

.live-top-nav nav {
  display: flex;
  align-items: center;
  gap: 18px;
  overflow-x: auto;
  padding: 14px 20px;
}

.live-top-nav nav a {
  text-decoration: none;
  color: rgba(217, 227, 255, 0.78);
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  transition: color 0.15s ease, border-color 0.15s ease;
  border-bottom: 2px solid transparent;
  padding-bottom: 6px;
  white-space: nowrap;
}

.live-top-nav nav a:hover,
.live-top-nav nav a.active {
  color: #ffffff;
  border-color: #5f8dff;
}

.live-top-nav nav a[href="/live/index.php"] {
  color: #ffffff;
  border-color: #5f8dff;
}

.live-hero {
  margin: 26px 0;
  background:
    linear-gradient(135deg, rgba(111, 163, 255, 0.08), rgba(18, 25, 51, 0.88)),
    var(--live-hero-image, url("/images/live-hero-fallback.jpg")) center/cover no-repeat;
  border-radius: 28px;
  position: relative;
  overflow: hidden;
  min-height: 320px;
  box-shadow: 0 35px 80px rgba(7, 15, 40, 0.45);
}

.live-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, rgba(6, 7, 13, 0.9) 0%, rgba(6, 7, 13, 0.35) 60%, transparent 100%);
}

.live-hero__content {
  position: relative;
  z-index: 1;
  padding: 42px;
  display: grid;
  gap: 26px;
  grid-template-columns: minmax(0, 1fr) minmax(0, 320px);
  align-items: center;
}

.live-hero__title {
  font-size: clamp(1.9rem, 4vw, 2.8rem);
  margin: 0 0 10px;
  color: #ffffff;
}

.live-hero__meta {
  display: flex;
  align-items: center;
  gap: 14px;
  color: rgba(218, 226, 255, 0.82);
  font-weight: 500;
  letter-spacing: 0.05em;
}

.live-hero__meta .pulse {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  border-radius: 999px;
  background: linear-gradient(135deg, #ff6d6d, #ff3f8e);
  color: #fff;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.025em;
  position: relative;
  overflow: hidden;
}

.live-hero__meta .pulse::after {
  content: "";
  position: absolute;
  inset: -40%;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.35), transparent 65%);
  animation: pulse 2.6s infinite;
}

@keyframes pulse {
  0% {
    transform: scale(0.8);
    opacity: 0.4;
  }
  50% {
    transform: scale(1.1);
    opacity: 0.8;
  }
  100% {
    transform: scale(0.8);
    opacity: 0.4;
  }
}

.live-hero__cta {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.live-hero__cta .cta-button {
  width: 100%;
}

.live-hero__cta .cta-secondary {
  color: rgba(223, 230, 255, 0.8);
  font-size: 0.92rem;
  text-align: center;
  text-decoration: none;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  transition: color 0.2s ease;
}

.live-hero__cta .cta-secondary:hover {
  color: #ffffff;
}

.live-marquee {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
  margin: 34px 0;
}

.live-marquee__item {
  background: rgba(11, 20, 40, 0.6);
  border: 1px solid rgba(98, 136, 255, 0.32);
  border-radius: 18px;
  padding: 18px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: inset 0 0 25px rgba(77, 118, 255, 0.08);
}

.live-marquee__item strong {
  font-size: 1.15rem;
  display: block;
}

.live-section__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 42px 0 22px;
}

.live-section__header h2 {
  margin: 0;
  font-size: clamp(1.4rem, 2.5vw, 1.8rem);
  letter-spacing: 0.04em;
}

.live-section__header a {
  color: rgba(215, 226, 255, 0.75);
  text-decoration: none;
  font-size: 0.95rem;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: color 0.2s ease;
}

.live-section__header a:hover {
  color: #ffffff;
}

.live-grid {
  display: grid;
  gap: 22px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.live-card {
  background: rgba(8, 14, 28, 0.78);
  border-radius: 18px;
  border: 1px solid rgba(90, 130, 255, 0.18);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  position: relative;
  box-shadow: 0 18px 35px rgba(4, 10, 29, 0.35);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.live-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 25px 45px rgba(11, 25, 60, 0.45);
  border-color: rgba(133, 167, 255, 0.6);
}

.live-card__thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #050912;
}

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

.live-card__badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: linear-gradient(135deg, #ff5d8f, #ff9349);
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.05em;
}

.live-card__info {
  padding: 18px;
  display: grid;
  gap: 12px;
}

.live-card__streamer {
  display: flex;
  align-items: center;
  gap: 12px;
}

.live-card__streamer img {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(110, 158, 255, 0.65);
  box-shadow: 0 0 0 4px rgba(110, 158, 255, 0.18);
}

.live-card__streamer strong {
  display: block;
  font-size: 1.05rem;
}

.live-card__streamer span {
  color: rgba(203, 216, 255, 0.7);
  font-size: 0.85rem;
}

.live-card__meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  color: rgba(194, 207, 255, 0.65);
}

.live-card__meta .genre {
  padding: 4px 12px;
  border-radius: 999px;
  border: 1px solid rgba(122, 157, 255, 0.35);
  background: rgba(18, 28, 61, 0.7);
}

.live-card__meta .viewers {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.live-rising {
  display: grid;
  gap: 18px;
}

.live-rank {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 260px);
  gap: 22px;
}

.live-rank__board,
.live-rank__card {
  background: rgba(9, 16, 33, 0.78);
  border: 1px solid rgba(90, 130, 255, 0.25);
  border-radius: 20px;
  padding: 22px;
  box-shadow: inset 0 0 40px rgba(70, 110, 255, 0.1);
}

.live-rank__board ol {
  margin: 18px 0 0;
  padding-left: 24px;
  display: grid;
  gap: 10px;
  list-style: none;
  counter-reset: rank;
}

.live-rank__board li {
  counter-increment: rank;
  background: rgba(14, 24, 52, 0.6);
  border-radius: 16px;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid rgba(109, 153, 255, 0.25);
  position: relative;
}

.live-rank__board li::before {
  content: "#" counter(rank);
  font-weight: 700;
  font-size: 0.95rem;
  color: rgba(137, 173, 255, 0.9);
}

.live-rank__board li img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(137, 173, 255, 0.65);
}

.live-empty {
  margin: 60px auto;
  max-width: 560px;
  text-align: center;
  background: rgba(10, 18, 36, 0.78);
  border-radius: 26px;
  padding: 40px 38px;
  border: 1px dashed rgba(116, 144, 255, 0.45);
  box-shadow: inset 0 0 30px rgba(110, 158, 255, 0.12);
}

.live-empty h2 {
  margin: 0 0 16px;
  font-size: 1.6rem;
}

.live-empty p {
  margin: 0 0 22px;
  color: rgba(202, 214, 255, 0.75);
}

.live-empty a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 22px;
  border-radius: 999px;
  background: linear-gradient(135deg, #67c9ff, #5d75ff);
  color: #050912;
  font-weight: 600;
  text-decoration: none;
}

/* Feature bar tweaks */
.live-filters {
  margin-top: -12px;
  position: sticky;
  top: 64px;
  z-index: 5;
}

.live-filters .live-bar {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding: 12px 20px;
  background: rgba(4, 12, 26, 0.82);
  border: 1px solid rgba(71, 112, 214, 0.32);
  backdrop-filter: blur(18px);
  border-radius: 999px;
  margin: 0;
  align-items: center;
}

.live-filters .live-bar .chip {
  text-decoration: none;
  color: rgba(207, 219, 255, 0.78);
  border: 1px solid transparent;
  padding: 8px 16px;
  border-radius: 999px;
  white-space: nowrap;
  transition: all 0.2s ease;
  background: rgba(32, 54, 111, 0.45);
  font-size: 0.9rem;
}

.live-filters .live-bar .chip:hover {
  color: #fff;
  border-color: rgba(103, 153, 255, 0.8);
}

.live-filters .live-bar .chip.active {
  background: linear-gradient(135deg, #5f8dff, #a56bff);
  color: #050912;
  font-weight: 600;
  border-color: transparent;
}

.live-filters .live-bar form {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-left: auto;
}

.live-filters .live-bar input[type="text"] {
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid rgba(83, 110, 177, 0.55);
  background: rgba(9, 15, 30, 0.9);
  color: #f3f6ff;
}

.live-filters .live-bar button[type="submit"] {
  background: linear-gradient(135deg, #66d1ff, #5f8dff);
  color: #050912;
  border: none;
  padding: 8px 18px;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 600;
  letter-spacing: 0.05em;
}

@media (max-width: 992px) {
  .live-hero__content {
    grid-template-columns: 1fr;
    padding: 32px;
  }

  .live-rank {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .live-shell {
    padding: 0 14px 60px;
  }

  .live-hero {
    border-radius: 20px;
    min-height: 280px;
  }

  .live-hero__content {
    padding: 26px 22px;
  }

  .live-marquee {
    grid-template-columns: 1fr;
  }

  .live-section__header {
    flex-direction: column;
    gap: 10px;
    align-items: flex-start;
  }
}


/* Live room stage */
.live-stage__layout {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  gap: 28px;
  margin-top: 32px;
}

.live-stage__player-card {
  background: rgba(8, 14, 28, 0.82);
  border: 1px solid rgba(95, 129, 247, 0.28);
  border-radius: 24px;
  padding: 26px;
  box-shadow: 0 30px 60px rgba(5, 8, 20, 0.45);
}

.live-stage__header {
  display: flex;
  justify-content: space-between;
  gap: 22px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.live-stage__header h1 {
  margin: 0;
  font-size: clamp(1.4rem, 3vw, 2rem);
}

.live-stage__header p {
  margin: 6px 0 0;
  color: rgba(210, 222, 255, 0.75);
}

.live-stage__header a {
  color: #8db1ff;
  text-decoration: none;
}

.live-stage__actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.live-badge {
  background: linear-gradient(135deg, #ff6d6d, #ff3f8e);
  padding: 6px 14px;
  border-radius: 999px;
  font-weight: 600;
  letter-spacing: 0.05em;
}

.follow-pill {
  border-radius: 999px;
  border: 1px solid rgba(104, 147, 255, 0.6);
  background: rgba(17, 26, 48, 0.8);
  color: #d7e2ff;
  padding: 8px 18px;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.follow-pill[data-following="1"] {
  background: rgba(104, 147, 255, 0.2);
  border-color: rgba(104, 147, 255, 0.45);
}

.follow-pill:hover {
  border-color: rgba(146, 180, 255, 0.85);
}

.live-stage__video {
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  background: #050912;
}

.live-stage__video video {
  width: 100%;
  max-height: 62vh;
  background: #000;
}

.live-stage__status {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  margin-top: 14px;
  border-radius: 12px;
  background: rgba(14, 22, 42, 0.85);
  border: 1px solid rgba(95, 129, 247, 0.3);
}

.live-stage__status .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #67ff8e;
  box-shadow: 0 0 10px rgba(103, 255, 142, 0.6);
}

.live-stage__status.error {
  border-color: rgba(255, 99, 132, 0.65);
  background: rgba(54, 14, 26, 0.8);
}

.live-stage__status.error .dot {
  background: #ff5f7a;
  box-shadow: 0 0 10px rgba(255, 95, 122, 0.6);
}

#refreshStream {
  margin-left: auto;
  background: rgba(95, 117, 214, 0.25);
  border: 1px solid rgba(95, 117, 214, 0.45);
  color: #d7e2ff;
  padding: 6px 12px;
  border-radius: 999px;
  cursor: pointer;
}

.live-stage__ticker {
  margin-top: 18px;
  padding: 12px 18px;
  border-radius: 12px;
  background: rgba(13, 20, 40, 0.75);
  border: 1px dashed rgba(122, 157, 255, 0.35);
  color: rgba(202, 214, 255, 0.75);
}

.live-stage__sidebar {
  display: grid;
  gap: 18px;
}

.live-stage__host-card {
  display: flex;
  align-items: center;
  gap: 14px;
  background: rgba(10, 18, 36, 0.82);
  border: 1px solid rgba(83, 118, 226, 0.3);
  border-radius: 16px;
  padding: 16px;
}

.live-stage__host-card img {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(117, 156, 255, 0.6);
}

.live-stage__host-card strong {
  display: block;
  font-size: 1.05rem;
}

.live-stage__gifts,
.live-stage__chat,
.live-stage__fans {
  background: rgba(9, 15, 32, 0.82);
  border: 1px solid rgba(70, 110, 214, 0.28);
  border-radius: 18px;
  padding: 18px;
}

.live-stage__gifts h3,
.live-stage__chat h3,
.live-stage__fans h3 {
  margin: 0 0 12px;
  font-size: 1rem;
}

.gift-rail {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 10px;
}

.gift-pill {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(95, 129, 247, 0.35);
  background: rgba(18, 25, 54, 0.8);
  color: #d7e2ff;
  cursor: pointer;
}

.gift-pill:hover {
  border-color: rgba(130, 162, 255, 0.75);
}

.live-stage__chat {
  display: grid;
  gap: 12px;
}

.chat-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: rgba(203, 216, 255, 0.8);
}

.chat-log {
  height: 240px;
  overflow: auto;
  background: rgba(5, 8, 18, 0.85);
  border: 1px solid rgba(70, 110, 214, 0.32);
  border-radius: 12px;
  padding: 12px;
  display: grid;
  gap: 8px;
}

.chat-log .message {
  background: rgba(18, 28, 54, 0.85);
  border-radius: 10px;
  padding: 8px 10px;
  border: 1px solid rgba(104, 147, 255, 0.35);
}

.chat-input {
  display: flex;
  gap: 10px;
}

.chat-input input {
  flex: 1;
  padding: 10px 14px;
  background: rgba(8, 14, 28, 0.9);
  border: 1px solid rgba(80, 112, 206, 0.45);
  color: #f3f6ff;
  border-radius: 12px;
}

.chat-input button {
  background: linear-gradient(135deg, #66d1ff, #5f8dff);
  border: none;
  border-radius: 12px;
  padding: 10px 18px;
  color: #050912;
  font-weight: 600;
  cursor: pointer;
}

.live-stage__fans ol {
  margin: 0;
  padding-left: 0;
  display: grid;
  gap: 10px;
  list-style: none;
}

.live-stage__fans li {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(15, 20, 42, 0.85);
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(98, 132, 255, 0.32);
}

.live-stage__fans li img {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
}

.live-stage__fans li.empty {
  justify-content: center;
  color: rgba(203, 216, 255, 0.6);
}

/* Producer (Go Live) */
.producer-hero {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding: 24px;
  background: rgba(9, 15, 32, 0.82);
  border: 1px solid rgba(79, 118, 214, 0.32);
  border-radius: 20px;
  margin-top: 26px;
}

.producer-hero h1 {
  margin: 0 0 8px;
  font-size: clamp(1.6rem, 3vw, 2.2rem);
}

.producer-hero p {
  margin: 0;
  color: rgba(203, 216, 255, 0.75);
}

.producer-hero__share {
  display: grid;
  gap: 6px;
  font-size: 0.85rem;
  color: rgba(203, 216, 255, 0.65);
}

.producer-hero__share code {
  background: rgba(14, 21, 44, 0.9);
  border: 1px solid rgba(79, 118, 214, 0.45);
  border-radius: 12px;
  padding: 8px 12px;
  font-size: 0.85rem;
}

.producer-layout {
  margin-top: 30px;
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  gap: 26px;
}

.producer-card {
  background: rgba(8, 14, 28, 0.82);
  border: 1px solid rgba(95, 129, 247, 0.28);
  border-radius: 24px;
  padding: 24px;
  display: grid;
  gap: 20px;
}

.producer-preview {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid rgba(95, 129, 247, 0.22);
  background: #050912;
}

.producer-preview video {
  width: 100%;
  max-height: 60vh;
  background: #000;
}

.producer-preview__status {
  position: absolute;
  bottom: 16px;
  left: 16px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(11, 19, 40, 0.82);
  border: 1px solid rgba(95, 129, 247, 0.3);
  display: flex;
  align-items: center;
  gap: 8px;
}

.producer-preview__status[data-state="live"] {
  background: rgba(255, 99, 132, 0.18);
  border-color: rgba(255, 99, 132, 0.5);
}
.producer-preview__status .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #67ff8e;
  box-shadow: 0 0 10px rgba(103, 255, 142, 0.55);
}

.producer-preview__status[data-state="live"] .dot {
  background: #ff5f7a;
  box-shadow: 0 0 10px rgba(255, 95, 122, 0.55);
}

.producer-preview__status[data-state="error"] {
  background: rgba(54, 14, 26, 0.82);
  border-color: rgba(255, 99, 132, 0.6);
}

.producer-preview__status[data-state="error"] .dot {
  background: #ff5f7a;
  box-shadow: 0 0 10px rgba(255, 95, 122, 0.65);
}


.producer-controls {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.producer-controls .cta-button {
  flex: 1;
  min-width: 140px;
}

.producer-controls .cta-button.secondary {
  justify-content: center;
}

.producer-controls .cta-button.danger:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.producer-help {
  margin: 0;
  padding-left: 18px;
  color: rgba(203, 216, 255, 0.7);
  font-size: 0.9rem;
  line-height: 1.6;
}

.producer-sidebar {
  display: grid;
  gap: 18px;
}

.producer-form,
.producer-rtmp,
.producer-profile {
  background: rgba(9, 15, 32, 0.82);
  border: 1px solid rgba(74, 112, 206, 0.28);
  border-radius: 20px;
  padding: 20px;
  display: grid;
  gap: 14px;
}

.producer-form label {
  display: grid;
  gap: 6px;
  font-size: 0.9rem;
  color: rgba(207, 219, 255, 0.78);
}

.producer-form input,
.producer-form select {
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid rgba(83, 118, 226, 0.4);
  background: rgba(13, 20, 40, 0.9);
  color: #f3f6ff;
}

.producer-rtmp code {
  display: block;
  background: rgba(13, 20, 40, 0.9);
  border: 1px solid rgba(79, 118, 214, 0.35);
  border-radius: 12px;
  padding: 8px 12px;
  margin-top: 4px;
  font-size: 0.88rem;
}

.producer-profile {
  display: flex;
  align-items: center;
  gap: 12px;
}

.producer-profile img {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(117, 156, 255, 0.6);
}

@media (max-width: 992px) {
  .live-stage__layout,
  .producer-layout {
    grid-template-columns: 1fr;
  }

  .live-stage__header {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 640px) {
  .producer-hero {
    flex-direction: column;
    align-items: flex-start;
  }

  .producer-controls {
    flex-direction: column;
  }

  .gift-rail {
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  }

  .chat-log {
    height: 200px;
  }
}
