/* ══════════════════════════════════════════════════
   NOBAR — Nonton Bareng
   ══════════════════════════════════════════════════ */

/* ── Landing ── */
.nobar-landing { padding-top: 20px; }

.nobar-hero {
  text-align: center;
  padding: 30px 0 34px;
}
.nobar-hero-icon {
  width: 88px; height: 88px; margin: 0 auto 18px;
  border-radius: 26px;
  background: var(--brand-grad);
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  box-shadow: 0 16px 44px rgba(220,38,38,.45);
}
.nobar-title {
  font-size: clamp(26px, 5vw, 34px);
  font-weight: 900;
  letter-spacing: -.5px;
  margin-bottom: 10px;
  background: var(--brand-grad);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.nobar-sub {
  font-size: 14px; color: var(--text-m);
  max-width: 400px; margin: 0 auto; line-height: 1.6;
}

.nobar-methods {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 28px;
}
.nobar-method-card {
  padding: 22px 18px;
  border-radius: var(--r-lg);
  background: var(--glass);
  border: 1px solid var(--glass-border);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  color: var(--text);
  cursor: pointer;
  text-align: left;
  transition: transform .3s var(--ease), border-color .3s var(--ease), box-shadow .3s var(--ease);
  font-family: inherit;
}
.nobar-method-card:hover {
  transform: translateY(-4px);
  border-color: var(--glass-border-h);
  box-shadow: 0 14px 34px -12px rgba(220,38,38,.4);
}
.nobar-method-card:active { transform: translateY(-1px) scale(.97); }
.nobar-method-icon {
  width: 46px; height: 46px; border-radius: 14px;
  background: rgba(220,38,38,.16);
  color: var(--grad-3);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; margin-bottom: 12px;
}
.nobar-method-title { font-size: 15px; font-weight: 800; margin-bottom: 4px; }
.nobar-method-desc { font-size: 12px; color: var(--text-d); line-height: 1.4; }

.nobar-section { margin-bottom: 28px; }

.nobar-refresh {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 14px; border-radius: 100px;
  background: var(--glass); border: 1px solid var(--glass-border);
  color: var(--text-m); font-size: 12px; font-weight: 600;
  cursor: pointer;
  transition: all .25s var(--ease);
  font-family: inherit;
}
.nobar-refresh:hover { border-color: var(--glass-border-h); color: var(--text); }

.nobar-room-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}
@media (min-width: 640px) { .nobar-room-list { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .nobar-room-list { grid-template-columns: repeat(3, 1fr); } }

.nobar-empty {
  grid-column: 1/-1;
  padding: 44px 20px;
  text-align: center;
  border-radius: var(--r-lg);
  background: var(--glass);
  border: 1px dashed var(--glass-border);
}

.nobar-room-card {
  display: flex; gap: 12px;
  padding: 12px;
  border-radius: var(--r);
  background: var(--glass);
  border: 1px solid var(--glass-border);
  text-decoration: none; color: var(--text);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  transition: all .25s var(--ease);
}
.nobar-room-card:hover {
  border-color: var(--glass-border-h);
  background: var(--glass-h);
  transform: translateY(-2px);
}
.nobar-room-poster {
  width: 68px; height: 96px; flex-shrink: 0;
  border-radius: var(--r-sm);
  background: var(--bg-2) center/cover no-repeat;
  display: flex; align-items: center; justify-content: center;
  position: relative;
  color: var(--text-d);
}
.nobar-room-live {
  position: absolute; top: 5px; left: 5px;
  padding: 2px 7px; border-radius: 4px;
  background: #DC2626; color: #fff;
  font-size: 9px; font-weight: 800; letter-spacing: .5px;
  animation: pulseLive 1.6s ease-in-out infinite;
}
@keyframes pulseLive { 50% { opacity: .6; } }
.nobar-room-info { flex: 1; min-width: 0; padding: 4px 0; }
.nobar-room-name {
  font-size: 14px; font-weight: 700; line-height: 1.3;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.nobar-room-meta { font-size: 11.5px; color: var(--text-d); margin-top: 4px; }
.nobar-room-media {
  font-size: 12px; color: var(--text-m); margin-top: 8px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

/* ── Private Box ── */
.nobar-private-box {
  padding: 20px;
  border-radius: var(--r-lg);
  background: var(--glass);
  border: 1px solid var(--glass-border);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
}
.nobar-private-tabs {
  display: flex; gap: 4px; padding: 4px;
  background: var(--glass-2); border-radius: var(--r-xl);
  margin-bottom: 20px;
}
.nobar-private-tab {
  flex: 1; padding: 9px;
  border-radius: var(--r-xl);
  background: none; border: none;
  color: var(--text-d); font-size: 13px; font-weight: 700;
  cursor: pointer; transition: all .25s var(--ease);
  font-family: inherit;
}
.nobar-private-tab.active {
  background: var(--brand-grad); color: #fff;
  box-shadow: 0 4px 16px rgba(220,38,38,.4);
}

.nobar-label {
  display: block;
  font-size: 11px; font-weight: 700;
  color: var(--text-d); letter-spacing: .5px;
  margin-bottom: 7px; margin-top: 4px;
}
.nobar-label:first-of-type { margin-top: 0; }

.nobar-input {
  width: 100%;
  padding: 13px 16px;
  background: var(--glass-2);
  border: 1px solid var(--glass-border);
  border-radius: var(--r);
  color: var(--text);
  font-size: 15px; font-family: inherit;
  margin-bottom: 16px;
  transition: border-color .25s var(--ease), box-shadow .25s var(--ease);
}
.nobar-input:focus {
  outline: none;
  border-color: rgba(220,38,38,.55);
  box-shadow: 0 0 0 4px rgba(220,38,38,.15);
}
.nobar-input::placeholder { color: var(--text-d); }

.nobar-code-input { font-family: ui-monospace, monospace; }

.nobar-submit { width: 100%; justify-content: center; }

/* ── Room Page ── */
.nobar-room-page {
  min-height: 100vh;
  display: flex; flex-direction: column;
  padding-top: 0;
}

.nobar-header {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px;
  background: rgba(10,5,5,.75);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--glass-border);
}
.nobar-header-info { flex: 1; min-width: 0; }
.nobar-header-title {
  font-size: 15px; font-weight: 800;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.nobar-header-sub {
  display: flex; align-items: center; gap: 6px;
  font-size: 11.5px; color: var(--text-d); margin-top: 2px;
}
.nobar-live-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: #DC2626; box-shadow: 0 0 7px #DC2626;
  animation: pulseLive 1.6s ease-in-out infinite;
}
.nobar-code-badge {
  padding: 3px 9px; border-radius: 6px;
  background: rgba(220,38,38,.16);
  border: 1px solid rgba(220,38,38,.35);
  color: var(--grad-3); font-size: 10px; font-weight: 700;
  margin-left: 4px;
}
.nobar-code-badge b { color: var(--text); letter-spacing: 1px; }

.nobar-icon-btn {
  width: 36px; height: 36px; flex-shrink: 0;
  border-radius: 50%;
  background: var(--glass); border: 1px solid var(--glass-border);
  color: var(--text); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all .25s var(--ease);
}
.nobar-icon-btn:hover { background: var(--glass-h); border-color: var(--glass-border-h); }

.nobar-player-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  background: #000;
  flex-shrink: 0;
}

.nobar-host-controls {
  position: absolute; bottom: 12px; right: 12px;
  display: flex; gap: 8px;
  background: rgba(10,5,5,.7);
  border: 1px solid var(--glass-border);
  padding: 6px; border-radius: 100px;
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
.nobar-ctrl-btn {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: var(--glass); border: 1px solid var(--glass-border);
  color: var(--text); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all .25s var(--ease);
}
.nobar-ctrl-btn:hover { background: var(--brand-grad); border-color: transparent; }

/* ── Media Picker ── */
.nobar-media-picker {
  padding: 18px 14px;
  background: var(--glass-2);
  border-bottom: 1px solid var(--glass-border);
  max-height: 60vh; overflow-y: auto;
}
.nobar-media-picker-inner { max-width: 1440px; margin: 0 auto; }
.nobar-search-wrap { margin-bottom: 14px; }

/* ── Tabs ── */
.nobar-tabs {
  display: flex;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
  position: sticky; top: 60px; z-index: 40;
}
.nobar-tab {
  flex: 1;
  padding: 13px 8px;
  background: none; border: none;
  color: var(--text-d); font-size: 12.5px; font-weight: 700;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  display: flex; align-items: center; justify-content: center; gap: 6px;
  position: relative;
  transition: all .25s var(--ease);
  font-family: inherit;
}
.nobar-tab.active {
  color: var(--text);
  border-bottom-color: var(--grad-2);
}
.nobar-tab-badge {
  position: absolute; top: 6px; right: 22%;
  min-width: 17px; height: 17px; padding: 0 4px;
  border-radius: 9px;
  background: #DC2626; color: #fff;
  font-size: 10px; font-weight: 800;
  display: inline-flex; align-items: center; justify-content: center;
}
.nobar-voice-indicator {
  width: 7px; height: 7px; border-radius: 50%;
  background: #22c55e; box-shadow: 0 0 7px #22c55e;
}

/* ── Panels ── */
.nobar-panel {
  flex: 1;
  padding: 14px;
  overflow-y: auto;
}

/* ── Chat ── */
.nobar-chat {
  display: flex; flex-direction: column; gap: 12px;
  min-height: 200px; max-height: 48vh;
  overflow-y: auto;
  padding-bottom: 10px;
  margin-bottom: 10px;
}
.nobar-chat-msg {
  display: flex; gap: 9px;
  animation: msgIn .3s var(--ease);
}
@keyframes msgIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
.nobar-chat-msg.me { flex-direction: row-reverse; }
.nobar-chat-avatar {
  width: 30px; height: 30px; flex-shrink: 0;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 12px; font-weight: 800;
}
.nobar-chat-body { max-width: 78%; }
.nobar-chat-name { font-size: 10.5px; color: var(--text-d); margin-bottom: 3px; }
.nobar-chat-msg.me .nobar-chat-name { text-align: right; }
.nobar-chat-bubble {
  padding: 9px 13px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: 14px;
  font-size: 13.5px; color: var(--text);
  line-height: 1.45;
  word-break: break-word;
}
.nobar-chat-msg.me .nobar-chat-bubble {
  background: var(--brand-grad-soft);
  border-color: rgba(220,38,38,.4);
}

.nobar-chat-input {
  display: flex; gap: 8px;
  position: sticky; bottom: 0;
  background: var(--bg);
  padding-top: 8px;
}
.nobar-chat-input .nobar-input { margin-bottom: 0; flex: 1; }
.nobar-send-btn {
  width: 46px; height: 46px; flex-shrink: 0;
  border-radius: 50%;
  background: var(--brand-grad);
  border: none; color: #fff;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: transform .25s var(--ease);
  box-shadow: 0 6px 20px rgba(220,38,38,.4);
}
.nobar-send-btn:hover { transform: scale(1.06); }

/* ── Voice Panel ── */
.nobar-voice-controls {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 16px;
}
.nobar-voice-btn {
  padding: 18px 12px;
  border-radius: var(--r);
  background: var(--glass);
  border: 1px solid var(--glass-border);
  color: var(--text);
  cursor: pointer;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  font-size: 12.5px; font-weight: 700;
  transition: all .25s var(--ease);
  font-family: inherit;
}
.nobar-voice-btn.active {
  background: var(--brand-grad-soft);
  border-color: rgba(220,38,38,.5);
}
.nobar-voice-btn:hover { border-color: var(--glass-border-h); }

.nobar-voice-status {
  text-align: center;
  font-size: 12.5px; color: var(--text-m);
  padding: 12px;
  background: var(--glass-2);
  border-radius: var(--r);
  margin-bottom: 12px;
}
.nobar-voice-members {
  display: flex; flex-direction: column; gap: 8px;
  margin-bottom: 14px;
}
.nobar-voice-member {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px;
  border-radius: var(--r);
  background: var(--glass-2);
  border: 1px solid var(--glass-border);
  font-size: 13px;
  color: var(--text);
}
.nobar-voice-member i { color: #22c55e; }
.nobar-voice-hint {
  padding: 12px 14px;
  border-radius: var(--r);
  background: rgba(240,184,87,.08);
  border: 1px solid rgba(240,184,87,.25);
  color: var(--text-m);
  font-size: 11.5px; line-height: 1.5;
  display: flex; gap: 8px;
}
.nobar-voice-hint i { color: var(--gold-l); margin-top: 2px; }

/* ── Members Panel ── */
.nobar-members { display: flex; flex-direction: column; gap: 8px; }
.nobar-member-row {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px;
  border-radius: var(--r);
  background: var(--glass-2);
  border: 1px solid var(--glass-border);
}
.nobar-member-name { font-size: 13.5px; font-weight: 600; color: var(--text); display: flex; align-items: center; gap: 8px; }
.nobar-host-badge {
  padding: 2px 7px; border-radius: 4px;
  background: var(--brand-grad); color: #fff;
  font-size: 9px; font-weight: 800; letter-spacing: .5px;
}

/* ── Desktop ── */
@media (min-width: 900px) {
  .nobar-room-page {
    display: grid;
    grid-template-columns: 1fr 380px;
    grid-template-rows: auto 1fr;
    grid-template-areas: "header header" "player panel";
    height: 100vh;
    overflow: hidden;
  }
  .nobar-header { grid-area: header; position: static; }
  .nobar-player-wrap { grid-area: player; aspect-ratio: auto; }
  .nobar-tabs, .nobar-panel { grid-column: 2; }
  .nobar-tabs { grid-row: 2; position: sticky; top: 0; align-self: start; }
  .nobar-panel { grid-row: 2; margin-top: 46px; }
  .nobar-media-picker { position: absolute; top: 60px; left: 0; right: 380px; z-index: 45; }
}