:root {
  --primary: #4F46E5;
  --primary-hover: #4338CA;
  --secondary: #ec4899;
  --secondary-hover: #db2777;
  --bg-dark: #0f172a;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --glass-bg: rgba(30, 41, 59, 0.7);
  --glass-border: rgba(255, 255, 255, 0.1);
  --glass-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  --danger: #ef4444;
}

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

body {
  font-family: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  background-color: var(--bg-dark);
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  position: relative;
}

/* Glassmorphism Auth Strip */
.glass-strip {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--glass-border);
  padding: 0.8rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
  z-index: 1000;
}

.brand {
  font-weight: 800;
  letter-spacing: 1px;
  background: linear-gradient(to right, #60a5fa, #c084fc);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-size: 1.1rem;
}

#auth-info a {
  color: #93c5fd;
  text-decoration: none;
  transition: color 0.2s ease;
}

#auth-info a:hover {
  color: #bfdbfe;
  text-decoration: underline;
}

/* Background Animations */
.blob {
  position: absolute;
  filter: blur(80px);
  z-index: -1;
  opacity: 0.6;
  animation: float 10s infinite ease-in-out alternate;
}

.blob-1 {
  top: -10%;
  left: -10%;
  width: 50vw;
  height: 50vw;
  background: radial-gradient(circle, rgba(79,70,229,0.4) 0%, rgba(0,0,0,0) 70%);
  animation-delay: 0s;
}

.blob-2 {
  bottom: -20%;
  right: -10%;
  width: 60vw;
  height: 60vw;
  background: radial-gradient(circle, rgba(236,72,153,0.3) 0%, rgba(0,0,0,0) 70%);
  animation-delay: -3s;
}

.blob-3 {
  top: 40%;
  left: 30%;
  width: 40vw;
  height: 40vw;
  background: radial-gradient(circle, rgba(56,189,248,0.2) 0%, rgba(0,0,0,0) 70%);
  animation-delay: -6s;
}

@keyframes float {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(5%, 10%) scale(1.1); }
}

/* Main Container */
.home-container {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 5rem 1rem 2rem;
  z-index: 1;
}

.glass-panel {
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  border-radius: 24px;
  padding: 3rem;
  width: 100%;
  max-width: 800px;
  box-shadow: var(--glass-shadow);
  transform: translateY(0);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.glass-panel:hover {
  transform: translateY(-5px);
  box-shadow: 0 30px 60px -12px rgba(0, 0, 0, 0.6);
}

/* Hero Section */
.hero-section {
  text-align: center;
  margin-bottom: 3rem;
}

.title {
  font-size: 4rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
  background: linear-gradient(135deg, #e0e7ff 0%, #a5b4fc 50%, #fbcfe8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: -1px;
}

.subtitle {
  font-size: 1.25rem;
  color: var(--text-muted);
  font-weight: 300;
  letter-spacing: 2px;
  text-transform: uppercase;
}

/* Actions */
.actions {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

@media (min-width: 768px) {
  .actions {
    flex-direction: row;
    align-items: center;
  }
}

.action-card {
  flex: 1;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 16px;
  padding: 2rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  height: 100%;
  transition: background 0.3s ease;
}

.action-card:hover {
  background: rgba(255, 255, 255, 0.06);
}

.action-card h2 {
  font-size: 1.5rem;
  margin-bottom: 0.75rem;
  font-weight: 600;
}

.action-card p {
  color: var(--text-muted);
  margin-bottom: 2rem;
  font-size: 0.95rem;
  line-height: 1.5;
  flex-grow: 1;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  padding: 1rem 1.5rem;
  font-size: 1.1rem;
  font-weight: 600;
  font-family: inherit;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn:active {
  transform: scale(0.97);
}

.icon {
  width: 20px;
  height: 20px;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), #818cf8);
  color: white;
  box-shadow: 0 4px 14px 0 rgba(79, 70, 229, 0.39);
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--primary-hover), #6366f1);
  box-shadow: 0 6px 20px rgba(79, 70, 229, 0.5);
}

.btn-secondary {
  background: linear-gradient(135deg, var(--secondary), #f472b6);
  color: white;
  box-shadow: 0 4px 14px 0 rgba(236, 72, 153, 0.39);
}

.btn-secondary:hover {
  background: linear-gradient(135deg, var(--secondary-hover), #ec4899);
  box-shadow: 0 6px 20px rgba(236, 72, 153, 0.5);
}

/* Forms */
.join-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.input-modern {
  width: 100%;
  padding: 1rem 1.25rem;
  background: rgba(15, 23, 42, 0.5);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  color: white;
  font-size: 1.1rem;
  font-family: inherit;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 2px;
  transition: all 0.2s ease;
}

.input-modern::placeholder {
  color: rgba(148, 163, 184, 0.5);
  text-transform: none;
  letter-spacing: normal;
}

.input-modern:focus {
  outline: none;
  border-color: var(--secondary);
  box-shadow: 0 0 0 3px rgba(236, 72, 153, 0.2);
  background: rgba(15, 23, 42, 0.8);
}

/* Divider */
.divider {
  display: flex;
  align-items: center;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 1rem 0;
}

.divider::before,
.divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid var(--glass-border);
}

.divider span {
  padding: 0 1rem;
}

@media (min-width: 768px) {
  .divider {
    flex-direction: column;
    padding: 0 2rem;
  }
  
  .divider::before,
  .divider::after {
    border-bottom: none;
    border-left: 1px solid var(--glass-border);
    height: 100px;
  }
  
  .divider span {
    padding: 1rem 0;
  }
}

/* Utilities */
.error-message {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #fca5a5;
  padding: 1rem;
  border-radius: 12px;
  margin-bottom: 2rem;
  text-align: center;
  font-weight: 500;
}

.error-message[hidden] {
  display: none;
}

.active-room-banner {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  background: rgba(74, 222, 128, 0.1);
  border: 1px solid rgba(74, 222, 128, 0.3);
  color: #86efac;
  padding: 0.75rem 1rem;
  border-radius: 12px;
  margin-bottom: 2rem;
  font-weight: 500;
}
.active-room-banner[hidden] { display: none; }
.btn-sm {
  padding: 0.35rem 0.9rem;
  font-size: 0.85rem;
  border-radius: 8px;
  background: rgba(74, 222, 128, 0.2);
  border: 1px solid rgba(74, 222, 128, 0.4);
  color: #86efac; text-decoration: none; white-space: nowrap;
}
.btn-sm:hover { background: rgba(74, 222, 128, 0.3); }
