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

/* The hidden attribute must win over display rules below */
[hidden] {
  display: none !important;
}

:root {
  --blue: #0b5cff;
  --blue-hover: #0a4fd6;
  --text: #1a1a1a;
  --muted: #4a4a4a;
  --border: #e6e6e6;
  --stage-bg: #0d0d0d;
  --card-bg: #262629;
  --card-sub: #a9a9ad;
}

html, body {
  height: 100%;
}

body {
  font-family: "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--text);
  background: #fff;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* ===== Top bar ===== */
.topbar {
  height: 64px;
  flex: 0 0 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  background: #fff;
  border-bottom: 1px solid var(--border);
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 36px;
  flex: 0 0 auto;
}

/* Center nav controls */
.nav-controls {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-arrow {
  width: 34px;
  height: 34px;
  border: none;
  background: none;
  border-radius: 50%;
  color: #3a3a3a;
  display: grid;
  place-items: center;
  cursor: pointer;
}

.nav-arrow:hover {
  background: #f1f1f1;
}

.nav-arrow svg {
  width: 20px;
  height: 20px;
}

/* Search */
.topbar-search {
  flex: 1 1 auto;
  display: flex;
  justify-content: center;
  padding: 0 24px;
}

.search-box {
  position: relative;
  width: 100%;
  max-width: 560px;
  display: flex;
  align-items: center;
  height: 40px;
  background: #f4f4f5;
  border: 1px solid #e2e2e4;
  border-radius: 8px;
  padding: 0 12px;
}

.search-box:focus-within {
  background: #fff;
  border-color: var(--blue);
}

.search-icon {
  width: 18px;
  height: 18px;
  color: #8a8a8f;
  flex: 0 0 auto;
}

.search-input {
  flex: 1 1 auto;
  border: none;
  outline: none;
  background: none;
  font-family: inherit;
  font-size: 14.5px;
  color: var(--text);
  padding: 0 10px;
  text-align: center;
}

.search-input::placeholder {
  color: #6a6a6f;
}

.search-hint {
  flex: 0 0 auto;
  font-size: 13.5px;
  color: #6a6a6f;
}

.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--text);
}

.logo-img {
  height: 28px;
  width: auto;
  display: block;
}

.logo-divider {
  width: 1px;
  height: 24px;
  background: #c9c9c9;
  margin: 0 2px;
}

.logo-sub {
  font-size: 20px;
  font-weight: 600;
  color: #1a1a1a;
}

.topnav {
  display: flex;
  align-items: center;
  gap: 28px;
}

.topnav-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  font-size: 15px;
  font-weight: 500;
  color: var(--text);
  cursor: pointer;
  font-family: inherit;
  text-decoration: none;
}

.caret {
  width: 16px;
  height: 16px;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 18px;
  flex: 0 0 auto;
}

.link-muted {
  font-size: 15px;
  color: var(--text);
  text-decoration: none;
}

.btn {
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  border: none;
  border-radius: 22px;
  padding: 9px 20px;
  cursor: pointer;
  transition: background .15s ease;
}

.btn-soft {
  background: #eaf1ff;
  color: var(--blue);
}

.btn-soft:hover {
  background: #dce8ff;
}

.btn-primary {
  background: var(--blue);
  color: #fff;
}

.btn-primary:hover {
  background: var(--blue-hover);
}

.icon-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: none;
  background: none;
  color: #3a3a3a;
  display: grid;
  place-items: center;
  cursor: pointer;
}

.icon-btn:hover {
  background: #f1f1f1;
}

.icon-btn svg {
  width: 22px;
  height: 22px;
}

.avatar {
  position: relative;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: #6b4a2f;
  color: #fff;
  cursor: pointer;
  display: grid;
  place-items: center;
}

.avatar-initial {
  font-size: 17px;
  font-weight: 600;
}

.avatar-dot {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #f5a623;
  border: 2px solid #6b4a2f;
}

/* ===== Layout ===== */
.layout {
  flex: 1 1 auto;
  display: flex;
  min-height: 0;
}

/* Sidebar */
.sidebar {
  width: 92px;
  flex: 0 0 92px;
  background: #fff;
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 14px 0 18px;
}

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

.nav-tile {
  width: 100%;
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  color: #3a3a3a;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  padding: 10px 0;
  font-size: 12.5px;
  font-weight: 500;
  position: relative;
}

.nav-tile svg {
  width: 24px;
  height: 24px;
}

.nav-tile:hover {
  color: var(--blue);
}

.nav-tile.active {
  color: var(--blue);
}

.nav-tile.active::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  bottom: 8px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--blue);
}

/* Stage */
.stage {
  position: relative;
  flex: 1 1 auto;
  background: var(--stage-bg);
  display: grid;
  place-items: center;
  padding: 24px;
}

/* In-meeting view */
.meeting-view {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
}

.gallery {
  --cols: 3;
  display: grid;
  grid-template-columns: repeat(var(--cols), minmax(0, 1fr));
  gap: 14px;
  width: 100%;
  max-width: 1040px;
  max-height: 100%;
}

.participant-tile {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #1c1c1f;
  border-radius: 10px;
  overflow: hidden;
  display: grid;
  place-items: center;
}

.participant-tile.is-you {
  outline: 2px solid var(--blue);
  outline-offset: -2px;
}

.tile-avatar {
  width: 92px;
  height: 92px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 40px;
  font-weight: 500;
  color: #fff;
  line-height: 1;
}

.name-label {
  position: absolute;
  left: 10px;
  bottom: 8px;
  display: flex;
  align-items: center;
  gap: 7px;
  background: rgba(0, 0, 0, .55);
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  padding: 5px 11px 5px 9px;
  border-radius: 4px;
}

.name-mic {
  width: 16px;
  height: 16px;
  color: #37d67a;
}

.name-mic.is-muted {
  color: #e23b3b;
}

.join-card {
  width: 640px;
  max-width: 100%;
  background: var(--card-bg);
  border-radius: 16px;
  padding: 44px 40px 36px;
  text-align: center;
  box-shadow: 0 10px 40px rgba(0,0,0,.35);
}

/* Illustration */
.illustration {
  display: grid;
  place-items: center;
  margin-bottom: 26px;
}

.illu-img {
  width: 220px;
  max-width: 100%;
  height: auto;
  display: block;
}

/* Text */
.join-title {
  font-size: 21px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 10px;
}

.join-sub {
  font-size: 15px;
  color: var(--card-sub);
  margin-bottom: 26px;
}

.btn-join {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 26px;
  font-size: 15.5px;
  border-radius: 8px;
  margin-bottom: 18px;
}

.btn-join svg { width: 22px; height: 22px; }

.link-join {
  display: block;
  margin: 0 auto;
  background: none;
  border: none;
  color: #5aa0ff;
  font-size: 15px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
}

.link-join:hover {
  text-decoration: underline;
}

/* ===== Update-required popup ===== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .6);
  display: grid;
  place-items: center;
  z-index: 100;
  padding: 24px;
}

.modal {
  width: 420px;
  max-width: 100%;
  background: var(--card-bg);
  border-radius: 14px;
  padding: 34px 32px 30px;
  text-align: center;
  box-shadow: 0 16px 50px rgba(0, 0, 0, .5);
}

.modal-icon {
  width: 60px;
  height: 60px;
  margin: 0 auto 18px;
  border-radius: 50%;
  background: rgba(11, 92, 255, .15);
  color: #5aa0ff;
  display: grid;
  place-items: center;
}

.modal-icon svg {
  width: 30px;
  height: 30px;
}

.modal-title {
  font-size: 20px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 10px;
}

.modal-desc {
  font-size: 15px;
  line-height: 1.5;
  color: var(--card-sub);
  margin-bottom: 24px;
}

.modal-btn {
  width: 100%;
  border-radius: 8px;
  padding: 11px 0;
}

.modal-btn:disabled {
  opacity: .7;
  cursor: default;
}

/* Responsive */
@media (max-width: 720px) {
  .topnav, .link-muted, .logo-sub, .logo-divider { display: none; }
  .join-card { padding: 32px 22px; }
  .join-title { font-size: 18px; }
}
