:root {
  --bg: #030304;
  --surface: rgba(12, 12, 14, 0.9);
  --surface-solid: #0c0c0e;
  --surface-2: rgba(22, 22, 25, 0.92);
  --border: rgba(255, 255, 255, 0.085);
  --border-strong: rgba(245, 196, 81, 0.34);
  --text: #f7f5f0;
  --text-muted: #8e8b82;
  --gold: #f5c451;
  --gold-deep: #d99b26;
  --gold-soft: rgba(245, 196, 81, 0.14);
  --ambient-glow: rgba(245, 196, 81, 0.11);
  --danger: #ef4444;
  --success: #22c55e;
  --radius: 14px;
  --radius-sm: 10px;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  line-height: 1.5;
  overflow-x: hidden;
}

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

button,
input,
select {
  font-family: inherit;
  color: inherit;
}

/* Subtle noir champagne cinema glow */
.ambient-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
  background:
    radial-gradient(640px circle at 50% 4%, var(--ambient-glow), transparent 66%),
    radial-gradient(460px circle at 88% 92%, rgba(245, 196, 81, 0.05), transparent 64%),
    radial-gradient(400px circle at 12% 88%, rgba(255, 255, 255, 0.03), transparent 64%);
  transition: background 0.45s ease;
}

/* Home Page */
.home-shell {
  position: relative;
  z-index: 1;
  min-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 28px 16px 40px;
}

.home-topbar {
  width: 100%;
  max-width: 540px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.brand-logo {
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  filter: drop-shadow(0 4px 12px rgba(245, 196, 81, 0.25));
}

.brand-logo svg {
  width: 100%;
  height: 100%;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.guide-trigger {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  backdrop-filter: blur(12px);
  transition: border-color 0.15s, background 0.15s, transform 0.14s;
}

.guide-trigger svg {
  width: 12px;
  height: 12px;
  color: var(--gold);
}

.guide-trigger:hover {
  border-color: rgba(245, 196, 81, 0.58);
  background: rgba(245, 196, 81, 0.12);
  transform: translateY(-1px);
}

.modal-card.guide-modal-card {
  max-width: 600px;
  max-height: 92vh;
  overflow-y: auto;
  padding: 22px 24px;
}

.guide-modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.modal-close-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
  color: var(--text-muted);
  width: 30px;
  height: 30px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
  flex-shrink: 0;
}

.modal-close-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  color: var(--text);
}

.guide-tabs {
  margin-top: 16px;
}

.guide-video-frame {
  margin-top: 14px;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  overflow: hidden;
  background: #05060a;
  border: 1px solid var(--border);
}

.guide-video-frame iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

.guide-steps-wrap {
  margin-top: 16px;
}

.guide-step-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.guide-step-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: #d6dae6;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px 11px;
}

.step-num {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold), var(--gold-deep));
  color: #050506;
  font-size: 11px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.guide-modal-footer {
  margin-top: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.guide-note {
  font-size: 11px;
  color: var(--text-muted);
}

.lang-picker {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 5px 10px 5px 11px;
  backdrop-filter: blur(12px);
  transition: border-color 0.15s;
}

.lang-picker:hover {
  border-color: var(--border-strong);
}

.lang-picker svg {
  width: 14px;
  height: 14px;
  color: var(--text-muted);
  flex-shrink: 0;
}

.lang-select {
  background: transparent;
  border: none;
  outline: none;
  font-size: 12px;
  font-weight: 500;
  color: var(--text);
  cursor: pointer;
  white-space: nowrap;
}

.lang-select option {
  background: #12141e;
  color: #f5f6fa;
}

.home-card {
  width: 100%;
  max-width: 540px;
  background: var(--surface);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 28px;
  box-shadow:
    0 24px 64px rgba(0, 0, 0, 0.55),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.hero-title {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.025em;
}

.subtitle {
  margin-top: 6px;
  color: var(--text-muted);
  font-size: 14px;
}

.platforms-section {
  margin-top: 20px;
}

.platforms-label {
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.platform-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

.platform-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 11px 6px 10px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: transform 0.16s ease, border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.platform-card:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.055);
  border-color: var(--border-strong);
}

.platform-card.active {
  background: rgba(245, 196, 81, 0.08);
  border-color: var(--gold);
  box-shadow: 0 0 0 1px var(--gold), 0 8px 22px -6px rgba(245, 196, 81, 0.28);
}

.platform-icon {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.platform-icon svg {
  width: 36px;
  height: 36px;
}

.platform-card-name {
  font-size: 11px;
  font-weight: 500;
  color: #d6dae6;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  background: rgba(7, 8, 13, 0.72);
  padding: 4px;
  border-radius: 12px;
  margin-top: 22px;
  border: 1px solid var(--border);
}

.tab-btn {
  background: transparent;
  border: none;
  padding: 9px 12px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.tab-btn.active {
  background: rgba(255, 255, 255, 0.09);
  color: var(--text);
}

.form-stack {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 18px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field label {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.detected-tag {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 9px 2px 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  border: 1px solid var(--border-strong);
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.detected-tag svg {
  width: 14px;
  height: 14px;
}

.input {
  width: 100%;
  background: #050506;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 11px 13px;
  font-size: 14px;
  outline: none;
  transition: border-color 0.16s, box-shadow 0.16s;
}

.input:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(245, 196, 81, 0.15);
}

.input::placeholder {
  color: #5c5a54;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none;
  border-radius: var(--radius-sm);
  padding: 11px 16px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.14s ease, opacity 0.15s, background 0.15s, border-color 0.15s, box-shadow 0.15s;
}

.btn:active:not(:disabled) {
  transform: scale(0.985);
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.btn-primary {
  background: linear-gradient(135deg, #f8d06b, var(--gold) 55%, var(--gold-deep));
  color: #050506;
  font-weight: 700;
  box-shadow: 0 8px 24px -6px rgba(245, 196, 81, 0.48);
}

.btn-primary:hover:not(:disabled) {
  opacity: 0.95;
  box-shadow: 0 10px 28px -4px rgba(245, 196, 81, 0.62);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.055);
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-ghost:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--border-strong);
}

.btn-sm {
  padding: 7px 12px;
  font-size: 13px;
}

.error-text {
  font-size: 13px;
  color: #f87171;
  min-height: 18px;
}

.ext-status-bar {
  margin-top: 18px;
  padding-top: 15px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 12px;
  color: var(--text-muted);
  flex-wrap: wrap;
}

.status-indicator {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #6b7280;
  flex-shrink: 0;
}

.status-dot.online {
  background: var(--success);
  box-shadow: 0 0 8px rgba(34, 197, 94, 0.7);
}

.ext-download-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border-radius: 999px;
  background: rgba(245, 196, 81, 0.11);
  border: 1px solid rgba(245, 196, 81, 0.42);
  color: #f8d882;
  font-size: 11.5px;
  font-weight: 600;
  transition: background 0.15s, border-color 0.15s, transform 0.14s;
}

.ext-download-pill:hover {
  background: rgba(245, 196, 81, 0.22);
  border-color: var(--gold);
  transform: translateY(-1px);
}

.download-pills {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.win-pill {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.16);
  color: var(--text);
  cursor: pointer;
}

.win-pill:hover {
  background: rgba(245, 196, 81, 0.14);
  border-color: var(--gold);
  color: #f8d882;
}

/* Cinema Avatar Picker */
.avatar-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 4px;
}

.avatar-choice {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.14s, background 0.14s, transform 0.12s;
}

.avatar-choice:hover {
  border-color: rgba(245, 196, 81, 0.45);
  background: rgba(245, 196, 81, 0.08);
  transform: translateY(-1px);
}

.avatar-choice.active {
  border-color: var(--gold);
  background: rgba(245, 196, 81, 0.18);
  color: #f8d882;
  box-shadow: 0 0 0 1px rgba(245, 196, 81, 0.4);
}

/* Recent Rooms History */
.recent-rooms {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

.recent-rooms-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.recent-clear-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 11px;
  cursor: pointer;
}

.recent-clear-btn:hover {
  color: var(--gold);
}

.recent-rooms-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.recent-room-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 10px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  font-size: 12px;
  transition: border-color 0.15s, background 0.15s;
}

.recent-room-chip:hover {
  border-color: rgba(245, 196, 81, 0.45);
  background: rgba(245, 196, 81, 0.08);
}

.recent-room-svg {
  width: 20px;
  height: 20px;
  display: inline-flex;
}

.recent-room-svg svg {
  width: 20px;
  height: 20px;
}

.recent-room-meta {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.recent-room-meta strong {
  font-size: 11.5px;
  color: var(--text);
}

.recent-room-meta small {
  font-size: 10px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color: var(--text-muted);
}

.recent-room-go {
  color: var(--gold);
  font-weight: 700;
  font-size: 12px;
}

.legal-footer {
  width: 100%;
  max-width: 540px;
  margin-top: 18px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.legal-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--text-muted);
}

.legal-links a:hover {
  color: var(--text);
  text-decoration: underline;
}

.legal-disclaimer {
  font-size: 11px;
  line-height: 1.5;
  color: #676e85;
}

.hidden {
  display: none !important;
}

/* Room Layout */
.room-shell {
  position: relative;
  z-index: 1;
  height: 100vh;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.topbar {
  height: 58px;
  flex-shrink: 0;
  padding: 0 16px;
  background: rgba(8, 8, 10, 0.96);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.topbar-left,
.topbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.room-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 11px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.055);
  border: 1px solid var(--border);
  font-size: 12px;
  font-weight: 500;
  color: var(--text);
  white-space: nowrap;
}

.badge-svg {
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.badge-svg svg {
  height: 17px;
  width: auto;
}

.room-code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color: var(--text-muted);
  font-size: 12px;
}

.room-main {
  flex: 1;
  min-height: 0;
  display: flex;
  overflow: hidden;
}

.stage {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  background: #050609;
  position: relative;
}

.player-wrap {
  flex: 1;
  min-height: 0;
  position: relative;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

#yt-player-container {
  width: 100%;
  height: 100%;
}

#yt-player-container iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

.stage-toolbar {
  padding: 10px 16px;
  background: #0a0a0c;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.stage-toolbar-left {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 220px;
}

.stage-toolbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.media-change-input {
  flex: 1;
  max-width: 420px;
  padding: 7px 11px;
  font-size: 13px;
}

.toggle-label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  color: var(--text-muted);
  cursor: pointer;
  user-select: none;
}

.toggle-label input {
  accent-color: var(--gold);
}

/* External DRM Platform Card */
.external-card {
  width: 100%;
  max-width: 470px;
  background: var(--surface);
  backdrop-filter: blur(18px);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 28px 26px;
  text-align: center;
  margin: auto 16px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.55);
}

.external-icon-orb {
  width: 78px;
  height: 58px;
  margin: 0 auto 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
}

.external-icon-orb svg {
  max-width: 100%;
  max-height: 32px;
  width: auto;
  height: 30px;
}

.external-platform-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 12px;
}

.external-card h2 {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.external-card p {
  margin-top: 8px;
  font-size: 14px;
  color: var(--text-muted);
}

.external-actions {
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.guide-box {
  margin-top: 18px;
  text-align: start;
  background: rgba(7, 8, 13, 0.72);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px;
  font-size: 12px;
  color: var(--text-muted);
}

.guide-box strong {
  color: var(--text);
  display: block;
  margin-bottom: 6px;
}

.guide-box ol {
  padding-inline-start: 18px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* Floating reactions */
.reaction-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 15;
}

.floating-reaction {
  position: absolute;
  bottom: 24px;
  font-size: 28px;
  animation: floatUp 2.2s ease-out forwards;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.floating-reaction span {
  font-size: 10px;
  background: rgba(0, 0, 0, 0.76);
  padding: 2px 7px;
  border-radius: 999px;
  margin-top: 2px;
  color: #fff;
}

@keyframes floatUp {
  0% {
    transform: translateY(0) scale(0.8);
    opacity: 0;
  }
  15% {
    opacity: 1;
    transform: translateY(-20px) scale(1.08);
  }
  100% {
    transform: translateY(-220px) scale(0.95);
    opacity: 0;
  }
}

/* Sidebar */
.sidebar {
  width: 348px;
  flex-shrink: 0;
  background: #09090b;
  border-inline-start: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.users-panel {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 9px;
}

.users-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  max-height: 92px;
  overflow-y: auto;
}

.user-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px 4px 5px;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 12px;
  max-width: 100%;
  transition: border-color 0.15s;
}

.user-chip.is-self {
  border-color: rgba(245, 196, 81, 0.48);
  cursor: pointer;
}

.user-chip.is-self:hover {
  border-color: var(--gold);
}

.avatar {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}

.host-star {
  color: #fbbf24;
  font-size: 11px;
}

.user-chip.is-muted {
  border-color: rgba(239, 68, 68, 0.55);
  background: rgba(239, 68, 68, 0.12);
}

.muted-pill-tag {
  font-size: 10px;
  font-weight: 700;
  color: #fca5a5;
  background: rgba(239, 68, 68, 0.22);
  padding: 1px 6px;
  border-radius: 999px;
}

.mute-action-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  font-size: 11px;
  opacity: 0.65;
  padding: 0 2px;
  transition: opacity 0.14s, transform 0.14s;
}

.mute-action-btn:hover {
  opacity: 1;
  transform: scale(1.15);
}

.kick-action-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  font-size: 11px;
  opacity: 0.65;
  padding: 0 2px;
  transition: opacity 0.14s, transform 0.14s;
}

.kick-action-btn:hover {
  opacity: 1;
  transform: scale(1.15);
}

.lock-badge {
  border-color: rgba(245, 196, 81, 0.45);
  background: rgba(245, 196, 81, 0.12);
  color: #f8d882;
}

/* Sidebar Tabs (Chat / YouTube Queue) */
.sidebar-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 6px 10px;
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.02);
}

.sidebar-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 7px 10px;
  border-radius: 9px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.sidebar-tab:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
}

.sidebar-tab.active {
  color: var(--text);
  background: rgba(245, 196, 81, 0.12);
  border-color: rgba(245, 196, 81, 0.35);
}

.queue-count-pill {
  font-size: 10.5px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.09);
  color: var(--text-muted);
}

.queue-count-pill.has-items {
  background: var(--gold);
  color: #050506;
}

.chat-panel,
.queue-panel {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.queue-form {
  display: flex;
  gap: 7px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
}

.queue-input {
  flex: 1;
  min-width: 0;
  padding: 8px 10px;
  font-size: 12.5px;
}

.queue-error {
  padding: 6px 12px;
  font-size: 11.5px;
  color: #fca5a5;
  background: rgba(239, 68, 68, 0.12);
  border-bottom: 1px solid rgba(239, 68, 68, 0.28);
}

.queue-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--border);
}

.queue-status-text {
  font-size: 11px;
  color: var(--text-muted);
}

.queue-list {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.queue-empty {
  margin: auto;
  text-align: center;
  font-size: 12.5px;
  color: var(--text-muted);
  padding: 20px 12px;
}

.queue-item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px;
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  transition: border-color 0.15s, background 0.15s;
}

.queue-item:hover {
  border-color: rgba(245, 196, 81, 0.3);
  background: rgba(255, 255, 255, 0.05);
}

.queue-thumb {
  width: 60px;
  height: 36px;
  border-radius: 7px;
  object-fit: cover;
  flex-shrink: 0;
  background: #000;
}

.queue-meta {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.queue-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.queue-by {
  font-size: 10.5px;
  color: var(--text-muted);
}

.queue-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.queue-icon-btn {
  width: 26px;
  height: 26px;
  border-radius: 7px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  font-size: 11px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.14s, border-color 0.14s, color 0.14s;
}

.queue-icon-btn.play:hover {
  background: rgba(245, 196, 81, 0.2);
  border-color: var(--gold);
  color: var(--gold);
}

.queue-icon-btn.remove:hover {
  background: rgba(239, 68, 68, 0.2);
  border-color: rgba(239, 68, 68, 0.5);
  color: #fca5a5;
}

/* Sidebar mini toolbar (Ready, Poll, Sound) */
.panel-header-tools {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.mini-tool-btn {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.14s, background 0.14s;
}

.mini-tool-btn:hover,
.mini-tool-btn.active {
  border-color: rgba(245, 196, 81, 0.48);
  background: rgba(245, 196, 81, 0.14);
}

.avatar.has-emoji {
  font-size: 13px;
}

/* Ready Check & Poll Cards */
.ready-box,
.poll-box {
  padding: 10px 12px;
  background: linear-gradient(180deg, rgba(245, 196, 81, 0.13), rgba(217, 155, 38, 0.04));
  border-bottom: 1px solid rgba(245, 196, 81, 0.34);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ready-head,
.poll-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
}

.ready-count {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(245, 196, 81, 0.2);
  color: #fce29a;
}

.ready-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-ready-done {
  background: rgba(34, 197, 94, 0.18);
  color: #86efac;
  border: 1px solid rgba(34, 197, 94, 0.45);
}

.poll-close-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
  color: var(--text-muted);
  border-radius: 6px;
  padding: 2px 7px;
  font-size: 10.5px;
  cursor: pointer;
}

.poll-close-btn:hover {
  color: var(--text);
  border-color: var(--border-strong);
}

.poll-options {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.poll-opt-btn {
  position: relative;
  overflow: hidden;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 9px;
  border-radius: 8px;
  background: rgba(8, 8, 10, 0.85);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 12px;
  cursor: pointer;
  text-align: start;
}

.poll-opt-btn.voted {
  border-color: var(--gold);
}

.poll-opt-bar {
  position: absolute;
  inset: 0 auto 0 0;
  background: rgba(245, 196, 81, 0.18);
  pointer-events: none;
  transition: width 0.25s ease;
}

.poll-opt-label,
.poll-opt-pct {
  position: relative;
  z-index: 1;
}

.poll-opt-pct {
  font-size: 10.5px;
  color: #f8d882;
  font-weight: 600;
  white-space: nowrap;
}

/* 3-2-1 Dramatic Countdown Overlay */
.countdown-overlay {
  position: absolute;
  inset: 0;
  z-index: 25;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(3, 3, 4, 0.68);
  backdrop-filter: blur(4px);
  pointer-events: none;
}

.countdown-num {
  font-size: 96px;
  font-weight: 900;
  color: var(--gold);
  text-shadow: 0 0 42px rgba(245, 196, 81, 0.65);
  animation: countdownPulse 0.85s ease-out infinite;
}

@keyframes countdownPulse {
  0% { transform: scale(0.75); opacity: 0.4; }
  45% { transform: scale(1.1); opacity: 1; }
  100% { transform: scale(1); opacity: 0.92; }
}

/* Chat Reply, Typing, GIF Picker, Cinema Overlay */
.msg-meta-right {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.msg-reply-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 12px;
  cursor: pointer;
  opacity: 0.45;
  padding: 0 2px;
  transition: opacity 0.12s, color 0.12s;
}

.msg-item:hover .msg-reply-btn {
  opacity: 1;
}

.msg-reply-btn:hover {
  color: var(--gold);
}

.msg-reply-quote {
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: 4px 8px;
  margin: 2px 0 3px;
  border-inline-start: 2px solid var(--gold);
  background: rgba(245, 196, 81, 0.07);
  border-radius: 6px;
  font-size: 11px;
  color: var(--text-muted);
}

.msg-reply-quote strong {
  color: #f8d882;
  font-size: 10.5px;
}

.msg-gif {
  margin-top: 4px;
  max-width: 100%;
  max-height: 170px;
  border-radius: 9px;
  object-fit: cover;
  display: block;
}

.typing-indicator {
  padding: 4px 12px;
  font-size: 11px;
  color: #f8d882;
  font-style: italic;
}

.reply-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 12px;
  background: rgba(245, 196, 81, 0.09);
  border-top: 1px solid rgba(245, 196, 81, 0.28);
  font-size: 11.5px;
}

.reply-bar-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.reply-bar-text strong {
  color: #f8d882;
  font-size: 11px;
}

.reply-bar-text span {
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.reply-cancel-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 13px;
  padding: 2px 4px;
}

.reply-cancel-btn:hover {
  color: var(--text);
}

.gif-btn {
  padding: 7px 9px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: #f8d882;
}

.gif-picker {
  border-top: 1px solid var(--border);
  background: #0c0c0e;
  max-height: 210px;
  display: flex;
  flex-direction: column;
}

.gif-picker-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 10px;
  font-size: 11.5px;
  font-weight: 600;
  color: #f8d882;
  border-bottom: 1px solid var(--border);
}

.gif-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  padding: 8px;
  overflow-y: auto;
}

.gif-card {
  position: relative;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  background: #050506;
  cursor: pointer;
  aspect-ratio: 16 / 10;
  padding: 0;
}

.gif-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.gif-card span {
  position: absolute;
  inset: auto 0 0 0;
  padding: 2px 4px;
  background: rgba(0, 0, 0, 0.72);
  color: #fff;
  font-size: 9.5px;
  font-weight: 600;
}

.gif-card:hover {
  border-color: var(--gold);
}

/* Transparent Cinema Mode Overlay */
.room-shell.cinema-mode .sidebar {
  display: none;
}

.cinema-overlay {
  position: absolute;
  left: 16px;
  bottom: 18px;
  z-index: 20;
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-width: min(360px, 85%);
  pointer-events: none;
}

.cinema-bubble {
  padding: 7px 11px;
  border-radius: 10px;
  background: rgba(5, 5, 6, 0.72);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(245, 196, 81, 0.25);
  color: #f7f5f0;
  font-size: 13px;
  line-height: 1.35;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.45);
}

#cinema-mode-btn.active {
  border-color: var(--gold);
  color: #f8d882;
  background: rgba(245, 196, 81, 0.14);
}

.muted-banner {
  padding: 8px 12px;
  background: rgba(239, 68, 68, 0.14);
  border-bottom: 1px solid rgba(239, 68, 68, 0.34);
  color: #fecaca;
  font-size: 12px;
  line-height: 1.4;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.muted-banner strong {
  color: #ffffff;
  font-weight: 600;
}

.chat-form.is-locked .chat-input {
  border-color: rgba(239, 68, 68, 0.4);
  background: rgba(239, 68, 68, 0.08);
  color: #fca5a5;
  cursor: not-allowed;
}

.reaction-bar.is-locked {
  opacity: 0.35;
  pointer-events: none;
}

/* Yeni Yönetici Oylama Kartı */
.election-box {
  padding: 12px 14px;
  background: linear-gradient(180deg, rgba(245, 196, 81, 0.14), rgba(217, 155, 38, 0.05));
  border-bottom: 1px solid rgba(245, 196, 81, 0.36);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.election-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
  font-weight: 700;
  color: #f7f5f0;
}

.election-timer {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(245, 196, 81, 0.22);
  color: #fce29a;
}

.election-sub {
  font-size: 11.5px;
  color: var(--text-muted);
}

.election-options {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.election-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  padding: 7px 10px;
  border-radius: 10px;
  background: rgba(8, 8, 10, 0.86);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, transform 0.12s;
}

.election-btn:hover {
  border-color: rgba(245, 196, 81, 0.58);
  background: rgba(245, 196, 81, 0.12);
}

.election-btn.voted {
  border-color: var(--gold);
  background: rgba(245, 196, 81, 0.2);
  box-shadow: 0 0 0 1px rgba(245, 196, 81, 0.45);
}

.election-cand-left {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

.election-vote-count {
  font-size: 11px;
  color: #f8d882;
  font-weight: 600;
  white-space: nowrap;
}

.chat-messages {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.chat-empty {
  margin: auto;
  text-align: center;
  font-size: 13px;
  color: var(--text-muted);
}

.msg-system {
  align-self: center;
  font-size: 11px;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 999px;
  padding: 3px 10px;
}

.msg-item {
  display: flex;
  flex-direction: column;
  gap: 3px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  padding: 8px 11px;
}

.msg-meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
}

.msg-author {
  font-weight: 600;
}

.msg-time {
  font-size: 10px;
  color: var(--text-muted);
}

.msg-text {
  font-size: 13px;
  color: var(--text);
  word-break: break-word;
  white-space: pre-wrap;
}

.reaction-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 12px;
  border-top: 1px solid var(--border);
}

.reaction-btn {
  background: transparent;
  border: none;
  font-size: 17px;
  cursor: pointer;
  padding: 4px 7px;
  border-radius: 8px;
  transition: background 0.12s, transform 0.12s;
}

.reaction-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  transform: scale(1.18);
}

.chat-form {
  padding: 10px 12px max(12px, env(safe-area-inset-bottom));
  border-top: 1px solid var(--border);
  display: flex;
  gap: 8px;
}

.chat-input {
  flex: 1;
  padding: 9px 12px;
  font-size: 13px;
}

/* Modal */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(5, 6, 10, 0.78);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  z-index: 50;
}

.modal-card {
  width: 100%;
  max-width: 390px;
  background: var(--surface-solid);
  border: 1px solid var(--border-strong);
  border-radius: 18px;
  padding: 26px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.65);
}

.modal-card h3 {
  font-size: 18px;
  font-weight: 700;
}

.modal-card p {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 5px;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.14);
  border-radius: 999px;
}

@media (max-width: 1024px) {
  .sidebar {
    width: 316px;
  }
}

@media (max-width: 860px) {
  .room-main {
    flex-direction: column;
  }
  .stage {
    flex: 0 0 42%;
    min-height: 230px;
    max-height: 46dvh;
  }
  .stage:has(.external-card:not(.hidden)) {
    flex: 0 0 50%;
    max-height: 54dvh;
  }
  .stage:has(.external-card:not(.hidden)) .player-wrap {
    padding: 10px 12px;
  }
  .sidebar {
    width: 100%;
    flex: 1;
    min-height: 0;
    border-inline-start: none;
    border-top: 1px solid var(--border);
  }
  .external-card {
    margin: 0 auto;
    padding: 16px 14px;
    border-radius: 16px;
    max-width: 100%;
  }
  .external-icon-orb {
    width: 52px;
    height: 42px;
    margin-bottom: 8px;
    border-radius: 12px;
    padding: 5px 8px;
  }
  .external-platform-badge {
    margin-bottom: 8px;
    padding: 3px 10px;
    font-size: 11px;
  }
  .external-card h2 {
    font-size: 16px;
  }
  .external-card p {
    margin-top: 6px;
    font-size: 12.5px;
    line-height: 1.45;
  }
  .external-actions {
    margin-top: 12px;
    gap: 8px;
  }
  .external-actions .btn {
    padding: 9px 12px;
    font-size: 13px;
  }
  .guide-box {
    margin-top: 12px;
    padding: 11px 12px;
    font-size: 11.5px;
  }
}

@media (max-width: 720px) {
  .input,
  .chat-input,
  .media-change-input,
  .queue-input {
    font-size: 16px;
  }
  .topbar {
    height: auto;
    padding: 9px 12px;
    flex-wrap: wrap;
    row-gap: 8px;
  }
  .topbar-left {
    width: 100%;
    justify-content: flex-start;
    gap: 8px;
  }
  .topbar-left .room-code {
    margin-inline-start: auto;
  }
  .topbar-right {
    width: 100%;
    justify-content: space-between;
    gap: 6px;
  }
  .topbar-right .btn-sm {
    white-space: nowrap;
    flex-shrink: 0;
    padding: 7px 11px;
    font-size: 12px;
  }
  .topbar-right .lang-picker {
    padding: 4px 8px;
  }
  .stage-toolbar {
    padding: 8px 12px;
    gap: 8px;
  }
  .stage-toolbar-left {
    min-width: 100%;
  }
  .stage-toolbar-right {
    width: 100%;
    justify-content: space-between;
  }
  .modal-card,
  .modal-card.guide-modal-card {
    padding: 18px 16px;
    max-height: 90dvh;
  }
}

@media (max-width: 520px) {
  .home-shell {
    padding: 18px 12px max(32px, env(safe-area-inset-bottom));
    justify-content: flex-start;
  }
  .home-topbar {
    gap: 8px;
    margin-bottom: 14px;
  }
  .brand {
    font-size: 17px;
    gap: 8px;
  }
  .brand-logo {
    width: 26px;
    height: 26px;
  }
  .topbar-actions {
    gap: 6px;
    flex-wrap: wrap;
    justify-content: flex-end;
  }
  .guide-trigger {
    padding: 5px 9px;
    font-size: 11.5px;
    gap: 5px;
  }
  .lang-picker {
    padding: 4px 8px;
    gap: 4px;
  }
  .lang-select {
    font-size: 11.5px;
  }
  .platform-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .home-card {
    padding: 20px 16px;
    border-radius: 16px;
  }
  .hero-title {
    font-size: 20px;
  }
  .subtitle {
    font-size: 13px;
  }
  .ext-status-bar {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  .reaction-btn {
    padding: 5px 6px;
    font-size: 18px;
  }
}

@media (max-width: 390px) {
  .home-topbar {
    row-gap: 8px;
  }
  .guide-trigger {
    padding: 4px 8px;
    font-size: 11px;
  }
  .lang-picker {
    padding: 4px 7px;
  }
  .lang-select {
    font-size: 11px;
  }
  .platform-card {
    padding: 9px 4px 8px;
  }
  .platform-icon {
    width: 34px;
    height: 34px;
  }
  .platform-icon svg {
    width: 32px;
    height: 32px;
  }
}


/* ================== AUTH & DASHBOARDS (ACCOUNT / ADMIN) ================== */
.home-user-bar {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.user-nav-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 11px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  transition: border-color 0.15s, background 0.15s;
}

.user-nav-pill:hover {
  border-color: var(--gold);
  background: rgba(245, 196, 81, 0.12);
}

.user-nav-pill.admin-pill {
  border-color: rgba(245, 196, 81, 0.55);
  background: rgba(245, 196, 81, 0.14);
  color: #f8d882;
}

.auth-gate {
  margin-top: 10px;
}

.consent-check {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.45;
  cursor: pointer;
}

.consent-check input {
  margin-top: 3px;
  accent-color: var(--gold);
  flex-shrink: 0;
}

.consent-check a {
  color: #f8d882;
  text-decoration: underline;
}

.signed-in-strip {
  margin-top: 16px;
  padding: 10px 12px;
  border-radius: 13px;
  background: rgba(245, 196, 81, 0.06);
  border: 1px solid rgba(245, 196, 81, 0.24);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.signed-in-info {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.signed-in-avatar {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: rgba(245, 196, 81, 0.16);
  border: 1px solid rgba(245, 196, 81, 0.4);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 700;
  color: #f8d882;
  flex-shrink: 0;
}

.signed-in-info strong {
  display: block;
  font-size: 13.5px;
  line-height: 1.2;
}

.signed-in-info small {
  display: block;
  font-size: 11px;
  color: var(--text-muted);
}

.signed-in-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Dashboard Pages (/account & /admin) */
.dash-shell {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 920px;
  margin: 0 auto;
  padding: 24px 16px 56px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.dash-shell.dash-wide {
  max-width: 1140px;
}

.dash-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.dash-nav-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.admin-title-tag {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(245, 196, 81, 0.2);
  color: var(--gold);
  border: 1px solid rgba(245, 196, 81, 0.45);
  margin-inline-start: 6px;
  vertical-align: middle;
}

.dash-card {
  background: var(--surface);
  backdrop-filter: blur(18px);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 22px;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.45);
}

.dash-card h2 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 12px;
}

.dash-muted {
  color: var(--text-muted);
  font-size: 13px;
}

.dash-hero {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.dash-profile-head {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.dash-avatar-orb {
  width: 60px;
  height: 60px;
  border-radius: 16px;
  background: rgba(245, 196, 81, 0.14);
  border: 1px solid rgba(245, 196, 81, 0.45);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  font-weight: 800;
  color: var(--gold);
  flex-shrink: 0;
}

.dash-profile-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.dash-profile-title-row h1 {
  font-size: 22px;
  font-weight: 700;
}

.role-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border);
  color: var(--text-muted);
}

.role-badge.is-admin {
  background: rgba(245, 196, 81, 0.18);
  border-color: rgba(245, 196, 81, 0.5);
  color: #f8d882;
}

.dash-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.dash-stats-grid.admin-stats-5 {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.stat-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.stat-label {
  font-size: 11.5px;
  color: var(--text-muted);
}

.stat-card strong {
  font-size: 24px;
  font-weight: 800;
  color: var(--gold);
  letter-spacing: -0.02em;
}

.dash-two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin: 16px 0;
}

.dash-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.dash-section-head h2 {
  margin-bottom: 0;
}

.form-feedback {
  font-size: 12.5px;
  min-height: 18px;
}

.form-feedback.ok {
  color: #86efac;
}

.form-feedback.err {
  color: #f87171;
}

.admin-tabs {
  margin: 16px 0;
  max-width: 420px;
}

.dash-filter-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.dash-filter-bar .input {
  flex: 1;
  min-width: 180px;
  padding: 9px 12px;
  font-size: 13px;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
}

.dash-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.dash-table th,
.dash-table td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

.dash-table th {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  font-weight: 600;
}

.dash-table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

.nowrap {
  white-space: nowrap;
}

.log-detail-cell {
  max-width: 260px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text-muted);
  font-size: 12px;
}

.log-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.badge-gold {
  background: rgba(245, 196, 81, 0.16);
  color: #f8d882;
  border: 1px solid rgba(245, 196, 81, 0.4);
}

.badge-green {
  background: rgba(34, 197, 94, 0.16);
  color: #86efac;
  border: 1px solid rgba(34, 197, 94, 0.4);
}

.badge-blue {
  background: rgba(59, 130, 246, 0.16);
  color: #93c5fd;
  border: 1px solid rgba(59, 130, 246, 0.4);
}

.badge-red {
  background: rgba(239, 68, 68, 0.16);
  color: #fca5a5;
  border: 1px solid rgba(239, 68, 68, 0.4);
}

.badge-muted {
  background: rgba(255, 255, 255, 0.07);
  color: #d1d5db;
  border: 1px solid var(--border);
}

.room-link-pill {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  padding: 2px 8px;
  border-radius: 6px;
  background: rgba(245, 196, 81, 0.1);
  color: #f8d882;
  border: 1px solid rgba(245, 196, 81, 0.28);
}

.room-link-pill:hover {
  border-color: var(--gold);
}

.danger-card {
  margin-top: 16px;
  border-color: rgba(239, 68, 68, 0.32);
  background: rgba(239, 68, 68, 0.05);
}

.delete-row {
  margin-top: 12px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.delete-row .input {
  flex: 1;
  min-width: 200px;
}

.btn-danger-solid {
  background: rgba(239, 68, 68, 0.2);
  color: #fca5a5;
  border: 1px solid rgba(239, 68, 68, 0.45);
}

.btn-danger-solid:hover {
  background: rgba(239, 68, 68, 0.34);
  color: #fff;
}

@media (max-width: 820px) {
  .dash-two-col {
    grid-template-columns: 1fr;
  }
  .dash-stats-grid,
  .dash-stats-grid.admin-stats-5 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 520px) {
  .dash-shell {
    padding: 16px 12px 44px;
  }
  .dash-card {
    padding: 16px 14px;
    border-radius: 15px;
  }
}


/* ================== GLOBAL KAYIT FORMU STİLLERİ ================== */
input[type="date"],
select.input {
  color-scheme: dark;
}

.field-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.pw-strength-wrap {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-top: -4px;
}

.pw-strength-bar {
  width: 100%;
  height: 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.pw-strength-bar span {
  display: block;
  height: 100%;
  width: 0%;
  border-radius: 999px;
  transition: width 0.2s ease, background 0.2s ease;
}

.pw-strength-bar span.weak {
  background: #ef4444;
}

.pw-strength-bar span.fair {
  background: #f59e0b;
}

.pw-strength-bar span.strong {
  background: linear-gradient(90deg, #22c55e, #f5c451);
}

.pw-strength-hint {
  font-size: 11px;
  color: var(--text-muted);
}

.consent-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid var(--border);
}

.consent-check.optional {
  opacity: 0.85;
}

@media (max-width: 520px) {
  .field-row-2 {
    grid-template-columns: 1fr;
  }
}
