/* Eloqwnt Social Club - Core Stylesheet */

/* Design Tokens & Theme Variables */
:root {
  --bg-beige: #f4f0e6;
  --bg-beige-dark: #ebe6d9;
  --card-white: #ffffff;
  --text-dark: #2c2a29;
  --text-muted: #8b8782;
  --accent-green: #269b5c;
  --accent-green-bg: #e2f4ea;
  --accent-red: #e0533c;
  --accent-pink-bg: #faebe9;
  --accent-gold: #efc440;
  --accent-gold-glow: rgba(239, 196, 64, 0.4);
  --border-light: #eae5d7;
  
  --font-display: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  
  --shadow-ambient: 0 10px 40px rgba(44, 42, 41, 0.05);
  --shadow-overlay: 0 20px 50px rgba(44, 42, 41, 0.15);
  --shadow-btn: 0 4px 12px rgba(44, 42, 41, 0.05);
  
  --transition-smooth: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  --transition-bounce: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Global Reset */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: var(--font-body);
  background-color: #141312; /* Dark ambient room outer background */
  color: var(--text-dark);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
}

/* Background Ambient Glow Effects (Visible on Desktop) */
.glow-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -1;
  overflow: hidden;
  background-color: #0d0c0c;
}

.blob {
  position: absolute;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.15;
}

.blob-1 {
  background: radial-gradient(circle, #efc440 0%, transparent 70%);
  top: -100px;
  right: -100px;
}

.blob-2 {
  background: radial-gradient(circle, #269b5c 0%, transparent 70%);
  bottom: -150px;
  left: -150px;
}

/* Device Shell Wrapper (Centers on Desktop, full screen on Mobile) */
.app-shell {
  width: 100%;
  max-width: 440px;
  height: 95vh;
  max-height: 880px;
  background-color: var(--bg-beige);
  border-radius: 40px;
  border: 12px solid #282726; /* Premium physical bezel look */
  box-shadow: 0 30px 100px rgba(0, 0, 0, 0.8);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* Mobile responsive override */
@media (max-width: 480px) {
  body {
    background-color: var(--bg-beige);
  }
  .app-shell {
    max-width: 100%;
    height: 100vh;
    max-height: 100%;
    border-radius: 0;
    border: none;
    box-shadow: none;
  }
}

/* Scrollbar Customization */
::-webkit-scrollbar {
  width: 4px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: var(--border-light);
  border-radius: 10px;
}

/* Toast Notifications */
.toast-notification {
  position: absolute;
  top: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(0);
  background-color: #2c2a29;
  color: #ffffff;
  padding: 12px 24px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 500;
  box-shadow: var(--shadow-overlay);
  z-index: 1000;
  text-align: center;
  white-space: nowrap;
  pointer-events: none;
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.3s ease;
  opacity: 1;
}

.toast-notification.hidden {
  transform: translateX(-50%) translateY(-100px);
  opacity: 0;
}

/* Core Views Layer System */
.app-view {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
  transform: translateY(20px);
  transition: opacity 0.4s ease, transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.4s ease;
}

.app-view.active {
  opacity: 1;
  pointer-events: auto;
  visibility: visible;
  transform: translateY(0);
  z-index: 10;
}

/* VIEW 1: PROFILE SETUP CARD */
#view-profile {
  justify-content: center;
  padding: 24px;
}

.profile-setup-card {
  background-color: var(--card-white);
  border-radius: 32px;
  padding: 32px 24px;
  box-shadow: var(--shadow-ambient);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  max-height: 90%;
}

.setup-header {
  text-align: center;
  margin-bottom: 24px;
}

.club-logo {
  font-size: 48px;
  margin-bottom: 12px;
}

.setup-header h1 {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 800;
  color: var(--text-dark);
}

.setup-header p {
  font-size: 14px;
  color: var(--text-muted);
  margin-top: 6px;
}

.setup-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-dark);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.form-group input[type="text"],
.form-group input[type="password"],
.form-group textarea,
.form-group select {
  font-family: var(--font-body);
  font-size: 15px;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid var(--border-light);
  background-color: #fcfbfa;
  color: var(--text-dark);
  outline: none;
  transition: var(--transition-smooth);
}

/* Premium system default password font representation to ensure beautifully aligned and sized bullets */
.form-group input[type="password"] {
  font-family: var(--font-body);
  letter-spacing: normal;
}

/* When the user starts typing, switch to standard system font stack for perfect password dots */
.form-group input[type="password"]:not(:placeholder-shown) {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif !important;
  letter-spacing: 0.12em;
}

.form-group input[type="password"]::placeholder {
  font-family: var(--font-body);
  letter-spacing: normal;
  font-size: 15px; /* Match username placeholder size exactly */
}

.form-group input[type="text"]:focus,
.form-group input[type="password"]:focus,
.form-group textarea:focus,
.form-group select:focus {
  border-color: var(--accent-green);
  background-color: var(--card-white);
  box-shadow: 0 0 0 4px var(--accent-green-bg);
}

/* Avatar Choice Carousel */
.avatar-selection-group {
  align-items: center;
}

.avatar-carousel {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding: 10px 4px;
  width: 100%;
  scrollbar-width: none;
}

.avatar-carousel::-webkit-scrollbar {
  display: none;
}

.avatar-option {
  font-size: 32px;
  width: 56px;
  height: 56px;
  min-width: 56px;
  background-color: #f7f5f0;
  border-radius: 18px;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  border: 2px solid transparent;
  transition: var(--transition-bounce);
}

.avatar-option:hover {
  transform: scale(1.1);
}

.avatar-option.selected {
  background-color: var(--card-white);
  border-color: var(--accent-green);
  box-shadow: var(--shadow-btn);
  transform: scale(1.05);
}

/* Role Selector Styles */
.role-selector {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.role-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border-radius: 16px;
  border: 1px solid var(--border-light);
  background-color: #fcfbfa;
  cursor: pointer;
  text-align: left;
  transition: var(--transition-smooth);
}

.role-btn:hover {
  background-color: var(--bg-beige);
}

.role-btn.selected {
  border-color: var(--accent-green);
  background-color: var(--accent-green-bg);
}

.role-icon {
  font-size: 24px;
}

.role-details {
  display: flex;
  flex-direction: column;
}

.role-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-dark);
}

.role-desc {
  font-size: 11px;
  color: var(--text-muted);
}

.primary-btn {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
  color: var(--card-white);
  background-color: var(--text-dark);
  padding: 16px;
  border-radius: 20px;
  border: none;
  cursor: pointer;
  transition: var(--transition-bounce);
  box-shadow: var(--shadow-btn);
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
}

.primary-btn:hover {
  transform: translateY(-2px);
  opacity: 0.95;
}

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

.secondary-btn {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
  color: var(--text-dark);
  background-color: var(--border-light);
  padding: 16px;
  border-radius: 20px;
  border: none;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.secondary-btn:hover {
  background-color: var(--bg-beige-dark);
}

/* VIEW 2: HALLWAY SYSTEM */
.hallway-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px;
}

.user-greeting {
  display: flex;
  align-items: center;
  gap: 12px;
}

.user-avatar-mini {
  font-size: 26px;
  width: 48px;
  height: 48px;
  background-color: var(--card-white);
  border-radius: 16px;
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: var(--shadow-ambient);
}

.user-greeting h2 {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
}

.role-subtitle {
  font-size: 12px;
  color: var(--text-muted);
}

.icon-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background-color: var(--card-white);
  color: var(--text-dark);
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: var(--shadow-btn);
  transition: var(--transition-bounce);
}

.icon-btn:hover {
  transform: scale(1.08);
  background-color: #f7f5f0;
}

.icon-btn svg {
  width: 20px;
  height: 20px;
}

.hallway-content {
  flex: 1;
  overflow-y: auto;
  padding: 0 24px 80px 24px;
}

.hallway-welcome h3 {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 4px;
}

.hallway-welcome p {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.rooms-grid {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Elegant Room Directory Card */
.room-card {
  background-color: var(--card-white);
  border-radius: 24px;
  padding: 20px;
  box-shadow: var(--shadow-ambient);
  cursor: pointer;
  transition: var(--transition-bounce);
  border: 1px solid transparent;
}

.room-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(44, 42, 41, 0.08);
  border-color: var(--border-light);
}

.room-card-category {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--accent-green);
  background-color: var(--accent-green-bg);
  padding: 4px 8px;
  border-radius: 8px;
  margin-bottom: 8px;
}

.room-card h4 {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 4px;
  line-height: 1.3;
}

.room-card p {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 14px;
  line-height: 1.4;
}

.room-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid #f9f8f6;
  padding-top: 12px;
}

.room-card-speakers {
  display: flex;
  align-items: center;
  gap: 6px;
}

.mini-avatars-group {
  display: flex;
}

.mini-avatar-bubble {
  width: 24px;
  height: 24px;
  border-radius: 8px;
  background-color: var(--bg-beige);
  border: 2px solid var(--card-white);
  margin-left: -6px;
  font-size: 13px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.mini-avatar-bubble:first-child {
  margin-left: 0;
}

.speaker-count {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
}

.join-action-indicator {
  font-size: 11px;
  font-weight: 700;
  color: var(--accent-green);
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Empty room state */
.no-rooms-state {
  text-align: center;
  padding: 48px 24px;
}

.no-rooms-icon {
  font-size: 48px;
  margin-bottom: 12px;
}

.no-rooms-state p {
  font-weight: 600;
  font-size: 15px;
  color: var(--text-dark);
}

.no-rooms-state .no-rooms-sub {
  font-weight: 400;
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* Hallway bottom navigation bar */
.hallway-footer {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  display: flex;
  justify-content: center;
  padding: 16px;
  background: linear-gradient(to top, var(--bg-beige) 70%, transparent);
  pointer-events: none;
}

.create-room-btn {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
  color: var(--card-white);
  background-color: var(--accent-green);
  border: none;
  padding: 14px 28px;
  border-radius: 30px;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(38, 155, 92, 0.3);
  display: flex;
  align-items: center;
  gap: 8px;
  pointer-events: auto;
  transition: var(--transition-bounce);
}

.create-room-btn:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 10px 25px rgba(38, 155, 92, 0.4);
}

.create-room-btn.hidden {
  display: none;
}

/* VIEW 3: ACTIVE ROOM CARD VIEW */
.room-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
}

.leave-pill-btn {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  color: var(--accent-red);
  background-color: var(--accent-pink-bg);
  border: none;
  padding: 10px 18px;
  border-radius: 20px;
  cursor: pointer;
  box-shadow: var(--shadow-btn);
  transition: var(--transition-bounce);
}

.leave-pill-btn:hover {
  transform: scale(1.05);
  background-color: #f7deda;
}

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

.room-host-profile {
  font-size: 20px;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background-color: var(--card-white);
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: var(--shadow-ambient);
}

/* Badge overlay for chat */
.badge-container {
  position: relative;
}

.chat-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background-color: var(--accent-red);
  color: #ffffff;
  font-size: 10px;
  font-weight: 700;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  border: 2px solid var(--card-white);
}

.chat-badge.hidden {
  display: none;
}

/* Main white Rounded Stage Card Container */
.room-stage-card {
  flex: 1;
  background-color: var(--card-white);
  border-top-left-radius: 36px;
  border-top-right-radius: 36px;
  box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.03);
  padding: 24px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  margin-bottom: 74px; /* Room Action Bar Height */
  transition: transform 0.3s ease;
}

.room-stage-card.chat-open {
  transform: translateY(-80px); /* Push up slightly when drawer is active if needed */
}

.room-card-header {
  margin-bottom: 24px;
}

.room-topic-category {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--accent-green);
  background-color: var(--accent-green-bg);
  padding: 4px 8px;
  border-radius: 8px;
  margin-bottom: 8px;
}

.room-title {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 800;
  line-height: 1.3;
}

.room-desc {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
  line-height: 1.4;
}

.room-grids-container {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.room-section-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.section-label {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid #f6f5f0;
  padding-bottom: 6px;
}

/* Clubhouse Layout grid */
.participants-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px 14px;
}

/* AVATAR WRAPPERS & INDICATORS */
.avatar-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.avatar-container {
  position: relative;
  width: 76px;
  height: 76px;
  border-radius: 26px;
  background-color: var(--bg-beige);
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 38px;
  transition: var(--transition-bounce);
  border: 3px solid transparent;
}

/* Active speaker style - Golden Ring */
.avatar-wrapper.speaking .avatar-container {
  border-color: var(--accent-gold);
  box-shadow: 0 0 16px var(--accent-gold-glow);
  transform: scale(1.03);
  animation: speakingPulse 1.5s infinite ease-in-out;
}

@keyframes speakingPulse {
  0% { box-shadow: 0 0 4px var(--accent-gold-glow); }
  50% { box-shadow: 0 0 18px rgba(239, 196, 64, 0.6); }
  100% { box-shadow: 0 0 4px var(--accent-gold-glow); }
}

.avatar-wrapper:hover .avatar-container {
  transform: translateY(-2px);
}

/* Avatar Badges overlays */
.badge-moderator {
  position: absolute;
  top: -4px;
  left: -4px;
  background-color: var(--accent-green-bg);
  border-radius: 50%;
  width: 22px;
  height: 22px;
  display: flex;
  justify-content: center;
  align-items: center;
  border: 2px solid var(--card-white);
  font-size: 11px;
  box-shadow: var(--shadow-btn);
}

.badge-new-user {
  position: absolute;
  bottom: -4px;
  left: -4px;
  background-color: var(--card-white);
  border-radius: 50%;
  width: 22px;
  height: 22px;
  display: flex;
  justify-content: center;
  align-items: center;
  border: 1px solid var(--border-light);
  font-size: 11px;
  box-shadow: var(--shadow-btn);
}

.badge-mute {
  position: absolute;
  bottom: -4px;
  right: -4px;
  background-color: var(--card-white);
  border-radius: 50%;
  width: 24px;
  height: 24px;
  display: flex;
  justify-content: center;
  align-items: center;
  border: 1.5px solid var(--border-light);
  font-size: 11px;
  box-shadow: var(--shadow-btn);
  color: var(--accent-red);
}

.badge-hand-raise {
  position: absolute;
  top: -4px;
  right: -4px;
  background-color: #efc440;
  border-radius: 12px;
  padding: 0 6px;
  min-width: 22px;
  height: 22px;
  display: flex;
  justify-content: center;
  align-items: center;
  border: 2px solid var(--card-white);
  font-size: 11px;
  font-weight: 700;
  box-shadow: var(--shadow-btn);
  animation: handWiggle 1s infinite alternate;
}

/* Auth Tabs for login/register toggling */
.auth-tabs {
  display: flex;
  margin-bottom: 24px;
  border-bottom: 1.5px solid var(--border-light);
  gap: 12px;
  position: relative;
  z-index: 10;
}

.auth-tab-btn {
  flex: 1;
  padding: 10px;
  border: none;
  background: none;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  color: var(--text-muted);
  cursor: pointer;
  border-bottom: 2.5px solid transparent;
  transition: var(--transition-smooth);
}

.auth-tab-btn:hover {
  color: var(--text-dark);
}

.auth-tab-btn.active {
  color: var(--text-dark);
  border-bottom-color: var(--text-dark);
}

@keyframes handWiggle {
  0% { transform: rotate(-10deg); }
  100% { transform: rotate(15deg); }
}

.participant-name-group {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  margin-top: 8px;
  width: 100%;
}

.participant-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-dark);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 72px;
}

.participant-mod-star {
  color: var(--accent-green);
  font-size: 10px;
  display: inline-flex;
}

.participant-tagline {
  font-size: 10px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  width: 100%;
  margin-top: 2px;
}

/* Audio Visualizer Waves Container */
.live-visualizer-wave {
  position: absolute;
  bottom: 4px;
  width: 80%;
  height: 12px;
  display: flex;
  justify-content: space-around;
  align-items: flex-end;
  pointer-events: none;
}

.wave-bar {
  width: 3px;
  height: 3px;
  background-color: var(--accent-gold);
  border-radius: 2px;
  animation: wavePulse 0.4s ease infinite alternate;
}

.wave-bar:nth-child(2) { animation-delay: 0.1s; }
.wave-bar:nth-child(3) { animation-delay: 0.25s; }
.wave-bar:nth-child(4) { animation-delay: 0.05s; }

@keyframes wavePulse {
  0% { height: 3px; }
  100% { height: 12px; }
}

/* VOICE ROOM BOTTOM STICKY CONTROL STATIONS */

/* Recording banner overlay */
.recording-bar {
  position: absolute;
  bottom: 74px; /* Sits right above the footer action bar */
  left: 0;
  width: 100%;
  background-color: var(--text-dark);
  color: #ffffff;
  padding: 12px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 50;
  border-top-left-radius: 16px;
  border-top-right-radius: 16px;
  box-shadow: 0 -4px 15px rgba(0, 0, 0, 0.1);
  animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

.rec-status-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.rec-dot {
  width: 8px;
  height: 8px;
  background-color: var(--accent-red);
  border-radius: 50%;
  animation: blink 1s infinite steps(2, start);
}

@keyframes blink {
  to { visibility: hidden; }
}

.rec-timer {
  font-family: monospace;
  font-size: 14px;
  font-weight: 700;
}

.rec-text {
  font-size: 12px;
  opacity: 0.8;
}

.stop-rec-btn {
  background-color: rgba(255, 255, 255, 0.15);
  color: #ffffff;
  border: none;
  padding: 6px 14px;
  border-radius: 12px;
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: var(--transition-smooth);
}

.stop-rec-btn:hover {
  background-color: var(--accent-red);
}

.stop-rec-btn svg {
  width: 12px;
  height: 12px;
}

/* Room action footer */
.room-footer {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 74px;
  background-color: var(--bg-beige);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 24px;
  border-top: 1px solid var(--border-light);
  z-index: 100;
}

.action-bar-left, .action-bar-right {
  display: flex;
  align-items: center;
  gap: 14px;
}

.circle-action-btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background-color: var(--card-white);
  color: var(--text-dark);
  border: none;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: var(--shadow-btn);
  transition: var(--transition-bounce);
  font-size: 20px;
}

.circle-action-btn:hover {
  transform: scale(1.08);
  background-color: #fcfbfa;
}

.circle-action-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none !important;
}

.circle-action-btn.active {
  background-color: var(--accent-green-bg);
  color: var(--accent-green);
  border: 1.5px solid var(--accent-green);
}

.circle-action-btn.recording-active {
  background-color: var(--accent-pink-bg);
  color: var(--accent-red);
  animation: recGlow 1.5s infinite ease-in-out;
}

@keyframes recGlow {
  0% { box-shadow: 0 0 4px rgba(224, 83, 60, 0.4); }
  50% { box-shadow: 0 0 16px rgba(224, 83, 60, 0.7); }
  100% { box-shadow: 0 0 4px rgba(224, 83, 60, 0.4); }
}

.circle-action-btn svg {
  width: 20px;
  height: 20px;
}

/* INTEGRATED ROOM CHAT SYSTEM (SLIDING DRAWER) */
.chat-drawer {
  position: absolute;
  top: 0;
  right: 0;
  width: 100%;
  height: 100%;
  background-color: var(--bg-beige);
  z-index: 200;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: -10px 0 40px rgba(0, 0, 0, 0.1);
}

.chat-drawer.active {
  transform: translateX(0);
}

.chat-drawer-header {
  padding: 20px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-light);
  background-color: var(--card-white);
}

.chat-drawer-header h3 {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 800;
}

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

.icon-btn-text {
  background: none;
  border: none;
  color: var(--accent-green);
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  border-radius: 12px;
  transition: var(--transition-smooth);
}

.icon-btn-text:hover {
  background-color: var(--accent-green-bg);
}

.icon-btn-text svg {
  width: 14px;
  height: 14px;
}

.chat-messages-container {
  flex: 1;
  padding: 20px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* Chat bubble styling */
.chat-bubble-group {
  display: flex;
  flex-direction: column;
  max-width: 80%;
}

.chat-bubble-group.self {
  align-self: flex-end;
}

.chat-bubble-group.other {
  align-self: flex-start;
}

.chat-bubble-sender {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 4px;
  margin-left: 6px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.chat-bubble-group.self .chat-bubble-sender {
  align-self: flex-end;
  margin-right: 6px;
}

.chat-bubble {
  padding: 12px 16px;
  border-radius: 18px;
  font-size: 13.5px;
  line-height: 1.4;
  word-break: break-word;
}

.chat-bubble-group.self .chat-bubble {
  background-color: var(--text-dark);
  color: #ffffff;
  border-bottom-right-radius: 4px;
}

.chat-bubble-group.other .chat-bubble {
  background-color: var(--card-white);
  color: var(--text-dark);
  border-bottom-left-radius: 4px;
  box-shadow: var(--shadow-ambient);
}

.chat-bubble-time {
  font-size: 9px;
  opacity: 0.6;
  margin-top: 4px;
  align-self: flex-end;
}

/* System notice logs inside chat */
.chat-system-notice {
  align-self: center;
  background-color: var(--border-light);
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 12px;
  text-align: center;
  max-width: 90%;
  margin: 4px 0;
  display: flex;
  align-items: center;
  gap: 6px;
}

.chat-input-form {
  padding: 16px 20px;
  background-color: var(--card-white);
  border-top: 1px solid var(--border-light);
  display: flex;
  gap: 12px;
  align-items: center;
}

.chat-input-form input {
  flex: 1;
  font-family: var(--font-body);
  font-size: 14px;
  padding: 12px 16px;
  border-radius: 16px;
  border: 1px solid var(--border-light);
  background-color: #fcfbfa;
  outline: none;
  transition: var(--transition-smooth);
}

.chat-input-form input:focus {
  border-color: var(--accent-green);
  background-color: var(--card-white);
}

.chat-send-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background-color: var(--text-dark);
  color: #ffffff;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: var(--transition-bounce);
}

.chat-send-btn:hover {
  transform: scale(1.05);
}

.chat-send-btn svg {
  width: 16px;
  height: 16px;
}

/* DIALOG MODAL BASE SYSTEM */
.modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(20, 19, 18, 0.4);
  backdrop-filter: blur(4px);
  z-index: 500;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  opacity: 1;
  transition: opacity 0.3s ease;
}

.modal-overlay.hidden {
  opacity: 0;
  pointer-events: none;
}

.modal-card {
  width: 100%;
  background-color: var(--bg-beige);
  border-top-left-radius: 32px;
  border-top-right-radius: 32px;
  padding: 24px;
  box-shadow: var(--shadow-overlay);
  transform: translateY(0);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  max-height: 90%;
  overflow-y: auto;
}

.modal-overlay.hidden .modal-card {
  transform: translateY(100%);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border-light);
  padding-bottom: 12px;
}

.modal-header h3 {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 800;
}

.close-modal-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
}

.modal-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.modal-footer-actions {
  display: flex;
  gap: 12px;
  margin-top: 10px;
}

.modal-footer-actions button {
  flex: 1;
}

/* INVITE DIALOG DETAILS */
.invite-modal-content {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.invite-modal-content p {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.4;
}

.invite-link-box {
  display: flex;
  gap: 8px;
  align-items: center;
  background-color: var(--card-white);
  border: 1px solid var(--border-light);
  border-radius: 16px;
  padding: 6px 6px 6px 12px;
}

.invite-link-box input {
  flex: 1;
  border: none;
  background: none;
  font-family: monospace;
  font-size: 12px;
  outline: none;
  color: var(--text-dark);
}

.shrink-btn {
  padding: 10px 18px;
  font-size: 14px;
  border-radius: 12px;
}

/* UTILITIES */
.hidden {
  display: none !important;
}
