/* styles.css - black & gold luxury style for Agora group audio + login */
:root {
  --bg: #000000;
  --card: #0d0d0d;
  --muted: #b8a260;
  --accent: #ffd700; /* gold */
  --accent-soft: #c9a33a;
  --danger: #ff4c4c;
  --text: #f9f9f9;
  --soft: #141414;
  --glass: rgba(255, 215, 0, 0.08);
  --shadow: rgba(255, 215, 0, 0.2);
}

* {
  box-sizing: border-box;
  font-family: 'Inter', system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

html, body, #app {
  height: 100%;
  margin: 0;
  background: linear-gradient(180deg, #0a0a0a 0%, #000 100%);
  color: var(--text);
}

.app-shell {
  display: flex;
  flex-direction: column;
  height: 100vh;
  max-width: 420px;
  margin: 0; /* left-positioned */
  border-left: 1px solid rgba(255, 255, 255, 0.02);
  border-right: 1px solid rgba(255, 255, 255, 0.02);
  box-shadow: 0 10px 40px rgba(2, 6, 23, 0.6);
  overflow: auto;
  background:url('https://toppng.com/uploads/preview/audio-track-icon-audio-icons-115631623304bsj5caboo.png' center/cover fixed);
}

/* ============================================= */
/* HOST ROOM APP SHELL                           */
/* ============================================= */

/* Header / Topbar */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  background: linear-gradient(180deg, #111 0%, #000 100%);
  border-bottom: 1px solid rgba(255, 215, 0, 0.15);
}

.icon-btn {
  background: none;
  border: none;
  color: var(--accent);
  font-size: 18px;
  padding: 6px;
  border-radius: 50%;
  transition: background 0.2s;
}
.icon-btn:hover {
  background: rgba(255, 215, 0, 0.08);
}

.title {
  flex: 1;
  text-align: center;
}
.title-main {
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.2px;
  color: var(--accent);
}
.title-sub {
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
}

/* Main Content */
.content {
  flex: 1;
  padding: 18px;
  overflow-y: auto;
}

.call-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}

/* Participant Cards */
.participants {
  display: flex;          /* horizontal row */
  gap: 10px;              /* space between cards */
  flex-wrap: wrap;         /* wrap if too many users */
}

.participant-card {
    display: flex;
    text-align: justify;
    width: 100%;
    padding: 5px 10px;
    border-radius: 5px;
    background-color: #565353;
    transition: background-color 0.2s;
}
.participant-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(255, 215, 0, 0.15);
}

.participant-card.speaking {
  background-color: yellow;
}

.p-info {
  flex: 1;
  display: flex;
  flex-direction: column;
}
.p-name {
  font-weight: 600;
  font-size: 14px;
  color: var(--text);
}
.p-muted {
  font-size: 12px;
  color: var(--muted);
  margin-top: 4px;
}

/* Controls (Bottom Navigation) */
.controls {
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding: 12px;
  background: linear-gradient(180deg, rgba(255, 215, 0, 0.05), rgba(0,0,0,0.9));
  border-top: 1px solid rgba(255, 215, 0, 0.15);
}

.control-btn {
  flex: 1;
  margin: 0 6px;
  padding: 12px;
  border-radius: 12px;
  border: none;
  background: linear-gradient(135deg, var(--accent), var(--accent-soft));
  color: #000;
  font-weight: 700;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  box-shadow: 0 0 12px rgba(255, 215, 0, 0.4);
  transition: background 0.2s, transform 0.1s;
}
.control-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 18px rgba(255, 215, 0, 0.6);
}
.control-btn.danger {
  background: linear-gradient(135deg, #ff4c4c, #ff1f1f);
  color: #fff;
  box-shadow: 0 0 14px rgba(255, 0, 0, 0.4);
}

/* Log */
.log {
  position: fixed;
  bottom: 90px;
  right: 10px;
  width: 260px;
  max-height: 220px;
  overflow-y: auto;
  font-size: 11px;
  color: var(--muted);
  background: rgba(0, 0, 0, 0.7);
  border: 1px solid rgba(255, 215, 0, 0.15);
  border-radius: 8px;
  padding: 8px;
  display: none;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
  width: 6px;
}
::-webkit-scrollbar-thumb {
  background: var(--accent-soft);
  border-radius: 4px;
}

/* ============================================= */
/* LOGIN PAGE STYLES (same layout as screenshot) */
/* ============================================= */
.login-left {
  width: 100%;
  background: linear-gradient(180deg, #0a0a0a 0%, #000 100%);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-right: 1px solid #111;
}

.login-right {
  flex: 1;
  background: radial-gradient(circle at right, #0a0a0a 0%, #000 70%);
}

.login-form-wrapper {
  padding: 0 32px;
}

.form-heading {
  color: var(--accent);
  font-size: 1.4rem;
  margin-bottom: 18px;
}

.input-wrapper {
  position: relative;
  margin-bottom: 16px;
}

.input-wrapper i {
  position: absolute;
  top: 50%;
  left: 12px;
  transform: translateY(-50%);
  color: var(--accent);
  font-size: 1rem;
}

.input-wrapper input {
  width: 100%;
  padding: 12px 14px 12px 40px;
  border-radius: 8px;
  border: 1px solid #333;
  background-color: #111;
  color: #fff;
  font-size: 0.95rem;
  outline: none;
}

.input-wrapper input::placeholder {
  color: #999;
}

.input-wrapper input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 5px rgba(255, 215, 0, 0.4);
}

.btn-primary {
  width: 100%;
  background-color: var(--accent);
  color: #000;
  font-weight: 600;
  padding: 12px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.3s ease;
}

.btn-primary:hover {
  background-color: #e6c200;
}

.forgot-password {
  display: block;
  text-align: center;
  color: var(--accent);
  font-size: 0.9rem;
  margin-top: 8px;
  text-decoration: none;
}
.forgot-password:hover {
  text-decoration: underline;
}

.error-box {
  background-color: rgba(255, 0, 0, 0.1);
  border: 1px solid red;
  color: #ff6b6b;
  padding: 10px;
  border-radius: 8px;
  text-align: left;
  font-size: 0.9rem;
  margin-bottom: 12px;
}

.footer {
  text-align: left;
  padding: 12px 32px;
  font-size: 0.8rem;
  color: #666;
  border-top: 1px solid #111;
}
.avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #ccc;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 5px;
  font-weight: bold;
}

.mic-icon {
  margin-right: 5px;
  font-size: 18px;
  color: black;
  transition: color 0.2s;
}

.mic-icon.speaking {
  color: green;
  animation: pulse 1s infinite;
}

.username-label {
  font-weight: bold;
  margin-right: 5px;
}
.bottom-menu {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: space-around;
    background: #111;
    padding: 10px 0;
    box-shadow: 0 -2px 5px rgba(0,0,0,0.3);
    z-index: 999;
}
.room-list {
    margin-bottom: 20px; /* leave space for bottom menu */
}

.self-participant { 
    display:flex; 
    align-items:center; 
    gap:10px; 
    margin-bottom:10px; 
    position: relative;
}
.self-participant .avatar { 
    width:50px; 
    height:50px; 
    border-radius:50%; 
    background:#ccc; 
    display:flex; 
    align-items:center; 
    justify-content:center; 
    font-weight:bold; 
    transition: transform 0.2s, box-shadow 0.2s;
}
.self-participant.speaking .avatar {
    animation: pulse-circle 1s infinite;
}

@keyframes pulse-circle {
    0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(255, 215, 0, 0.7); }
    50% { transform: scale(1.1); box-shadow: 0 0 0 10px rgba(255, 215, 0, 0.3); }
    100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(255, 215, 0, 0); }
}
.mic-icon { font-size:18px; margin-left:-20px; z-index:1; }
.join-btn.disabled {
  background: #444 !important;
  color: #999 !important;
  cursor: not-allowed;
  opacity: 0.7;
}
/* Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  height: 100%;
  width: 100%;
  background: #000;
  font-family: "Poppins", sans-serif;
  overflow: hidden;
}

/* Splash Screen */
.splash-screen {
  position: relative;
  width: 100%;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  text-align: center;
  color: #ffd700;
  overflow: hidden;
  animation: fadeIn 1.5s ease forwards;
}

/* Background Icons */
.bg-icons {
  position: absolute;
  inset: 0;
  overflow: hidden;
  z-index: 0;
}

.floating-icon {
  position: absolute;
  font-size: 24px;
  color: rgba(255, 215, 0, 0.12);
  filter: blur(0.5px);
  transition: transform 0.3s linear;
  will-change: transform;
  animation: pulseIcon 3.5s ease-in-out infinite alternate;
}

/* Foreground content */
.content {
  position: relative;
  z-index: 5;
  text-shadow: 0 0 20px rgba(255, 215, 0, 0.7);
  animation: fadeInUp 1.5s ease;
  padding: 20px;
}

/* Logo */
.logo {
  font-size: 5rem;
  margin-bottom: 10px;
  color: #ffd700;
  animation: pulseGlow 3s infinite ease-in-out;
}

/* App name */
.app-title {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 8px;
  letter-spacing: 2px;
}

/* Tagline */
.tagline {
  font-size: 1.1rem;
  color: #fff;
  opacity: 0.8;
  margin-bottom: 25px;
}

/* 🎧 AUDIO WAVE LOADER */
.loader {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 6px;
  height: 50px;
  width: 80px;
}

.loader span {
  display: inline-block;
  width: 6px;
  height: 20px;
  background: linear-gradient(180deg, #ffd700 0%, #ffa500 100%);
  border-radius: 3px;
  animation: wave 1.1s ease-in-out infinite;
  box-shadow: 0 0 15px rgba(255, 215, 0, 0.4);
}

.loader span:nth-child(1) { animation-delay: 0s; }
.loader span:nth-child(2) { animation-delay: 0.1s; }
.loader span:nth-child(3) { animation-delay: 0.2s; }
.loader span:nth-child(4) { animation-delay: 0.3s; }
.loader span:nth-child(5) { animation-delay: 0.4s; }

@keyframes wave {
  0%, 100% { height: 20px; opacity: 0.8; }
  50% { height: 45px; opacity: 1; }
}

/* Fade-out transition */
.fade-out {
  animation: fadeOut 1s ease forwards;
}

/* ========== Other Animations ========== */
@keyframes fadeIn {
  from { opacity: 0; transform: scale(1.05); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes fadeOut {
  from { opacity: 1; }
  to { opacity: 0; transform: scale(0.95); }
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes pulseGlow {
  0%, 100% { text-shadow: 0 0 25px #ffd700, 0 0 50px #ffa500; }
  50% { text-shadow: 0 0 40px #ffa500, 0 0 80px #ffd700; }
}

/* ✨ Pulsing background icon animation */
@keyframes pulseIcon {
  0% {
    opacity: 0.08;
    transform: scale(1);
    filter: blur(0.5px);
  }
  50% {
    opacity: 0.15;
    transform: scale(1.2);
    filter: blur(1px);
  }
  100% {
    opacity: 0.08;
    transform: scale(1);
    filter: blur(0.5px);
  }
}

/* Responsive */
@media (max-width: 600px) {
  .logo { font-size: 3.5rem; }
  .app-title { font-size: 2rem; }
  .tagline { font-size: 1rem; }
  .loader { width: 60px; height: 40px; gap: 5px; }
  .loader span { width: 5px; }
}
