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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: #0a0f1e;
  color: #f0f0f0;
  min-height: 100vh;
}

.bg-grid {
  position: fixed; inset: 0; z-index: 0;
  background-image:
    linear-gradient(rgba(59,130,246,0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(59,130,246,0.05) 1px, transparent 1px);
  background-size: 40px 40px;
}

.container {
  position: relative; z-index: 1;
  display: flex; align-items: center; justify-content: center;
  min-height: 100vh; padding: 2rem;
}

.glass-card {
  background: rgba(255,255,255,0.05);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 20px;
  padding: 2.5rem;
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
}

.lobby-card { width: 100%; max-width: 460px; }

.logo-wrap { text-align: center; margin-bottom: 1.5rem; }
.logo { height: 48px; margin-bottom: 0.5rem; }
.brand { font-size: 1.3rem; font-weight: 600; color: #e2e8f0; letter-spacing: -0.02em; }

.alex-wrap {
  display: flex; align-items: center; gap: 1rem;
  background: rgba(59,130,246,0.08);
  border: 1px solid rgba(59,130,246,0.2);
  border-radius: 14px; padding: 1rem 1.2rem;
  margin-bottom: 1.8rem;
}

.alex-avatar-ring {
  width: 56px; height: 56px; border-radius: 50%;
  border: 2px solid #3b82f6;
  overflow: hidden; flex-shrink: 0; position: relative;
  background: #1e293b;
  display: flex; align-items: center; justify-content: center;
}

.alex-avatar { width: 100%; height: 100%; object-fit: cover; }
.avatar-fallback {
  font-size: 1.2rem; font-weight: 700; color: #3b82f6;
  position: absolute;
}

.alex-name { font-weight: 600; color: #f1f5f9; font-size: 1rem; }
.alex-title { color: #64748b; font-size: 0.8rem; margin-top: 2px; }
.status-dot {
  display: inline-block; width: 8px; height: 8px;
  background: #22c55e; border-radius: 50%; margin-right: 5px; margin-top: 6px;
  animation: pulse 2s infinite;
}
.status-text { font-size: 0.78rem; color: #22c55e; vertical-align: middle; }

@keyframes pulse {
  0%, 100% { opacity: 1; } 50% { opacity: 0.4; }
}

.join-heading { font-size: 1.1rem; font-weight: 600; color: #e2e8f0; margin-bottom: 0.4rem; }
.join-sub { color: #64748b; font-size: 0.87rem; margin-bottom: 1.4rem; }

.join-form { display: flex; flex-direction: column; gap: 0.8rem; }

.name-input {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 10px;
  padding: 0.85rem 1rem;
  color: #f0f0f0; font-size: 0.95rem;
  outline: none; transition: border-color 0.2s;
}
.name-input::placeholder { color: #475569; }
.name-input:focus { border-color: #3b82f6; }

.join-btn {
  background: #3b82f6;
  border: none; border-radius: 10px;
  padding: 0.9rem; color: #fff;
  font-size: 0.95rem; font-weight: 600;
  cursor: pointer; transition: background 0.2s, transform 0.1s;
}
.join-btn:hover { background: #2563eb; }
.join-btn:active { transform: scale(0.98); }

.secure-note { text-align: center; color: #475569; font-size: 0.78rem; margin-top: 1.2rem; }

/* Meet layout */
.meet-layout {
  position: relative; z-index: 1;
  display: grid;
  grid-template-rows: auto 1fr auto;
  height: 100vh;
}

.meet-header {
  display: flex; align-items: center; gap: 1rem;
  padding: 0.8rem 1.5rem;
  background: rgba(10,15,30,0.9);
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.meet-logo { height: 28px; }
.meet-brand { font-weight: 600; color: #e2e8f0; font-size: 0.95rem; }
.rec-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: #ef4444; animation: pulse 1.5s infinite; margin-left: auto;
}
.room-status { color: #94a3b8; font-size: 0.85rem; }
.header-right { display: flex; align-items: center; gap: 1rem; }
.participant-count { color: #64748b; font-size: 0.82rem; }
.leave-btn {
  background: #ef4444; border: none; border-radius: 8px;
  padding: 0.4rem 1rem; color: #fff; font-size: 0.85rem;
  cursor: pointer; font-weight: 600;
}

.meet-main {
  display: flex; gap: 1rem; padding: 1rem;
  background: #060b17; overflow: hidden; position: relative;
}

.video-grid {
  flex: 1; display: flex; flex-wrap: wrap;
  gap: 1rem; align-content: flex-start;
}

.alex-tile {
  width: 280px; height: 200px;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  position: relative;
}
.tile-avatar { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; }
.tile-avatar-fallback {
  width: 72px; height: 72px; border-radius: 50%;
  background: #1e293b; border: 2px solid #3b82f6;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem; font-weight: 700; color: #3b82f6;
}
.tile-name { margin-top: 0.6rem; font-size: 0.85rem; color: #e2e8f0; }
.ai-badge {
  background: #3b82f6; color: #fff;
  font-size: 0.65rem; font-weight: 700;
  padding: 1px 5px; border-radius: 4px; margin-left: 4px;
}
.audio-viz { width: 100%; height: 24px; position: absolute; bottom: 12px; }

.local-tile-wrap {
  width: 200px; flex-shrink: 0;
  display: flex; flex-direction: column; align-items: center; gap: 0.5rem;
}
.local-video {
  width: 100%; border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.1);
  background: #0f172a; aspect-ratio: 4/3;
}
.local-name { color: #94a3b8; font-size: 0.8rem; }

.meet-footer {
  display: flex; align-items: center; justify-content: center;
  gap: 1rem; padding: 1rem;
  background: rgba(10,15,30,0.95);
  border-top: 1px solid rgba(255,255,255,0.08);
}
.ctrl-btn {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 10px; padding: 0.6rem 1.4rem;
  color: #e2e8f0; font-size: 0.9rem; cursor: pointer;
  transition: background 0.2s;
}
.ctrl-btn:hover { background: rgba(255,255,255,0.14); }
.ctrl-btn.danger { background: rgba(239,68,68,0.15); border-color: rgba(239,68,68,0.4); color: #f87171; }
.ctrl-btn.danger:hover { background: rgba(239,68,68,0.25); }
.ctrl-btn.muted { background: rgba(239,68,68,0.1); color: #f87171; }
