:root {
  --welcome-bg: #131519;
  --welcome-surface: #1c2025;
  --welcome-border: #2a3038;
  --welcome-text: #f8f9fa;
  --welcome-muted: #a7b0ba;
  --welcome-accent: #246fe5;
  --welcome-accent-hover: #1c5bc4;
  --prejoin-bg: #040404;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  background: var(--welcome-bg);
  color: var(--welcome-text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

body { min-height: 100vh; }

#react { min-height: 100vh; }

.welcome {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(1200px 500px at 50% -10%, rgba(36,111,229,0.18), transparent 55%),
    var(--welcome-bg);
}

.welcome-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 32px;
}

.watermark {
  height: 40px;
  width: auto;
}

.header-links a {
  color: var(--welcome-muted);
  text-decoration: none;
  font-size: 14px;
  margin-left: 20px;
}

.header-links a:hover { color: #fff; }

.welcome-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px 16px 64px;
  text-align: center;
}

.welcome-main h1 {
  font-size: clamp(32px, 5vw, 56px);
  font-weight: 700;
  letter-spacing: -0.03em;
  margin: 0 0 12px;
}

.welcome-main p.subtitle {
  color: var(--welcome-muted);
  font-size: 18px;
  max-width: 560px;
  margin: 0 0 36px;
  line-height: 1.5;
}

.room-form {
  display: flex;
  gap: 10px;
  width: min(640px, 100%);
  background: var(--welcome-surface);
  border: 1px solid var(--welcome-border);
  border-radius: 10px;
  padding: 8px;
}

.room-form input {
  flex: 1;
  background: transparent;
  border: 0;
  outline: none;
  color: #fff;
  font-size: 16px;
  padding: 12px 14px;
}

.room-form input::placeholder { color: #6d7782; }

.room-form button,
.btn {
  appearance: none;
  border: 0;
  border-radius: 8px;
  background: var(--welcome-accent);
  color: #fff;
  font-weight: 600;
  font-size: 15px;
  padding: 12px 20px;
  cursor: pointer;
}

.room-form button:hover,
.btn:hover { background: var(--welcome-accent-hover); }

.recent {
  width: min(640px, 100%);
  margin-top: 40px;
  text-align: left;
}

.recent h2 {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--welcome-muted);
  margin: 0 0 12px;
}

.recent-empty {
  background: var(--welcome-surface);
  border: 1px dashed var(--welcome-border);
  border-radius: 10px;
  color: var(--welcome-muted);
  padding: 22px;
  font-size: 14px;
}

.welcome-footer {
  padding: 16px 32px 24px;
  color: #6d7782;
  font-size: 12px;
}

.prejoin {
  min-height: 100vh;
  background: var(--prejoin-bg);
  display: flex;
  flex-direction: column;
}

.prejoin-top {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
}

.prejoin-top .room-label {
  font-weight: 600;
  font-size: 15px;
}

.prejoin-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
  padding: 24px;
}

.preview {
  width: min(720px, 92vw);
  aspect-ratio: 16 / 9;
  background: #1c2025;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--welcome-muted);
  position: relative;
  overflow: hidden;
}

.preview .avatar {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background: #246fe5;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  font-weight: 700;
  color: #fff;
}

.preview .name-tag {
  position: absolute;
  left: 16px;
  bottom: 16px;
  background: rgba(0,0,0,0.55);
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 13px;
}

.prejoin-actions {
  display: flex;
  gap: 12px;
  align-items: center;
}

.btn-ghost {
  background: #2a3038;
}

.btn-ghost:hover { background: #3a424c; }

.toolbar {
  display: flex;
  gap: 10px;
  justify-content: center;
  padding: 18px;
}

.tool {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 0;
  background: #2a3038;
  color: #fff;
  cursor: pointer;
  font-size: 18px;
}

.tool.hangup { background: #e04757; }

.hidden { display: none !important; }
