:root {
  --bg-primary: #060911;
  --bg-card: rgba(15, 20, 32, 0.78);
  --bg-card-border: rgba(255, 255, 255, 0.08);
  --bg-card-hover: rgba(22, 28, 45, 0.9);
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  --accent-primary: #6366f1;
  --accent-secondary: #ec4899;
  --accent-cyan: #06b6d4;
  --accent-emerald: #10b981;
  --accent-amber: #f59e0b;
  --accent-rose: #f43f5e;
  --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --radius-lg: 24px;
  --radius-md: 14px;
  --radius-sm: 8px;
}

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

body {
  background-color: var(--bg-primary);
  color: var(--text-main);
  font-family: var(--font-family);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  overflow-x: hidden;
  position: relative;
}

/* Dynamic Interactive Animated Background Mesh */
.ambient-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  z-index: -1;
  pointer-events: none;
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.38;
  animation: float 22s infinite alternate ease-in-out;
}

.orb-1 {
  width: 520px;
  height: 520px;
  top: -12%;
  left: 15%;
  background: radial-gradient(circle, #6366f1 0%, rgba(99, 102, 241, 0) 70%);
}

.orb-2 {
  width: 480px;
  height: 480px;
  bottom: -10%;
  right: 15%;
  background: radial-gradient(circle, #ec4899 0%, rgba(236, 72, 153, 0) 70%);
  animation-duration: 26s;
  animation-delay: -5s;
}

.orb-3 {
  width: 380px;
  height: 380px;
  top: 40%;
  right: 30%;
  background: radial-gradient(circle, #06b6d4 0%, rgba(6, 182, 212, 0) 70%);
  animation-duration: 30s;
  animation-delay: -10s;
}

@keyframes float {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(60px, 40px) scale(1.12); }
  100% { transform: translate(-40px, -60px) scale(0.92); }
}

.container {
  width: 100%;
  max-width: 480px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  position: relative;
  z-index: 1;
}

/* Header Bar */
.header-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 4px;
}

.logo-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 14px;
  letter-spacing: -0.2px;
  color: var(--text-muted);
}

.nav-link {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--bg-card-border);
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}

.nav-link:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.15);
}

/* Main Card */
.glass-card {
  background: var(--bg-card);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  border: 1px solid var(--bg-card-border);
  border-radius: var(--radius-lg);
  padding: 30px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.65), 0 0 0 1px rgba(255, 255, 255, 0.03);
  display: flex;
  flex-direction: column;
  gap: 22px;
}

/* Profile Photos / Selector */
.profile-section {
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-items: center;
}

.section-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--text-dim);
  font-weight: 600;
}

.profile-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  width: 100%;
}

.profile-btn {
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid var(--bg-card-border);
  border-radius: var(--radius-md);
  padding: 16px 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  color: var(--text-main);
  font-size: 14px;
  font-weight: 600;
}

.profile-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, 0.12);
  transition: all 0.25s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.profile-btn:hover {
  background: var(--bg-card-hover);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

.profile-btn:hover .profile-avatar {
  transform: scale(1.05);
  border-color: rgba(255, 255, 255, 0.4);
}

.profile-btn.active {
  background: linear-gradient(145deg, rgba(99, 102, 241, 0.12) 0%, rgba(236, 72, 153, 0.12) 100%);
  border-color: rgba(168, 85, 247, 0.6);
  box-shadow: 0 0 25px rgba(168, 85, 247, 0.22);
}

.profile-btn.active .profile-avatar {
  border-color: #a855f7;
  box-shadow: 0 0 16px rgba(168, 85, 247, 0.45);
}

/* Dual Avatars for Lock Screen */
.lock-avatar-group {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 6px;
}

.lock-avatar {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  object-fit: cover;
  border: 2.5px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.5);
}

.lock-avatar:first-child {
  margin-right: -14px;
  z-index: 1;
}

.lock-avatar:last-child {
  z-index: 2;
}

/* Status Banner */
.status-banner {
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid var(--bg-card-border);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.status-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 9999px;
  background: rgba(16, 185, 129, 0.12);
  color: var(--accent-emerald);
  border: 1px solid rgba(16, 185, 129, 0.25);
}

.status-badge.waiting {
  background: rgba(245, 158, 11, 0.12);
  color: var(--accent-amber);
  border-color: rgba(245, 158, 11, 0.25);
}

.status-badge.empty {
  background: rgba(148, 163, 184, 0.1);
  color: var(--text-muted);
  border-color: rgba(148, 163, 184, 0.2);
}

.pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: currentColor;
  box-shadow: 0 0 8px currentColor;
  animation: pulse 1.8s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.35; transform: scale(0.85); }
}

.status-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-main);
}

.status-subtitle {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.45;
}

/* Participant chips */
.participants-row {
  display: flex;
  gap: 10px;
  align-items: center;
}

.participant-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--bg-card-border);
  padding: 4px 12px 4px 4px;
  border-radius: 9999px;
  font-size: 12px;
  color: var(--text-muted);
}

.participant-chip.online {
  color: var(--text-main);
  border-color: rgba(16, 185, 129, 0.35);
  background: rgba(16, 185, 129, 0.08);
}

.chip-avatar {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  object-fit: cover;
}

.participant-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--text-dim);
}

.participant-chip.online .participant-dot {
  background: var(--accent-emerald);
  box-shadow: 0 0 6px var(--accent-emerald);
}

/* Room Link Section */
.link-box {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid var(--bg-card-border);
  padding: 10px 14px;
  border-radius: var(--radius-md);
}

.link-text {
  font-family: monospace;
  font-size: 13px;
  color: var(--accent-cyan);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
}

.copy-btn {
  background: rgba(255, 255, 255, 0.06);
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 500;
  transition: all 0.2s ease;
}

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

/* Action Buttons */
.btn-primary {
  background: linear-gradient(135deg, #6366f1 0%, #ec4899 100%);
  color: #ffffff;
  border: none;
  border-radius: var(--radius-md);
  padding: 15px 20px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s ease;
  box-shadow: 0 8px 24px -4px rgba(99, 102, 241, 0.4);
  text-decoration: none;
  width: 100%;
}

.btn-primary:hover {
  transform: translateY(-1.5px);
  box-shadow: 0 12px 28px -4px rgba(236, 72, 153, 0.45);
  opacity: 0.96;
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-row {
  display: flex;
  gap: 10px;
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-muted);
  border: 1px solid var(--bg-card-border);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.btn-secondary:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.15);
}

.btn-secondary.danger:hover {
  color: var(--accent-rose);
  border-color: rgba(244, 63, 94, 0.4);
  background: rgba(244, 63, 94, 0.1);
}

/* Countdown bar */
.countdown-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-dim);
  padding: 0 4px;
}

.countdown-timer {
  font-family: monospace;
  font-weight: 600;
  color: var(--accent-amber);
}

/* Footer note */
.footer-note {
  text-align: center;
  font-size: 12px;
  color: var(--text-dim);
  line-height: 1.5;
}

.footer-note a {
  color: var(--text-muted);
  text-decoration: underline;
}

/* Form Styles */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-main);
}

.form-group .hint {
  font-size: 11px;
  color: var(--text-dim);
  line-height: 1.4;
}

.form-input {
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid var(--bg-card-border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-size: 14px;
  color: var(--text-main);
  font-family: inherit;
  transition: border-color 0.2s ease;
}

.form-input:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.25);
}

.oauth-badge {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid var(--bg-card-border);
  border-radius: var(--radius-sm);
}
