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

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: radial-gradient(circle at top, #26252a 0%, #050509 55%, #010103 100%);
  color: #eee;
  height: 100vh;
  overflow: hidden;
}

#app {
  height: 100%;
  display: flex;
  flex-direction: column;
}

.top-bar {
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  background: linear-gradient(to bottom, #131318, #050509);
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

.logo {
  letter-spacing: 4px;
  font-weight: 600;
  font-size: 18px;
}

.top-menu {
  display: flex;
  gap: 16px;
  font-size: 14px;
  opacity: 0.7;
}

.top-item.active {
  opacity: 1;
}

.user-online {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  opacity: 0.8;
}

.odometer {
  display: inline-flex;
  overflow: hidden;
  height: 20px;
}

.odometer .digit {
  width: 14px;
  text-align: center;
  perspective: 200px;
  position: relative;
}

.odometer .digit span {
  display: block;
  transition: transform 0.5s ease-out;
  transform-style: preserve-3d;
}

.layout {
  flex: 1;
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr) 220px;
  gap: 12px;
  padding: 12px 16px 16px;
}

/* Left panel */

.left-panel {
  background: rgba(10,10,14,0.9);
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.08);
  padding: 12px;
  display: flex;
  flex-direction: column;
}

.left-title {
  font-size: 14px;
  margin-bottom: 8px;
  letter-spacing: 1px;
  text-transform: uppercase;
  opacity: 0.8;
}

.chat-list {
  flex: 1;
  overflow-y: auto;
  padding-right: 4px;
  font-size: 13px;
}

.chat-item {
  margin-bottom: 6px;
}

.chat-name {
  font-weight: 600;
  margin-right: 4px;
}

.chat-text {
  opacity: 0.9;
}

.chat-input-row {
  display: flex;
  margin-top: 8px;
  gap: 4px;
}

.chat-input-row input {
  flex: 1;
  background: rgba(255,255,255,0.03);
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.08);
  color: #eee;
  padding: 6px 8px;
  font-size: 13px;
}

.chat-input-row button {
  width: 36px;
  border-radius: 8px;
  border: none;
  background: rgba(255,255,255,0.12);
  color: #eee;
  cursor: pointer;
}

/* Center */

.center-panel {
  background: radial-gradient(circle at top, #191821, #07060b 55%, #030307 100%);
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,0.1);
  padding: 10px 14px 12px;
  display: flex;
  flex-direction: column;
}

.filters {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: 10px;
}

.filter-btn {
  background: rgba(12,12,18,0.9);
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.14);
  color: #ddd;
  padding: 4px 14px;
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
}

.video-row {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.video-wrapper {
  background: #050509;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,0.08);
  overflow: hidden;
  position: relative;
}

video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.controls {
  margin: 10px auto 6px;
  display: flex;
  gap: 12px;
}

.btn-primary, .btn-secondary {
  min-width: 120px;
  padding: 8px 18px;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  letter-spacing: 0.12em;
  font-size: 13px;
  text-transform: uppercase;
}

.btn-primary {
  background: linear-gradient(to right, #ffb45e, #ff7b3d);
  color: #111;
  font-weight: 600;
}

.btn-secondary {
  background: rgba(255,255,255,0.1);
  color: #eee;
}

/* Bottom row: profile + private chat */

.bottom-row {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 12px;
  margin-top: 6px;
  min-height: 150px;
}

.profile-card {
  display: flex;
  gap: 10px;
  align-items: center;
  background: rgba(8,8,12,0.9);
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.08);
  padding: 10px;
}

.profile-avatar {
  width: 72px;
  height: 72px;
  border-radius: 999px;
  overflow: hidden;
  border: 2px solid rgba(255,255,255,0.16);
  background: #111;
}

.profile-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.profile-nick {
  font-weight: 600;
}

.profile-age {
  font-size: 13px;
  opacity: 0.8;
}

.private-chat {
  background: rgba(8,8,12,0.9);
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.08);
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
}

.private-header {
  font-size: 13px;
  margin-bottom: 4px;
  opacity: 0.8;
}

/* Right panel */

.right-panel {
  background: rgba(10,10,14,0.9);
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.08);
  padding: 12px;
}

.right-title {
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  opacity: 0.8;
  margin-bottom: 12px;
}

.viewers-count {
  font-family: "SF Mono", Menlo, Monaco, Consolas, monospace;
  font-size: 26px;
  letter-spacing: 0.2em;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.1);
  background: radial-gradient(circle at top, #1f1c2a, #050508);
  text-align: center;
}

.right-note {
  margin-top: 10px;
  font-size: 12px;
  opacity: 0.7;
}

/* Modal */

.modal {
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at top, rgba(0,0,0,0.9), rgba(0,0,0,0.98));
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 20;
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.3s;
}

.modal.visible {
  visibility: visible;
  opacity: 1;
}

.modal-content {
  width: 420px;
  background: #08070c;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,0.16);
  padding: 20px 22px 18px;
}

.modal-content h2 {
  margin-bottom: 6px;
}

.modal-content p {
  font-size: 13px;
  opacity: 0.8;
}

.modal-row {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.modal-row label {
  font-size: 13px;
  opacity: 0.9;
}

.modal-row input {
  background: rgba(255,255,255,0.04);
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.16);
  color: #eee;
  padding: 7px 10px;
}

.cam-row {
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.cam-preview {
  width: 200px;
  height: 130px;
  background: #000;
  border-radius: 12px;
  overflow: hidden;
  position: relative;
}

#setupVideo, #setupCanvas {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

#setupCanvas {
  position: absolute;
  inset: 0;
  display: none;
}

.modal-actions {
  margin-top: 12px;
  text-align: right;
}

.modal-actions button {
  padding: 8px 16px;
  border-radius: 999px;
  border: none;
  background: linear-gradient(to right, #ffb45e, #ff7b3d);
  color: #111;
  cursor: pointer;
  font-weight: 600;
}

.modal-note {
  margin-top: 6px;
  font-size: 11px;
  opacity: 0.6;
}

/* Scrollbars */

.chat-list::-webkit-scrollbar {
  width: 4px;
}

.chat-list::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.2);
  border-radius: 2px;
}