/* Free4Talk Exact Glassy Theme with Custom Vector SVG Pattern */
:root {
  --glass-bg: rgba(18, 27, 40, 0.78);
  --glass-bg-hover: rgba(26, 38, 56, 0.88);
  --glass-border: rgba(255, 255, 255, 0.10);
  --glass-border-highlight: rgba(255, 255, 255, 0.20);
  --glass-shadow: 0 10px 32px 0 rgba(0, 0, 0, 0.5), inset 0 1px 0 0 rgba(255, 255, 255, 0.12);

  --f4t-blue: #0284c7;
  --f4t-blue-hover: #0369a1;
  --f4t-blue-glow: rgba(2, 132, 199, 0.4);
  --f4t-blue-light: #38bdf8;
  
  --emerald-gradient: linear-gradient(135deg, #10b981 0%, #059669 100%);
  --emerald-glow: rgba(16, 185, 129, 0.35);

  --f4t-text-white: #ffffff;
  --f4t-text-sub: #cbd5e1;
  --f4t-text-dim: #94a3b8;
  --f4t-red: #ef4444;
}

body {
  background-color: transparent;
  color: var(--f4t-text-white);
  min-height: 100vh;
}

/* Glassy Premium Header with Official TalkWide Branding */
.f4t-header {
  background: rgba(9, 15, 24, 0.90);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid rgba(56, 189, 248, 0.20);
  padding: 10px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.f4t-logo-group {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.2s ease;
}
.f4t-logo-group:hover {
  transform: scale(1.02);
}

.f4t-logo-img {
  width: 38px;
  height: 38px;
  object-fit: contain;
  border-radius: 10px;
  filter: drop-shadow(0 0 12px rgba(2, 132, 199, 0.5));
  transition: transform 0.2s ease;
}
.f4t-logo-group:hover .f4t-logo-img {
  transform: rotate(-3deg) scale(1.06);
}

.f4t-brand-wrap {
  display: flex;
  flex-direction: column;
}
.f4t-logo-text {
  font-size: 22px;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.6px;
  line-height: 1.1;
  display: flex;
  align-items: center;
  gap: 4px;
}
.f4t-logo-highlight {
  background: linear-gradient(135deg, #38bdf8 0%, #0284c7 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.f4t-badge-live {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: #34d399;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 9999px;
  letter-spacing: 0.5px;
  margin-top: 2px;
  width: fit-content;
}
.live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #34d399;
  box-shadow: 0 0 8px #34d399;
  animation: pulseLiveDot 1.8s infinite;
}
@keyframes pulseLiveDot {
  0% { transform: scale(0.9); opacity: 0.7; }
  50% { transform: scale(1.25); opacity: 1; }
  100% { transform: scale(0.9); opacity: 0.7; }
}

.f4t-header-title {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(20, 31, 46, 0.65);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 9999px;
  padding: 7px 20px;
  font-size: 13.5px;
  font-weight: 500;
  color: #cbd5e1;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
}
.f4t-header-title .tag-glow {
  color: #38bdf8;
  font-weight: 700;
}
.f4t-header-title .divider {
  opacity: 0.3;
}
.f4t-header-title .online-count {
  color: #34d399;
  font-weight: 600;
}

.f4t-user-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: rgba(30, 41, 59, 0.75);
  backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  color: #f8fafc;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  transition: all 0.2s ease;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}
.f4t-user-badge:hover {
  background: rgba(51, 65, 85, 0.85);
  border-color: var(--glass-border-highlight);
  transform: translateY(-1px);
}
.f4t-user-avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  object-fit: cover;
  border: 1.5px solid var(--f4t-blue-light);
}

/* Action Bar */
.f4t-action-bar {
  max-width: 1400px;
  margin: 18px auto 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.btn-f4t-create {
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  padding: 9px 18px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 4px 14px var(--f4t-blue-glow);
  transition: all 0.2s ease;
}
.btn-f4t-create:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
}

.btn-f4t-coffee {
  background: linear-gradient(135deg, #facc15 0%, #eab308 100%);
  color: #0f172a;
  border: none;
  border-radius: 8px;
  padding: 9px 16px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 4px 12px rgba(250, 204, 21, 0.3);
  transition: all 0.2s ease;
}
.btn-f4t-coffee:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
}

.btn-f4t-link {
  background: rgba(22, 32, 48, 0.65);
  backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  color: var(--f4t-text-sub);
  border-radius: 8px;
  padding: 9px 14px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}
.btn-f4t-link:hover {
  background: rgba(30, 41, 59, 0.85);
  border-color: var(--glass-border-highlight);
  color: #ffffff;
}

/* Search Bar */
.f4t-search-bar {
  max-width: 1400px;
  margin: 14px auto 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.search-input-box {
  flex: 1;
  display: flex;
  align-items: center;
  background: rgba(18, 27, 40, 0.7);
  backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  padding: 0 14px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
  transition: all 0.2s ease;
}
.search-input-box:focus-within {
  border-color: var(--f4t-blue-light);
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.2);
}
.search-input-box input {
  flex: 1;
  background: transparent;
  border: none;
  color: #ffffff;
  padding: 10px 10px;
  font-size: 14px;
  outline: none;
}
.search-input-box input::placeholder {
  color: var(--f4t-text-dim);
}

.btn-search {
  background: transparent;
  border: none;
  color: var(--f4t-text-dim);
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
}

.grid-view-toggle {
  display: flex;
  background: rgba(18, 27, 40, 0.7);
  backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  overflow: hidden;
}
.grid-view-toggle button {
  background: transparent;
  border: none;
  color: var(--f4t-text-dim);
  padding: 9px 14px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}
.grid-view-toggle button.active {
  background: var(--f4t-blue);
  color: white;
}

/* Category Pills */
.f4t-categories-bar {
  max-width: 1400px;
  margin: 14px auto 22px auto;
  padding: 0 20px 4px 20px;
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.f4t-categories-bar::-webkit-scrollbar {
  display: none;
}

.cat-pill {
  background: rgba(20, 30, 45, 0.65);
  backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  color: var(--f4t-text-dim);
  border-radius: 8px;
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
}
.cat-pill:hover {
  background: rgba(30, 45, 68, 0.85);
  color: #ffffff;
  border-color: var(--glass-border-highlight);
}
.cat-pill.active {
  background: var(--f4t-blue);
  color: #ffffff;
  border-color: var(--f4t-blue-light);
  box-shadow: 0 2px 10px var(--f4t-blue-glow);
}

/* Glassy Room Card */
.f4t-rooms-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 20px 80px 20px;
  width: 100%;
}

/* Grid Layouts: 3x, 2x, 1x (Matching Free4Talk Screenshots 1, 2, 3) */
.f4t-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

/* 2x Mode (Screenshot 3: 2-Column Grid with Centered Balanced Button) */
.f4t-grid.cols-2 {
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}
.f4t-grid.cols-2 .f4t-card {
  min-height: 220px;
  padding: 18px 22px;
}
.f4t-grid.cols-2 .f4t-seats-row {
  margin: 12px 0;
  gap: 16px;
}
.f4t-grid.cols-2 .f4t-card-bottom {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: auto;
  padding-top: 14px;
  width: 100%;
}

/* 1x Mode (Screenshot 2 & Free4Talk Ref: Wide Horizontal Card with Left Seats & Right Join Button) */
.f4t-grid.cols-1 {
  grid-template-columns: 1fr;
  gap: 14px;
}
.f4t-grid.cols-1 .f4t-card {
  min-height: 120px;
  padding: 16px 24px;
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: auto auto;
  align-items: center;
  gap: 8px 24px;
}
.f4t-grid.cols-1 .f4t-card-top {
  grid-column: 1 / 3;
  grid-row: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2px;
}
.f4t-grid.cols-1 .f4t-seats-row {
  grid-column: 1;
  grid-row: 2;
  margin: 0;
  justify-content: flex-start;
  gap: 16px;
}
.f4t-grid.cols-1 .f4t-avatar-circle,
.f4t-grid.cols-1 .f4t-empty-seat {
  width: 68px;
  height: 68px;
}
.f4t-grid.cols-1 .f4t-card-bottom {
  grid-column: 2;
  grid-row: 2;
  margin: 0;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  padding: 0;
  width: auto;
}
.f4t-grid.cols-1 .btn-f4t-join,
.f4t-grid.cols-1 .btn-f4t-chat,
.f4t-grid.cols-1 .btn-f4t-full {
  width: auto !important;
  min-width: 175px !important;
  white-space: nowrap !important;
  word-break: keep-all !important;
  flex-shrink: 0 !important;
  height: 38px !important;
  padding: 0 22px !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
}

.f4t-card {
  position: relative;
  background: #101925;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 245px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
  transition: transform 0.18s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
  content-visibility: auto;
  contain-intrinsic-size: 0 250px;
  transform: translateZ(0);
}
.f4t-card:hover {
  background: #152130;
  border-color: var(--f4t-blue-light);
  transform: translateY(-3px) translateZ(0);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.65), 0 0 20px rgba(56, 189, 248, 0.2);
}

.f4t-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.card-title-group {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  flex: 1;
}

.card-logo-bullet {
  width: 32px;
  height: 32px;
  min-width: 32px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, rgba(56, 189, 248, 0.30) 0%, rgba(15, 23, 42, 0.95) 100%);
  border: 1.5px solid rgba(56, 189, 248, 0.55);
  box-shadow: 0 2px 10px rgba(2, 132, 199, 0.35), inset 0 1px 3px rgba(255, 255, 255, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
  overflow: hidden;
  padding: 2px;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.card-brand-logo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  display: block;
}

.f4t-card:hover .card-logo-bullet {
  border-color: #38bdf8;
  transform: scale(1.08);
  box-shadow: 0 4px 16px rgba(56, 189, 248, 0.55), inset 0 1px 4px rgba(255, 255, 255, 0.3);
}

.card-language-info {
  font-size: 15px;
  color: #ffffff;
  line-height: 1.25;
}
.card-language-info strong {
  font-weight: 700;
}
.card-language-info em {
  font-style: italic;
  color: var(--f4t-text-dim);
  font-size: 12px;
  margin-left: 6px;
}

.card-topic-title {
  color: #38bdf8;
  font-size: 13.5px;
  font-weight: 600;
  margin-top: 4px;
  word-break: break-word;
}

.card-settings-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--glass-border);
  border-radius: 6px;
  color: var(--f4t-text-dim);
  cursor: pointer;
  font-size: 15px;
  padding: 4px 7px;
  transition: all 0.15s ease;
}
.card-settings-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.3);
}

/* Avatar Seats Row (Dynamic Density: 1 to 10 Users) */
.f4t-seats-row {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 16px;
  margin: 16px 0;
  padding: 4px 0;
  width: 100%;
}

/* 1-3 seats: Large classic circles */
.f4t-seats-row .f4t-avatar-circle,
.f4t-seats-row .f4t-empty-seat {
  width: 74px;
  height: 74px;
}

/* 4-6 seats: Medium circles in clean grid */
.f4t-seats-row.seats-dense-6 {
  gap: 10px 14px;
  margin: 12px 0;
}
.f4t-seats-row.seats-dense-6 .f4t-avatar-circle,
.f4t-seats-row.seats-dense-6 .f4t-empty-seat {
  width: 58px;
  height: 58px;
}
.f4t-seats-row.seats-dense-6 .f4t-likes-badge {
  font-size: 10px;
}

/* 7-10 seats: Exactly matching user screenshot with 2 neat rows of 5! */
.f4t-seats-row.seats-dense-10 {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px 6px;
  justify-items: center;
  align-items: start;
  margin: 10px 0;
}
.f4t-seats-row.seats-dense-10 .f4t-avatar-circle,
.f4t-seats-row.seats-dense-10 .f4t-empty-seat {
  width: 48px;
  height: 48px;
}
.f4t-seats-row.seats-dense-10 .f4t-empty-plus {
  font-size: 20px;
}
.f4t-seats-row.seats-dense-10 .f4t-likes-badge {
  font-size: 9.5px;
  gap: 2px;
}

.f4t-seat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  transition: transform 0.15s ease;
}
.f4t-seat:hover {
  transform: scale(1.06);
}

.f4t-avatar-circle {
  border-radius: 50%;
  position: relative;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: #1e293b;
}

.f4t-avatar-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, 0.22);
  background: #1e293b;
  transition: border-color 0.15s ease;
  display: block;
}
.f4t-seat:hover .f4t-avatar-img {
  border-color: var(--f4t-blue-light);
}

/* Colored Initials Avatar (Like Free4Talk TT, D, SU, EH, etc.) */
.f4t-avatar-initials {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  text-align: center;
  border: 2px solid rgba(255, 255, 255, 0.28);
  box-shadow: inset 0 1px 3px rgba(255, 255, 255, 0.25);
  user-select: none;
  overflow: hidden;
}
.f4t-avatar-initials .initials-letters {
  font-size: 22px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.5px;
}
.seats-dense-6 .f4t-avatar-initials .initials-letters {
  font-size: 18px;
}
.seats-dense-10 .f4t-avatar-initials .initials-letters {
  font-size: 15px;
}
.f4t-avatar-initials .unverified-badge {
  font-size: 7px;
  font-weight: 800;
  letter-spacing: 0.2px;
  opacity: 0.9;
  margin-top: 1px;
  line-height: 1;
}
.seats-dense-10 .f4t-avatar-initials .unverified-badge {
  font-size: 5.5px;
}

/* Empty Seat: Dashed Circle with Subtle Plus */
.f4t-empty-seat {
  border-radius: 50%;
  border: 2px dashed rgba(255, 255, 255, 0.20);
  background: rgba(255, 255, 255, 0.02);
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.f4t-empty-plus {
  color: rgba(255, 255, 255, 0.22);
  font-size: 24px;
  font-weight: 300;
  line-height: 1;
  transition: all 0.2s ease;
  user-select: none;
}
.f4t-seat:hover .f4t-empty-seat {
  border-color: rgba(56, 189, 248, 0.55);
  background: rgba(56, 189, 248, 0.06);
  transform: scale(1.03);
}
.f4t-seat:hover .f4t-empty-plus {
  color: #38bdf8;
  transform: scale(1.2);
}

.f4t-likes-badge {
  font-size: 11px;
  color: #38bdf8;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 3px;
}

/* REFINED, TRUSTABLE & AUTHENTIC FREE4TALK JOIN BUTTON */
.f4t-card-bottom {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: auto;
  padding-top: 12px;
  width: 100%;
}

.btn-f4t-join {
  width: auto;
  min-width: 0;
  max-width: 100%;
  background: rgba(16, 185, 129, 0.12);
  border: 1.5px dashed rgba(52, 211, 153, 0.75);
  color: #34d399;
  border-radius: 7px;
  padding: 8px 20px;
  height: 38px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.2px;
  line-height: 1;
  white-space: nowrap !important;
  word-break: keep-all !important;
  flex-shrink: 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: transform 0.18s ease, background 0.18s ease, color 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
  user-select: none;
}
.btn-f4t-join:hover {
  background: rgba(16, 185, 129, 0.24);
  border: 1.5px solid #34d399;
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.35);
}
.btn-f4t-join:active {
  transform: translateY(0);
}
.btn-f4t-join .btn-icon {
  font-size: 15px;
  display: inline-flex;
  align-items: center;
}

/* Chat-Only Button Variant */
.btn-f4t-chat {
  width: auto;
  min-width: 0;
  max-width: 100%;
  background: rgba(56, 189, 248, 0.12);
  border: 1.5px dashed rgba(56, 189, 248, 0.75);
  color: #38bdf8;
  border-radius: 7px;
  padding: 8px 20px;
  height: 38px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.2px;
  line-height: 1;
  white-space: nowrap !important;
  word-break: keep-all !important;
  flex-shrink: 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: transform 0.18s ease, background 0.18s ease, color 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
  user-select: none;
}
.btn-f4t-chat:hover {
  background: rgba(56, 189, 248, 0.24);
  border: 1.5px solid #38bdf8;
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(56, 189, 248, 0.35);
}

.btn-f4t-full {
  width: auto;
  min-width: 0;
  max-width: 100%;
  background: rgba(22, 30, 42, 0.6);
  border: 1.5px solid rgba(255, 255, 255, 0.12);
  color: #94a3b8;
  border-radius: 7px;
  padding: 8px 20px;
  height: 38px;
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap !important;
  word-break: keep-all !important;
  flex-shrink: 0;
  cursor: not-allowed;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  user-select: none;
}

/* Empty Category State */
.category-empty-card {
  grid-column: 1 / -1;
  text-align: center;
  padding: 48px 24px;
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  border-radius: 14px;
  box-shadow: var(--glass-shadow);
}
.category-empty-card h3 {
  font-size: 18px;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 8px;
}
.category-empty-card p {
  color: var(--f4t-text-dim);
  font-size: 13.5px;
  margin-bottom: 18px;
}

/* Profile Popover Modal */
.f4t-profile-popover-backdrop {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}
.f4t-profile-popover-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}

.f4t-profile-popover-card {
  position: relative;
  background: #17212d;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.85);
  padding: 22px;
  display: flex;
  align-items: center;
  gap: 20px;
  max-width: 520px;
  width: 100%;
  animation: slideUp 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.popover-close-btn {
  position: absolute;
  top: -10px;
  right: -10px;
  width: 26px;
  height: 26px;
  background: var(--f4t-red);
  color: white;
  border-radius: 50%;
  border: 2px solid #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
  transition: transform 0.15s ease;
}
.popover-close-btn:hover {
  transform: scale(1.15);
}

.popover-avatar-wrap {
  width: 130px;
  height: 130px;
  border-radius: 10px;
  overflow: hidden;
  flex-shrink: 0;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.5);
}
.popover-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.popover-info-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.popover-id-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--f4t-text-dim);
}
.popover-id-code {
  font-family: monospace;
  font-weight: 700;
  color: #cbd5e1;
}
.btn-copy-id {
  background: transparent;
  border: none;
  color: #38bdf8;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}
.btn-copy-id:hover {
  text-decoration: underline;
}

.popover-stats-row {
  font-size: 12px;
  color: var(--f4t-text-dim);
}
.popover-stats-row span {
  color: #cbd5e1;
  font-weight: 600;
}

.popover-user-name {
  font-size: 20px;
  font-weight: 800;
  color: #ffffff;
  margin: 2px 0 8px 0;
}

.popover-actions-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 4px;
}

.btn-popover-report {
  background: transparent;
  border: 1px solid rgba(239, 68, 68, 0.6);
  color: #f87171;
  border-radius: 6px;
  padding: 7px 14px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s ease;
}
.btn-popover-report:hover {
  background: rgba(239, 68, 68, 0.15);
}

.btn-popover-follow {
  background: var(--f4t-blue);
  border: none;
  color: white;
  border-radius: 6px;
  padding: 7px 18px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 2px 8px var(--f4t-blue-glow);
  transition: all 0.15s ease;
}
.btn-popover-follow:hover {
  background: var(--f4t-blue-hover);
  transform: translateY(-1px);
}

/* Elevate active card when settings dropdown is open to prevent clipping by sibling cards */
.f4t-card.has-dropdown-open {
  z-index: 120 !important;
}

/* Room Settings Dropdown */
.room-settings-dropdown {
  position: absolute;
  top: 46px;
  right: 18px;
  z-index: 200 !important;
  background: rgba(23, 33, 45, 0.98);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 10px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.95), 0 0 25px rgba(56, 189, 248, 0.22);
  padding: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 190px;
  animation: fadeIn 0.15s ease;
}
.room-settings-dropdown .owner-label {
  font-size: 11px;
  color: var(--f4t-text-dim);
  text-transform: uppercase;
  font-weight: 700;
  margin-bottom: 8px;
}
.room-settings-dropdown .owner-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #38bdf8;
  margin-bottom: 6px;
}
.room-settings-dropdown .owner-name {
  font-size: 13px;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 12px;
}
.room-settings-dropdown button {
  width: 100%;
  text-align: left;
  padding: 8px 10px;
  background: transparent;
  border: none;
  color: #cbd5e1;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  border-radius: 4px;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.15s ease;
}
.room-settings-dropdown button:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}
.room-settings-dropdown .timestamp {
  font-size: 10px;
  color: var(--f4t-text-dim);
  margin-top: 10px;
  text-align: center;
}

/* Mobile & Device Breakpoints */
@media (max-width: 1080px) {
  /* In 3x mode, fall back to 2 columns on tablets */
  .f4t-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .f4t-header {
    padding: 10px 16px;
  }
  .f4t-header-title {
    display: none;
  }
  .btn-f4t-link {
    display: none;
  }

  /* All grids stack gracefully to 1 column on mobile to prevent squashing & overlapping */
  .f4t-grid,
  .f4t-grid.cols-2,
  .f4t-grid.cols-3 {
    grid-template-columns: 1fr !important;
    gap: 14px;
  }

  .f4t-card {
    padding: 14px 16px;
    min-height: auto;
  }

  /* In 1x mode on mobile, stack smoothly with zero cutting or overlap */
  .f4t-grid.cols-1 .f4t-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 14px 16px;
    gap: 10px;
    min-height: auto;
  }
  .f4t-grid.cols-1 .f4t-card-top {
    width: 100%;
  }
  .f4t-grid.cols-1 .f4t-seats-row {
    width: 100%;
    margin: 8px 0;
  }
  .f4t-grid.cols-1 .f4t-card-bottom {
    width: 100%;
    display: flex;
    justify-content: center;
    margin-top: 8px;
  }

  .f4t-profile-popover-card {
    flex-direction: column;
    text-align: center;
    padding: 24px 16px;
  }
  .popover-avatar-wrap {
    width: 100px;
    height: 100px;
  }
  .popover-actions-row {
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .f4t-card {
    padding: 12px 14px;
  }
  .card-logo-bullet {
    width: 28px;
    height: 28px;
    min-width: 28px;
    padding: 1.5px;
  }
  .f4t-avatar-circle,
  .f4t-empty-seat {
    width: 60px;
    height: 60px;
  }
  .f4t-seats-row {
    gap: 10px;
  }
  .card-title-group {
    gap: 8px;
  }
  .card-language-info strong {
    font-size: 14px;
  }
  .card-topic-title {
    font-size: 13px;
  }
  .btn-f4t-join,
  .btn-f4t-chat,
  .btn-f4t-full {
    padding: 8px 18px;
    font-size: 13px;
    min-width: 160px;
  }
}

@media (max-width: 360px) {
  .f4t-avatar-circle,
  .f4t-empty-seat {
    width: 52px;
    height: 52px;
  }
  .f4t-seats-row {
    gap: 8px;
  }
}

/* ======================================================== */
/* ULTRA-ATTRACTIVE CREATE ROOM MODAL & SEARCHABLE LANGUAGE */
/* ======================================================== */
.modal-content.create-room-modal-card {
  max-width: 540px;
  background: linear-gradient(155deg, rgba(19, 29, 44, 0.96) 0%, rgba(11, 17, 26, 0.98) 100%);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  border: 1px solid rgba(56, 189, 248, 0.35);
  border-radius: 20px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.85), 0 0 30px rgba(2, 132, 199, 0.20);
  overflow: visible; /* Allows custom dropdown to fly out */
}

.create-room-modal-card .modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.create-room-modal-card .modal-title {
  font-size: 19px;
  font-weight: 800;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 8px;
}
.create-room-modal-card .modal-title span.sparkle {
  color: #38bdf8;
}

/* Topic input with ideas pills */
.topic-input-wrap {
  position: relative;
  width: 100%;
}
.topic-input-wrap input {
  width: 100%;
  background: rgba(13, 20, 31, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  padding: 12px 14px;
  color: #ffffff;
  font-size: 14px;
  font-family: inherit;
  transition: all 0.2s ease;
}
.topic-input-wrap input:focus {
  outline: none;
  border-color: #38bdf8;
  box-shadow: 0 0 16px rgba(56, 189, 248, 0.3);
  background: rgba(18, 28, 44, 0.95);
}

.topic-suggestions-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}
.topic-pill {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 20px;
  padding: 4px 10px;
  font-size: 11.5px;
  color: #94a3b8;
  cursor: pointer;
  transition: all 0.15s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
}
.topic-pill:hover {
  background: rgba(56, 189, 248, 0.16);
  border-color: #38bdf8;
  color: #ffffff;
  transform: translateY(-1px);
}

/* Custom Searchable Language Dropdown */
.custom-lang-dropdown {
  position: relative;
  width: 100%;
}
.lang-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(13, 20, 31, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  padding: 11px 14px;
  color: #ffffff;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}
.lang-trigger:hover, .lang-trigger.focused {
  border-color: #38bdf8;
  box-shadow: 0 0 14px rgba(56, 189, 248, 0.25);
  background: rgba(18, 28, 44, 0.95);
}
.lang-trigger-content {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  flex: 1;
}

/* Multi-Language Chips inside Trigger */
.lang-chips-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  flex: 1;
}
.selected-lang-chip {
  background: rgba(2, 132, 199, 0.24);
  border: 1px solid rgba(56, 189, 248, 0.50);
  border-radius: 6px;
  padding: 3px 8px;
  font-size: 12px;
  color: #ffffff;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s ease;
  user-select: none;
}
.selected-lang-chip:hover {
  background: rgba(2, 132, 199, 0.38);
  border-color: #38bdf8;
  transform: translateY(-0.5px);
}
.selected-lang-chip .chip-flag {
  font-size: 14px;
  line-height: 1;
}
.selected-lang-chip .chip-text {
  font-size: 12px;
  color: #ffffff;
}
.selected-lang-chip .chip-remove {
  color: rgba(255, 255, 255, 0.6);
  font-size: 11px;
  cursor: pointer;
  padding: 0 2px;
  border-radius: 50%;
  line-height: 1;
  transition: all 0.12s ease;
}
.selected-lang-chip .chip-remove:hover {
  color: #ef4444;
  background: rgba(239, 68, 68, 0.25);
}

.lang-trigger-right {
  display: flex;
  align-items: center;
  gap: 8px;
}
.lang-counter-badge {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #94a3b8;
  border-radius: 12px;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 700;
  transition: all 0.2s ease;
}
.lang-counter-badge.full {
  background: rgba(16, 185, 129, 0.20);
  border-color: #34d399;
  color: #34d399;
}

.lang-chevron {
  font-size: 10px;
  color: #64748b;
  transition: transform 0.2s ease;
}
.lang-trigger.focused .lang-chevron {
  transform: rotate(180deg);
  color: #38bdf8;
}

/* Dropdown Menu Overlay */
.lang-dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 250;
  background: rgba(13, 20, 31, 0.98);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(56, 189, 248, 0.4);
  border-radius: 12px;
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.85);
  padding: 8px;
  flex-direction: column;
}
.lang-dropdown-menu.open {
  display: flex;
}

.lang-search-box {
  position: relative;
  margin-bottom: 8px;
}
.lang-search-box input {
  width: 100%;
  background: rgba(22, 33, 49, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  padding: 8px 12px 8px 32px;
  color: #ffffff;
  font-size: 13px;
  font-family: inherit;
  transition: border-color 0.15s ease;
}
.lang-search-box input:focus {
  outline: none;
  border-color: #38bdf8;
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.3);
}
.lang-search-box .search-icon {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 12px;
  color: #64748b;
  pointer-events: none;
}

.lang-options-list {
  max-height: 220px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-right: 4px;
}
.lang-option-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.12s ease;
  user-select: none;
}
.lang-option-item:hover {
  background: rgba(56, 189, 248, 0.18);
}
.lang-option-item.active {
  background: rgba(2, 132, 199, 0.3);
  border: 1px solid rgba(56, 189, 248, 0.4);
}
.lang-option-item.disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.lang-option-item.disabled:hover {
  background: transparent;
}

/* Checkbox Indicator inside Option */
.opt-checkbox {
  width: 18px;
  height: 18px;
  border-radius: 4px;
  border: 1.5px solid rgba(255, 255, 255, 0.28);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: transparent;
  transition: all 0.15s ease;
  flex-shrink: 0;
}
.opt-checkbox.checked {
  background: #0284c7;
  border-color: #38bdf8;
  color: #ffffff;
  font-weight: 800;
  box-shadow: 0 0 8px rgba(56, 189, 248, 0.4);
}

.lang-option-item .opt-flag {
  font-size: 18px;
  line-height: 1;
}
.lang-option-item .opt-text {
  display: flex;
  align-items: baseline;
  gap: 6px;
  flex: 1;
}
.lang-option-item .opt-name {
  font-size: 13px;
  font-weight: 600;
  color: #ffffff;
}
.lang-option-item .opt-native {
  font-size: 11.5px;
  color: #94a3b8;
}
.opt-selected-tag {
  background: rgba(56, 189, 248, 0.16);
  color: #38bdf8;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  letter-spacing: 0.3px;
}
.lang-no-results {
  text-align: center;
  padding: 20px 10px;
  font-size: 12.5px;
  color: #94a3b8;
}

/* Dropdown Footer */
.lang-dropdown-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 10px 4px 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  margin-top: 6px;
  font-size: 12px;
  color: #94a3b8;
  font-weight: 600;
}
.btn-lang-done {
  background: linear-gradient(135deg, #0284c7 0%, #0ea5e9 100%);
  border: none;
  color: #ffffff;
  font-weight: 700;
  font-size: 12px;
  padding: 6px 14px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
  box-shadow: 0 2px 8px rgba(2, 132, 199, 0.35);
}
.btn-lang-done:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.5);
}

/* Interactive Level Selector Pills */
.level-pills-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  width: 100%;
}
.level-pill-btn {
  background: rgba(13, 20, 31, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 8px 6px;
  text-align: center;
  font-size: 12px;
  font-weight: 600;
  color: #94a3b8;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
}
.level-pill-btn:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.2);
}
.level-pill-btn.active {
  background: linear-gradient(135deg, rgba(2, 132, 199, 0.25) 0%, rgba(56, 189, 248, 0.15) 100%);
  border-color: #38bdf8;
  color: #38bdf8;
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.25);
}

/* Interactive Seats Selector */
.seats-selector-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  width: 100%;
}
.seat-pill-btn {
  background: rgba(13, 20, 31, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 8px 6px;
  text-align: center;
  font-size: 12px;
  font-weight: 600;
  color: #94a3b8;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}
.seat-pill-btn .seat-num {
  font-size: 14px;
  font-weight: 700;
  color: #ffffff;
}
.seat-pill-btn .seat-label {
  font-size: 10px;
  color: #64748b;
}
.seat-pill-btn:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.2);
}
.seat-pill-btn.active {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.25) 0%, rgba(52, 211, 153, 0.15) 100%);
  border-color: #34d399;
  color: #34d399;
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.25);
}
.seat-pill-btn.active .seat-num {
  color: #34d399;
}
.seat-pill-btn.active .seat-label {
  color: #6ee7b7;
}

/* YouTube Optional Presets in Modal */
.yt-presets-row {
  display: flex;
  gap: 6px;
  margin-top: 6px;
}
.yt-preset-pill {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  padding: 3px 8px;
  font-size: 11px;
  color: #94a3b8;
  cursor: pointer;
  transition: all 0.15s ease;
}
.yt-preset-pill:hover {
  background: rgba(239, 68, 68, 0.15);
  border-color: #ef4444;
  color: #ffffff;
}

/* Modal Actions */
.btn-f4t-submit {
  background: linear-gradient(135deg, #0284c7 0%, #0ea5e9 100%);
  border: 1px solid rgba(56, 189, 248, 0.5);
  color: #ffffff;
  font-weight: 700;
  font-size: 13.5px;
  padding: 10px 22px;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 16px rgba(2, 132, 199, 0.35);
}
.btn-f4t-submit:hover {
  background: linear-gradient(135deg, #0369a1 0%, #0284c7 100%);
  transform: translateY(-1.5px);
  box-shadow: 0 6px 20px rgba(2, 132, 199, 0.5);
}

/* ======================================================== */
/* Floating Scroll-To-Top Button (Exact Match to Screenshot) */
/* ======================================================== */
.btn-scroll-to-top {
  position: fixed !important;
  bottom: 28px !important;
  right: 28px !important;
  width: 48px !important;
  height: 48px !important;
  border-radius: 50% !important;
  background: linear-gradient(135deg, #0284c7 0%, #0ea5e9 100%) !important;
  color: #ffffff !important;
  border: 1.5px solid rgba(255, 255, 255, 0.4) !important;
  box-shadow: 0 8px 25px rgba(2, 132, 199, 0.55), 0 2px 6px rgba(0, 0, 0, 0.45) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
  z-index: 999999 !important;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(18px) scale(0.88);
  transition: opacity 0.25s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.25s cubic-bezier(0.16, 1, 0.3, 1),
              visibility 0.25s ease,
              background 0.2s ease,
              box-shadow 0.2s ease;
  user-select: none;
}

.btn-scroll-to-top.visible {
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
  transform: translateY(0) scale(1) !important;
}

.btn-scroll-to-top:hover {
  background: linear-gradient(135deg, #0ea5e9 0%, #38bdf8 100%);
  transform: translateY(-3px) scale(1.08);
  box-shadow: 0 12px 30px rgba(14, 165, 233, 0.65), 0 4px 10px rgba(0, 0, 0, 0.4);
}

.btn-scroll-to-top:active {
  transform: translateY(0) scale(0.96);
}

.btn-scroll-to-top svg {
  display: block;
  transition: transform 0.2s ease;
}

.btn-scroll-to-top:hover svg {
  transform: translateY(-2px);
}

@media (max-width: 768px) {
  .btn-scroll-to-top {
    bottom: 20px;
    right: 20px;
    width: 44px;
    height: 44px;
  }
}


