:root {
  color-scheme:dark;
  --cyan:#57f7ff;
  --cyan2:#00cfff;
  --gold:#ffd166;
  --pink:#ff4fd8;
  --text:#eafcff;
  --muted:#9fd8e8;
  --glass:rgba(180,245,255,.10);
  --glass2:rgba(255,255,255,.14);
  --border:rgba(87,247,255,.38);
  --shadow:0 24px 70px rgba(0,0,0,.45)
}
* {
  box-sizing:border-box
}
body {
  margin:0;
  font-family:Inter,system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;
  color:var(--text);
  min-height:100vh;
  overflow-x:hidden;
  background:#02131d
}
.mirror-bg {
  position:fixed;
  inset:0;
  background:radial-gradient(circle at 20% 10%,rgba(87,247,255,.28),transparent 28%),radial-gradient(circle at 85% 15%,rgba(255,79,216,.18),transparent 24%),linear-gradient(180deg,#031b2b 0%,#062f45 46%,#02131d 100%);
  z-index:-2
}
.mirror-bg:after {
  content:"";
  position:absolute;
  left:0;
  right:0;
  bottom:0;
  height:34vh;
  background:linear-gradient(180deg,rgba(87,247,255,.16),rgba(87,247,255,.02)),repeating-linear-gradient(90deg,transparent 0 90px,rgba(87,247,255,.12) 91px 92px);
  transform:perspective(500px) rotateX(58deg);
  transform-origin:bottom;
  filter:blur(.2px)
}
.shell {
  max-width:1440px;
  margin:0 auto;
  padding:18px
}
.glass {
  background:linear-gradient(145deg,var(--glass2),var(--glass));
  border:1px solid var(--border);
  border-radius:28px;
  box-shadow:var(--shadow),inset 0 1px 0 rgba(255,255,255,.35);
  backdrop-filter:blur(18px) saturate(150%)
}
.topbar {
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:16px;
  padding:16px 20px;
  margin-bottom:18px
}
.brand {
  display:flex;
  align-items:center;
  gap:12px
}
.brand-mark {
  display:grid;
  place-items:center;
  width:48px;
  height:48px;
  border-radius:16px;
  background:linear-gradient(145deg,var(--cyan),#0077ff);
  color:#00131d;
  font-weight:900;
  box-shadow:0 0 24px rgba(87,247,255,.55)
}
.brand small {
  display:block;
  color:var(--muted)
}
.top-actions {
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  justify-content:flex-end
}
select,input,button {
  font:inherit
}
select,input {
  width:100%;
  border:1px solid var(--border);
  background:rgba(0,20,32,.55);
  color:var(--text);
  border-radius:16px;
  padding:12px 14px;
  outline:none
}
select:focus,input:focus {
  box-shadow:0 0 0 3px rgba(87,247,255,.25)
}
button {
  border:0;
  border-radius:16px;
  padding:12px 18px;
  cursor:pointer;
  font-weight:800
}
.primary {
  background:linear-gradient(145deg,var(--cyan),#00a2ff);
  color:#00131d;
  box-shadow:0 10px 28px rgba(0,207,255,.35)
}
.ghost {
  background:rgba(255,255,255,.10);
  color:var(--text);
  border:1px solid var(--border)
}
.wide {
  width:100%;
  margin-top:10px
}
.hidden {
  display:none!important
}
.card {
  padding:22px
}
.auth-card {
  max-width:520px;
  margin:8vh auto
}
.auth-card h1 {
  font-size:42px;
  margin:0 0 8px;
  letter-spacing:.04em;
  text-shadow:0 0 24px rgba(87,247,255,.65)
}
label {
  display:block;
  margin:14px 0;
  color:var(--muted)
}
label input,label select {
  margin-top:8px
}
.phone-row {
  display:flex;
  align-items:center;
  gap:8px;
  margin-top:8px
}
.phone-row span {
  padding:12px;
  border:1px solid var(--border);
  border-radius:16px;
  background:rgba(255,255,255,.08)
}
.layout {
  display:grid;
  grid-template-columns:320px 1fr 340px;
  gap:18px;
  align-items:start
}
.layout.lower {
  grid-template-columns:1fr 1fr 1fr;
  margin-top:18px
}
.stack {
  display:grid;
  gap:12px;
  margin-top:14px
}
.member,.room,.store-item,.order {
  display:flex;
  align-items:center;
  gap:12px;
  padding:12px;
  border:1px solid rgba(87,247,255,.25);
  border-radius:20px;
  background:rgba(255,255,255,.07)
}
.member img,.seat img {
  width:52px;
  height:52px;
  border-radius:50%;
  object-fit:cover;
  border:2px solid var(--cyan);
  background:#07304a
}
.member small,.room small,.store-item small,.order small {
  color:var(--muted);
  display:block
}
.member button,.room button,.store-item button,.order button {
  margin-left:auto;
  padding:9px 12px
}
.section-head {
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px
}
.section-head span {
  color:var(--muted)
}
.seat-grid {
  display:grid;
  grid-template-columns:repeat(5,minmax(92px,1fr));
  gap:26px;
  margin:28px 8px
}
.seat {
  min-height:150px;
  border-radius:34px;
  padding:16px 10px;
  text-align:center;
  background:radial-gradient(circle at 50% 20%,rgba(255,255,255,.22),rgba(87,247,255,.08) 58%,rgba(0,0,0,.12));
  border:1px solid rgba(87,247,255,.45);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.35),0 18px 34px rgba(0,0,0,.28);
  cursor:pointer
}
.seat.empty {
  color:var(--muted);
  border-style:dashed
}
.seat.speaking {
  box-shadow:0 0 0 3px rgba(87,247,255,.35),0 0 34px rgba(87,247,255,.55)
}
.seat .plus {
  font-size:42px;
  line-height:52px;
  color:var(--cyan)
}
.seat strong {
  display:block;
  margin-top:8px
}
.seat small {
  color:var(--muted)
}
.room-actions {
  display:flex;
  gap:12px;
  flex-wrap:wrap
}
.gift-panel {
  margin-top:20px;
  padding:16px;
  border:1px solid rgba(255,209,102,.45);
  border-radius:24px;
  background:rgba(255,209,102,.07)
}
.gift-grid {
  display:grid;
  grid-template-columns:repeat(auto-fill,minmax(96px,1fr));
  gap:12px;
  max-height:320px;
  overflow:auto
}
.gift {
  border:1px solid rgba(255,209,102,.45);
  background:linear-gradient(160deg,rgba(255,255,255,.16),rgba(255,209,102,.08));
  border-radius:20px;
  padding:12px;
  text-align:center;
  color:var(--text)
}
.gift img {
  width:42px;
  height:42px
}
.gift small {
  display:block;
  color:var(--gold)
}
.gift-layer {
  position:relative;
  height:0
}
.flying-gift {
  position:absolute;
  width:64px;
  height:64px;
  display:grid;
  place-items:center;
  border-radius:50%;
  background:radial-gradient(circle,#fff8d6,#ffd166 45%,#ff4fd8);
  color:#211000;
  font-weight:900;
  box-shadow:0 0 34px rgba(255,209,102,.8);
  transition:transform 1.1s cubic-bezier(.2,.8,.2,1),opacity 1.1s;
  z-index:5
}
.profile-card {
  overflow:hidden
}
.cover {
  height:150px;
  border-radius:22px;
  background:linear-gradient(135deg,#00cfff,#123bff,#ff4fd8);
  background-size:cover;
  background-position:center
}
.profile-main {
  display:flex;
  gap:16px;
  align-items:center;
  margin-top:-42px;
  padding:0 8px
}
.profile-main img {
  width:96px;
  height:96px;
  border-radius:50%;
  object-fit:cover;
  border:4px solid var(--cyan);
  background:#07304a
}
.photo-actions {
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  margin-top:16px
}
.file-btn {
  display:inline-block;
  padding:11px 14px;
  border-radius:16px;
  background:rgba(255,255,255,.10);
  border:1px solid var(--border);
  color:var(--text);
  cursor:pointer
}
.file-btn input {
  display:none
}
.inbox-groups {
  display:grid;
  gap:14px;
  margin:12px 0
}
.inbox-group {
  padding:12px;
  border:1px solid rgba(87,247,255,.22);
  border-radius:18px;
  background:rgba(255,255,255,.07)
}
.inbox-group.already-messaged {
  border-color:rgba(53,224,138,.38);
  background:linear-gradient(135deg,rgba(53,224,138,.12),rgba(87,247,255,.08))
}
.inbox-group h3 {
  margin:0 0 10px;
  font-size:15px
}
.inbox-list {
  display:grid;
  gap:8px
}
.inbox-row {
  width:100%;
  display:flex;
  align-items:center;
  gap:10px;
  text-align:left;
  padding:10px;
  border-radius:16px;
  background:rgba(255,255,255,.08);
  border:1px solid rgba(255,255,255,.10);
  color:var(--text)
}
.inbox-row.active {
  border-color:rgba(87,247,255,.65);
  box-shadow:0 0 0 2px rgba(87,247,255,.18),0 12px 28px rgba(0,0,0,.18)
}
.inbox-row img {
  width:42px;
  height:42px;
  border-radius:50%;
  object-fit:cover;
  flex:0 0 auto
}
.inbox-row-main {
  min-width:0;
  flex:1;
  display:grid;
  gap:2px
}
.inbox-row-main strong,
.inbox-row-main small {
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap
}
.inbox-row-main small {
  color:var(--muted)
}
.inbox-badge {
  flex:0 0 auto;
  padding:5px 8px;
  border-radius:999px;
  background:rgba(87,247,255,.16);
  border:1px solid rgba(87,247,255,.28);
  font-size:11px
}
.create-room-panel {
  display:grid;
  gap:10px;
  margin:14px 0;
  padding:14px;
  border:1px solid rgba(87,247,255,.24);
  border-radius:20px;
  background:linear-gradient(135deg,rgba(87,247,255,.10),rgba(53,224,138,.07))
}
.create-room-panel h3 {
  margin:4px 0 2px
}
.chat-composer {
  display:flex;
  gap:10px
}
.chat-composer input {
  flex:1;
  min-width:0
}
.attachment-actions {
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin-top:10px
}
.attachment-preview {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin-top:10px;
  padding:10px 12px;
  border-radius:16px;
  background:rgba(87,247,255,.12);
  border:1px solid rgba(87,247,255,.25)
}
.attachment-preview.hidden {
  display:none
}
.message-image {
  display:block;
  max-width:100%;
  max-height:260px;
  border-radius:14px;
  margin-top:6px
}
.message-file {
  display:inline-block;
  margin-top:6px;
  padding:8px 10px;
  border-radius:12px;
  background:rgba(255,255,255,.10);
  color:var(--text);
  text-decoration:none
}
.bubble audio {
  display:block;
  width:100%;
  margin-top:6px
}
.message-list {
  min-height:180px;
  max-height:280px;
  overflow:auto;
  display:grid;
  gap:8px;
  margin:12px 0
}
.bubble {
  padding:10px 12px;
  border-radius:16px;
  background:rgba(255,255,255,.09)
}
.bubble.me {
  background:rgba(87,247,255,.18);
  text-align:right
}
.inline {
  display:flex;
  gap:10px
}
.inline input {
  flex:1
}
.toast {
  position:fixed;
  left:50%;
  bottom:24px;
  transform:translateX(-50%);
  background:rgba(0,20,32,.88);
  border:1px solid var(--border);
  border-radius:18px;
  padding:14px 18px;
  box-shadow:var(--shadow);
  z-index:20;
  max-width:min(92vw,560px)
}
@media(max-width:1100px) {
  .layout,.layout.lower {
    grid-template-columns:1fr
  }
  .seat-grid {
    grid-template-columns:repeat(2,minmax(120px,1fr));
    gap:20px
  }
  .topbar {
    align-items:flex-start;
    flex-direction:column
  }
  .top-actions {
    justify-content:flex-start
  }
}
/* Expanded Voice Club systems */
.extras {
  margin-top: 18px;
}
.member {
  flex-wrap: wrap;
}
.member button,
.order button,
.store-item button {
  font-size: 13px;
}
#notificationList,
#inviteList,
#inventoryList,
#achievementList,
#historyList,
#adminStats {
  max-height: 360px;
  overflow: auto;
  padding-right: 4px;
}
#storeList {
  max-height: 420px;
  overflow: auto;
  padding-right: 4px;
}
#giftGrid {
  scrollbar-width: thin;
}
.seat {
  transition: transform .2s ease, box-shadow .2s ease;
}
.seat:hover {
  transform: translateY(-4px);
}
.gift {
  transition: transform .18s ease, box-shadow .18s ease;
}
.gift:hover {
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 14px 30px rgba(255, 209, 102, .22);
}
.profile-card .cover {
  box-shadow: inset 0 -40px 60px rgba(0, 0, 0, .28);
}
@media (max-width: 700px) {
  .member button {
    flex: 1 1 30%;
  }
  .seat-grid {
    grid-template-columns: repeat(2, minmax(118px, 1fr));
  }
}
