
* {
  box-sizing: border-box;
}

:root {
  --bg: #fff5cf;
  --cream: #fffdf6;
  --cream-2: #fff6df;
  --panel: rgba(255, 255, 255, 0.82);
  --panel-strong: rgba(255, 255, 255, 0.94);
  --line: rgba(255, 202, 90, 0.45);
  --line-soft: rgba(255, 212, 132, 0.36);
  --text: #252333;
  --muted: #746f83;
  --yellow: #ffd447;
  --yellow-2: #ffb82e;
  --pink: #ff4f8b;
  --pink-2: #ff6b6b;
  --teal: #18c7b5;
  --teal-soft: #e5fff9;
  --purple: #8b5cf6;
  --green: #36c77b;
  --red: #ff5f61;
  --blue-soft: #eef6ff;
  --shadow: 0 24px 70px rgba(238, 155, 38, 0.16);
  --shadow-card: 0 12px 30px rgba(42, 31, 20, 0.08);
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 9% 15%, rgba(255, 79, 139, 0.18), transparent 22%),
    radial-gradient(circle at 88% 11%, rgba(24, 199, 181, 0.18), transparent 22%),
    radial-gradient(circle at 85% 86%, rgba(255, 212, 71, 0.34), transparent 28%),
    linear-gradient(135deg, #fff8d9 0%, #fffaf0 42%, #ffe8a9 100%);
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.24;
  background-image:
    radial-gradient(circle, rgba(255, 79, 139, 0.36) 1.3px, transparent 1.5px),
    radial-gradient(circle, rgba(24, 199, 181, 0.25) 1px, transparent 1.2px);
  background-size: 46px 46px, 64px 64px;
  background-position: 0 0, 24px 28px;
}

body::after {
  display: none;
}

h1, h2, h3, p {
  margin: 0;
}

.hidden {
  display: none !important;
}

.bg-shape {
  position: fixed;
  z-index: 0;
  border-radius: 50%;
  filter: blur(55px);
  pointer-events: none;
  opacity: 0.75;
}

.bg-shape-1 {
  width: 330px;
  height: 330px;
  left: -110px;
  top: 90px;
  background: rgba(255, 92, 128, 0.22);
}

.bg-shape-2 {
  width: 360px;
  height: 360px;
  right: -120px;
  bottom: 80px;
  background: rgba(33, 211, 188, 0.20);
}

.bg-grid {
  position: fixed;
  right: 58px;
  top: 82px;
  width: 180px;
  height: 90px;
  z-index: 0;
  pointer-events: none;
  opacity: .28;
  background-image: radial-gradient(circle, rgba(255, 79, 139, .8) 2px, transparent 2.2px);
  background-size: 16px 16px;
}

.app {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 26px 18px;
}

.card {
  width: 100%;
  max-width: 880px;
  position: relative;
  overflow: hidden;
  padding: 26px;
  border-radius: 30px;
  border: 3px solid rgba(255, 211, 80, 0.72);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(255, 255, 255, 0.28)),
    rgba(255, 252, 243, 0.90);
  box-shadow: var(--shadow);
}

.card::before {
  content: "";
  position: absolute;
  left: -80px;
  top: -80px;
  width: 250px;
  height: 250px;
  border-radius: 50%;
  background: rgba(255, 212, 71, 0.34);
  pointer-events: none;
}

.card::after {
  content: "";
  position: absolute;
  right: -90px;
  bottom: -90px;
  width: 270px;
  height: 270px;
  border-radius: 50%;
  background: rgba(24, 199, 181, 0.16);
  pointer-events: none;
}

.card:has(#roomBox:not(.hidden)) {
  max-width: 1460px;
}

.room-top-icons {
  display: none;
}

.card:has(#roomBox:not(.hidden)) .brand {
  display: none;
}

.card:has(#roomBox:not(.hidden)) .room-top-icons {
  position: absolute;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 16px;
  pointer-events: none;
}

.card:has(#roomBox:not(.hidden)) .room-top-icons span {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.26);
  border: 1px solid rgba(255, 210, 96, 0.30);
  color: rgba(255, 79, 139, 0.42);
  font-size: 22px;
  box-shadow: 0 10px 20px rgba(255, 184, 46, 0.08);
  opacity: 0.8;
  filter: saturate(0.9);
}

/* Header */
.brand {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 22px;
}

.logo {
  width: 64px;
  height: 64px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 22px;
  font-size: 30px;
  background:
    radial-gradient(circle at 72% 22%, #fff 0 7px, transparent 8px),
    linear-gradient(135deg, #fff1a6, #ffd447 48%, #ff8b65);
  border: 3px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 14px 28px rgba(255, 122, 92, 0.18);
}

.brand h1 {
  font-size: 34px;
  line-height: 1;
  font-weight: 950;
  letter-spacing: -0.05em;
}

.brand h1::after {
  content: " ✨";
  font-size: 18px;
  vertical-align: top;
}

.brand p {
  margin-top: 6px;
  color: var(--muted);
  font-size: 15px;
}

.brand-badge {
  margin-left: auto;
  border-radius: 999px;
  padding: 12px 16px;
  color: #a14818;
  background: rgba(255, 244, 200, 0.92);
  border: 1px solid rgba(255, 197, 76, 0.55);
  font-size: 13px;
  font-weight: 900;
  box-shadow: 0 8px 18px rgba(255, 184, 46, 0.12);
}

/* Login */
.panel {
  position: relative;
  z-index: 1;
  max-width: 570px;
  margin: 0 auto;
  display: grid;
  gap: 14px;
}

.hero-box {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  padding: 24px;
  min-height: 150px;
  background:
    radial-gradient(circle at 88% 18%, rgba(255,255,255,0.9) 0 18px, transparent 19px),
    radial-gradient(circle at 90% 80%, rgba(255, 79, 139, 0.18), transparent 26%),
    linear-gradient(135deg, #fff4ae 0%, #fff8dc 45%, #e9fff8 100%);
  border: 1px solid rgba(255, 204, 82, 0.6);
  box-shadow: var(--shadow-card);
}

.hero-box::after {
  content: "🎧";
  position: absolute;
  right: 22px;
  bottom: 18px;
  width: 78px;
  height: 78px;
  display: grid;
  place-items: center;
  border-radius: 24px;
  font-size: 42px;
  background: rgba(255,255,255,0.58);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.8);
}

.mini-pill {
  display: inline-flex;
  border-radius: 999px;
  padding: 7px 12px;
  color: #c44b3f;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(255, 199, 98, 0.72);
  font-size: 12px;
  font-weight: 950;
}

.hero-box h2 {
  margin-top: 12px;
  max-width: 390px;
  font-size: 30px;
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.hero-box p {
  max-width: 390px;
  margin-top: 9px;
  color: var(--muted);
  line-height: 1.5;
}

label {
  display: grid;
  gap: 8px;
  color: var(--text);
  font-size: 14px;
  font-weight: 900;
}

input, select {
  width: 100%;
  min-height: 50px;
  padding: 14px 15px;
  border-radius: 16px;
  border: 1px solid rgba(225, 210, 187, 0.9);
  background: rgba(255, 255, 255, 0.88);
  color: var(--text);
  outline: none;
  box-shadow: inset 0 1px 2px rgba(39, 31, 22, 0.04);
}

input:focus,
select:focus {
  border-color: rgba(255, 79, 139, 0.78);
  box-shadow: 0 0 0 4px rgba(255, 79, 139, 0.10);
}

input::placeholder {
  color: #aaa1aa;
}

button {
  border: 0;
  border-radius: 16px;
  padding: 14px 16px;
  font-weight: 950;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, filter .15s ease, opacity .15s ease;
}

button:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 22px rgba(62, 43, 32, 0.12);
}

button:disabled {
  opacity: .55;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.primary-btn {
  min-height: 54px;
  background: linear-gradient(135deg, var(--pink), #ff6a68);
  color: #fff;
  box-shadow: 0 12px 24px rgba(255, 79, 139, 0.22);
}

.secondary-btn {
  color: #138d80;
  background: rgba(232, 255, 249, 0.9);
  border: 1px solid rgba(24, 199, 181, 0.24);
}

.danger-btn {
  color: #fff;
  background: linear-gradient(135deg, #ff7b6f, #ff4f65);
  box-shadow: 0 12px 22px rgba(255, 95, 97, 0.18);
}

.chat-form button,
.invite-box button {
  background: linear-gradient(135deg, #ffca3a, #ff9f1c);
  color: #fff;
  box-shadow: 0 10px 20px rgba(255, 184, 46, 0.22);
}

.admin-details {
  border: 1px dashed rgba(255, 184, 46, .65);
  border-radius: 16px;
  padding: 14px;
  background: rgba(255, 249, 226, 0.65);
}

.admin-details summary {
  cursor: pointer;
  font-weight: 950;
}

.admin-details input {
  margin-top: 12px;
}

.captcha-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 54px;
  gap: 10px;
}

.captcha-question {
  min-height: 50px;
  display: flex;
  align-items: center;
  border-radius: 16px;
  padding: 13px 15px;
  color: #7b4d0e;
  background: linear-gradient(135deg, #fff4b8, #fff9e3);
  border: 1px solid rgba(255, 197, 76, 0.60);
  font-weight: 950;
}

.captcha-refresh {
  min-height: 50px;
  padding: 0;
  color: #fff;
  background: linear-gradient(135deg, var(--teal), #0cb7d6);
  font-size: 22px;
}

.error {
  color: #d83d52;
  min-height: 20px;
  font-size: 14px;
  font-weight: 800;
}

.hint {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.invite-notice {
  display: grid;
  gap: 4px;
  border-radius: 18px;
  padding: 15px;
  color: #0e7d72;
  background: rgba(229, 255, 249, 0.88);
  border: 1px solid rgba(24, 199, 181, 0.20);
  font-size: 13px;
  font-weight: 900;
}

.invite-notice b {
  font-size: 15px;
  color: #129485;
}

.invite-notice span {
  color: #52877f;
  font-weight: 800;
}

.invite-notice small {
  color: #ff4f8b;
  font-weight: 950;
}

/* Room layout */
.room {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 330px minmax(460px, 1fr) 340px;
  grid-template-areas: "left chat music";
  gap: 18px;
  align-items: start;
}

.left-col {
  grid-area: left;
  display: grid;
  gap: 14px;
}

.room-top,
.users-section,
.chat-section,
.music-section {
  border-radius: 26px;
  border: 1px solid rgba(255, 218, 132, 0.62);
  background: var(--panel);
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.room-top {
  position: relative;
  overflow: hidden;
  min-height: 218px;
  padding: 22px;
  background:
    radial-gradient(circle at 86% 68%, rgba(24, 199, 181, 0.16), transparent 22%),
    linear-gradient(135deg, #fff0a3 0%, #ffe6a7 52%, #fff8df 100%);
}

.room-top::before {
  content: "🎉";
  position: absolute;
  right: 22px;
  top: 78px;
  font-size: 52px;
  opacity: .82;
  transform: rotate(10deg);
}

.room-top::after {
  display: none;
}

.live-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 12px;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, #ff4f8b, #ff6b6b);
  font-size: 12px;
  font-weight: 950;
  text-transform: uppercase;
  box-shadow: 0 8px 16px rgba(255, 79, 139, 0.18);
}

.live-pill span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 4px rgba(255,255,255,0.20);
}

.room-top h2 {
  margin-top: 18px;
  max-width: 210px;
  font-size: 30px;
  line-height: 1.05;
  font-weight: 950;
  letter-spacing: -0.04em;
}

.room-desc {
  margin-top: 9px;
  max-width: 230px;
  color: #6e6547;
  line-height: 1.45;
}

.admin-badge {
  position: absolute;
  right: 18px;
  top: 18px;
  border-radius: 999px;
  padding: 8px 11px;
  color: #8b3df6;
  background: rgba(255,255,255,0.8);
  font-weight: 950;
  border: 1px solid rgba(139, 92, 246, 0.14);
}

.room-number {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 13px;
  padding: 8px 11px;
  border-radius: 999px;
  color: #ff4f8b;
  background: rgba(255,255,255,0.72);
  border: 1px solid rgba(255,255,255,0.86);
  font-size: 12px;
  font-weight: 950;
}

.room-number b {
  color: #1b9f91;
}

.actions {
  display: grid;
  gap: 10px;
}

#muteBtn {
  min-height: 58px;
  color: #fff;
  background: linear-gradient(135deg, #ff4f8b, #ff6b6b);
  box-shadow: 0 13px 24px rgba(255, 79, 139, 0.20);
}

#muteBtn::before { content: "🎙 "; }
#inviteBtn::before { content: "🔗 "; }
#leaveBtn::before { content: "🚪 "; }
#sendBtn::before { content: "➤ "; }

.invite-box {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 110px;
  gap: 10px;
  padding: 12px;
  border-radius: 20px;
  background: rgba(255,255,255,0.72);
  border: 1px solid rgba(255, 212, 132, 0.44);
  box-shadow: var(--shadow-card);
}

.users-section,
.chat-section,
.music-section {
  padding: 18px;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 12px;
  margin-bottom: 14px;
  border-bottom: 1px solid rgba(235, 221, 198, 0.7);
}

.section-head h3 {
  font-size: 18px;
  letter-spacing: -0.03em;
}

.section-head h3::before {
  margin-right: 7px;
}

.users-section .section-head h3::before { content: "👥"; }
.chat-section .section-head h3::before { content: "💬"; }
.music-section .section-head h3::before { content: "🎵"; }

.section-head span {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  border-radius: 999px;
  padding: 5px 9px;
  color: #6f6372;
  background: rgba(246, 239, 228, 0.78);
  font-size: 12px;
  font-weight: 900;
}

ul {
  list-style: none;
  display: grid;
  gap: 10px;
  padding: 0;
  margin: 0;
}

.user-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 12px;
  border-radius: 18px;
  border: 1px solid rgba(233, 223, 204, 0.86);
  background: rgba(255,255,255,0.74);
}

.user-item.speaking {
  border-color: rgba(24, 199, 181, 0.8);
  background: rgba(229, 255, 249, 0.76);
  box-shadow: 0 0 0 4px rgba(24, 199, 181, 0.09);
}

.user-main {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
}

.avatar {
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 950;
  background:
    radial-gradient(circle at 70% 22%, rgba(255,255,255,.65) 0 5px, transparent 6px),
    linear-gradient(135deg, #ff4f8b, #ffd447);
  border: 3px solid rgba(255,255,255,0.78);
  box-shadow: 0 8px 16px rgba(255, 79, 139, 0.14);
}

.user-name {
  font-weight: 950;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-badges {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 4px;
}

.badge {
  padding: 4px 8px;
  border-radius: 999px;
  color: #0f9b8c;
  background: rgba(229, 255, 249, 0.92);
  font-size: 11px;
  font-weight: 900;
}

.badge.admin {
  color: #fff;
  background: linear-gradient(135deg, #8b5cf6, #ff4f8b);
}

.badge.muted {
  color: #fff;
  background: linear-gradient(135deg, #ff6b6b, #ff4f8b);
}

.admin-controls {
  display: flex;
  gap: 7px;
}

.admin-controls button {
  padding: 8px 9px;
  border-radius: 12px;
  font-size: 12px;
}

.small-danger {
  color: #fff;
  background: linear-gradient(135deg, #ff6b6b, #ff4f8b);
}

.small-neutral {
  color: #0e9184;
  background: rgba(229, 255, 249, 0.92);
}

/* Chat */
.chat-section {
  grid-area: chat;
  min-height: 690px;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
}

.messages {
  min-height: 0;
  height: min(60vh, 560px);
  overflow-y: auto;
  display: grid;
  align-content: start;
  gap: 12px;
  padding: 4px 4px 4px 0;
}

.messages::-webkit-scrollbar {
  width: 8px;
}

.messages::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(255, 79, 139, 0.22);
}

.message {
  justify-self: end;
  max-width: 86%;
  padding: 11px 13px;
  border-radius: 18px 18px 8px 18px;
  background: #fff;
  border: 1px solid rgba(233, 223, 204, 0.78);
  box-shadow: 0 8px 18px rgba(40, 31, 20, 0.05);
}

.message.me {
  justify-self: start;
  border-radius: 18px 18px 18px 8px;
  background: linear-gradient(135deg, rgba(255, 244, 198, 0.95), rgba(255, 234, 243, 0.95));
  border-color: rgba(255, 190, 120, 0.7);
}

.message.system {
  justify-self: center;
  max-width: 78%;
  text-align: center;
  color: #0d8f82;
  background: rgba(229, 255, 249, 0.86);
  border-color: rgba(24, 199, 181, 0.20);
  font-size: 13px;
  border-radius: 999px;
}

.msg-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: #9890a0;
  font-size: 12px;
  margin-bottom: 6px;
}

.msg-name {
  color: #ff4f8b;
  font-weight: 950;
}

.msg-text {
  line-height: 1.5;
  word-break: break-word;
}

.chat-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 58px;
  gap: 10px;
  margin-top: 14px;
}

.chat-form input {
  min-height: 56px;
  border-radius: 999px;
  padding-left: 18px;
}

.chat-form button {
  width: 58px;
  height: 56px;
  padding: 0;
  border-radius: 50%;
  font-size: 0;
}

.chat-form button::before {
  font-size: 20px;
  content: "➤";
}

/* Music */
.music-section {
  grid-area: music;
  position: sticky;
  top: 18px;
  overflow: hidden;
  background:
    radial-gradient(circle at 100% 0%, rgba(24, 199, 181, 0.16), transparent 28%),
    rgba(255, 255, 255, 0.84);
}

.music-section::after {
  content: "🎶";
  position: absolute;
  right: -2px;
  top: 52px;
  font-size: 54px;
  opacity: .18;
  transform: rotate(-12deg);
}

.music-empty,
.music-player {
  position: relative;
  z-index: 1;
  border-radius: 22px;
  padding: 18px;
  background: rgba(255,255,255,0.72);
  border: 1px solid rgba(233, 223, 204, 0.82);
}

.music-empty {
  text-align: center;
}

.music-empty-icon {
  width: 112px;
  height: 112px;
  margin: 4px auto 16px;
  display: grid;
  place-items: center;
  border-radius: 34px;
  color: #fff;
  font-size: 46px;
  background:
    radial-gradient(circle at 76% 22%, #fff 0 6px, transparent 7px),
    linear-gradient(135deg, #ffd447, #ff4f8b);
  box-shadow: 0 16px 28px rgba(255, 79, 139, 0.17);
}

.music-empty b {
  display: block;
  font-size: 22px;
  letter-spacing: -0.04em;
}

.music-empty p {
  margin: 10px auto 0;
  color: var(--muted);
  line-height: 1.55;
  max-width: 260px;
}

.music-empty code,
.music-help-list code,
.music-note-box code {
  display: inline-flex;
  border-radius: 10px;
  padding: 4px 8px;
  color: #ff4f8b;
  background: #fff0f5;
  border: 1px solid rgba(255, 79, 139, 0.15);
  font-weight: 950;
}

.music-help-list {
  display: grid;
  gap: 9px;
  margin-top: 16px;
  text-align: left;
}

.music-help-list div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 16px;
  background: rgba(255, 250, 238, 0.85);
  border: 1px solid rgba(233, 223, 204, 0.78);
}

.music-help-list span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.music-note-box {
  margin-top: 15px;
  text-align: left;
  border-radius: 18px;
  padding: 14px;
  background: rgba(229, 255, 249, 0.76);
  border: 1px solid rgba(24, 199, 181, 0.16);
}

.music-note-box b {
  color: #0d8f82;
  font-family: inherit;
}

.music-note-box p {
  margin-top: 7px;
  font-size: 13px;
}

#ytPlayer {
  width: 100%;
  min-height: 205px;
  overflow: hidden;
  border-radius: 18px;
  background: #fff6df;
  pointer-events: none;
}

.music-meta {
  margin-top: 13px;
}

.music-meta b {
  display: block;
  color: var(--text);
  line-height: 1.35;
}

.music-meta span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.music-actions {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.music-actions button {
  width: 100%;
  color: #fff;
  background: linear-gradient(135deg, #ff6b6b, #ff4f8b);
}

.music-actions label {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) 44px;
  gap: 8px;
  align-items: center;
  color: var(--muted);
  font-size: 13px;
}

#musicVolumeRange {
  width: 100%;
  accent-color: var(--pink);
}

/* Invite only screen */
body.invite-mode {
  background:
    radial-gradient(circle at 50% 20%, rgba(255, 79, 139, 0.18), transparent 28%),
    radial-gradient(circle at 15% 85%, rgba(24, 199, 181, 0.22), transparent 28%),
    linear-gradient(135deg, #fff5cf 0%, #fffaf0 48%, #ffe9b7 100%);
}

body.invite-mode .bg-shape,
body.invite-mode .bg-grid,
body.invite-mode::before {
  filter: blur(6px);
}

body.invite-mode .app::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  background: rgba(255, 250, 239, 0.34);
}

body.invite-mode .card {
  max-width: 480px;
  padding: 24px;
  border-radius: 30px;
  background: rgba(255,255,255,0.82);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: 0 30px 90px rgba(255, 79, 139, 0.18);
}

body.invite-mode .card::before {
  width: 170px;
  height: 170px;
}

body.invite-mode .brand {
  flex-direction: column;
  text-align: center;
  margin-bottom: 18px;
}

body.invite-mode .brand-badge,
body.invite-mode .hero-box,
body.invite-mode .room-name-label,
body.invite-mode .captcha-label,
body.invite-mode .admin-details,
body.invite-mode .hint {
  display: none !important;
}

body.invite-mode .panel {
  max-width: 100%;
}

body.invite-mode .username-label {
  font-size: 13px;
}

body.invite-mode #usernameInput {
  height: 56px;
  text-align: center;
  font-size: 16px;
}

body.invite-mode #joinBtn {
  height: 56px;
  border-radius: 18px;
}

body.invite-mode #joinBtn::before {
  content: "🎧 ";
}






@media (max-width: 1100px) {
  .card,
  .card:has(#roomBox:not(.hidden)) {
    max-width: 940px;
    padding: 18px;
  }

  .room {
    grid-template-columns: 1fr;
    grid-template-areas:
      "left"
      "music"
      "chat";
    gap: 14px;
  }

  .left-col {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .music-section {
    position: relative;
    top: auto;
  }

  .chat-section {
    min-height: auto;
  }

  .messages {
    min-height: 280px;
    height: 360px;
  }
}

@media (max-width: 820px) {
  body::after {
    display: none;
  }

  .app {
    align-items: flex-start;
    padding: 12px 10px;
  }

  .card,
  .card:has(#roomBox:not(.hidden)) {
    padding: 14px;
    border-radius: 22px;
  }

  .brand {
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 16px;
    flex-wrap: wrap;
  }

  .brand-badge,
  .bg-grid {
    display: none;
  }

  .logo {
    width: 50px;
    height: 50px;
    border-radius: 16px;
    font-size: 24px;
  }

  .brand h1 {
    font-size: 26px;
  }

  .brand p {
    font-size: 13px;
    margin-top: 4px;
  }

  .hero-box {
    padding: 16px;
    min-height: auto;
  }

  .hero-box::after {
    width: 54px;
    height: 54px;
    font-size: 28px;
    right: 16px;
    bottom: 14px;
  }

  .hero-box h2 {
    max-width: 260px;
    font-size: 23px;
  }

  .left-col {
    grid-template-columns: 1fr;
  }

  .room-top,
  .users-section,
  .chat-section,
  .music-section {
    border-radius: 20px;
    padding: 14px;
  }

  .room-top {
    min-height: auto;
  }

  .room-top::before,
  .room-top::after {
    display: none;
  }

  .room-top h2 {
    max-width: none;
    font-size: 24px;
    line-height: 1.1;
    margin-top: 14px;
    word-break: break-word;
  }

  .room-desc {
    max-width: none;
    font-size: 13px;
  }

  .room-number {
    margin-top: 10px;
  }

  .actions,
  .invite-box,
  .chat-form,
  .captcha-row {
    grid-template-columns: 1fr;
  }

  .actions button,
  .invite-box button {
    width: 100%;
  }

  .chat-form {
    grid-template-columns: minmax(0, 1fr) 52px;
  }

  .chat-form input {
    min-width: 0;
    min-height: 50px;
  }

  .chat-form button {
    width: 52px;
    height: 50px;
  }

  .user-item {
    grid-template-columns: 1fr;
  }

  .admin-controls {
    width: 100%;
  }

  .admin-controls button {
    flex: 1;
  }

  .messages {
    height: 300px;
    min-height: 250px;
  }

  .message {
    max-width: 96%;
  }

  .music-empty-icon {
    width: 84px;
    height: 84px;
    border-radius: 26px;
    font-size: 34px;
  }

  .music-empty b {
    font-size: 20px;
  }

  .music-help-list div {
    align-items: flex-start;
    flex-direction: column;
  }

  #ytPlayer {
    min-height: 180px;
  }

  body.invite-mode .card {
    max-width: 100%;
  }
}

@media (max-width: 560px) {
  .card,
  .card:has(#roomBox:not(.hidden)) {
    padding: 12px;
    border-radius: 18px;
  }

  .brand {
    gap: 10px;
  }

  .brand h1 {
    font-size: 24px;
  }

  .logo {
    width: 46px;
    height: 46px;
    font-size: 21px;
  }

  .mini-pill,
  .live-pill,
  .section-head span,
  .room-number {
    font-size: 11px;
  }

  .room-top h2 {
    font-size: 22px;
  }

  .section-head h3 {
    font-size: 17px;
  }

  .messages {
    height: 260px;
    min-height: 220px;
  }
}


/* Mikrofon kapalı ikon/rozet düzeltmesi */
#muteBtn::before {
  content: "🎙 ";
}

#muteBtn.is-muted::before {
  content: "🔇 ";
}

#muteBtn.is-muted {
  background: linear-gradient(135deg, #7c3aed, #ff4f8b);
}

.avatar {
  position: relative;
}

.user-item.mic-muted {
  opacity: 0.92;
}

.user-item.mic-muted .avatar::after {
  content: "🔇";
  position: absolute;
  right: -8px;
  bottom: -6px;
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #fff;
  border: 2px solid rgba(255, 79, 139, 0.35);
  font-size: 12px;
  box-shadow: 0 6px 12px rgba(255, 79, 139, 0.14);
}

.badge.mic-off {
  color: #ff4f8b;
  background: rgba(255, 240, 245, 0.96);
  border: 1px solid rgba(255, 79, 139, 0.16);
}


/* Katılımcı ses seviyesi kontrolü */
.user-volume {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) 44px;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
  padding: 9px 10px;
  border-radius: 14px;
  background: rgba(255, 250, 238, 0.78);
  border: 1px solid rgba(233, 223, 204, 0.78);
}

.user-volume-label,
.user-volume-value {
  color: #8a7d88;
  font-size: 12px;
  font-weight: 900;
}

.user-volume-value {
  text-align: right;
}

.user-volume-range {
  min-height: auto;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  accent-color: #ff4f8b;
  cursor: pointer;
}

.user-volume-range:focus {
  box-shadow: none;
}

@media (max-width: 760px) {
  .user-volume {
    grid-template-columns: 34px minmax(0, 1fr) 42px;
  }
}


@media (max-width: 820px) {
  .card:has(#roomBox:not(.hidden)) .room-top-icons {
    top: 12px;
    gap: 10px;
  }

  .card:has(#roomBox:not(.hidden)) .room-top-icons span {
    width: 34px;
    height: 34px;
    font-size: 18px;
  }
}

@media (max-width: 560px) {
  .card:has(#roomBox:not(.hidden)) .room-top-icons {
    top: 10px;
    gap: 8px;
  }

  .card:has(#roomBox:not(.hidden)) .room-top-icons span {
    width: 30px;
    height: 30px;
    font-size: 16px;
    opacity: 0.65;
  }
}
