/* ===== FAKKAR LOBBY ===== */

.lobby-wrapper {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  padding: 1.2rem 1.8rem;
  gap: 1.2rem;
  overflow-y: auto;
  overflow-x: hidden;
}

/* ===== HEADER ===== */
.game-header-lobby {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 2.5rem;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-sm);
  flex-shrink: 0;
  min-height: 90px;
}

.logo-container {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  text-decoration: none;
  color: inherit;
}

.header-actions { display: flex; align-items: center; gap: 0.75rem; }

.logo-icon {
  position: relative;
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--primary-light), var(--primary));
  border-radius: var(--radius-md);
  box-shadow: 0 4px 14px var(--primary-glow);
  flex-shrink: 0;
}

.logo-bulb {
  font-size: 2.2rem;
  animation: float 4s ease-in-out infinite;
  position: relative;
  z-index: 2;
}

.logo-text { display: flex; flex-direction: column; }

.game-title {
  font-family: var(--font-display);
  font-size: 2.8rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.5px;
  line-height: 1;
}
.game-title span { color: var(--primary); }

.game-subtitle {
  font-size: 1rem;
  color: var(--text-3);
  font-weight: 500;
  margin-top: 0.3rem;
}

.version-badge {
  background: var(--surface-2);
  border: 1.5px solid var(--border);
  color: var(--text-3);
  padding: 0.5rem 1.2rem;
  border-radius: var(--radius-full);
  font-size: 0.95rem;
  font-weight: 700;
}

/* ===== MAIN GRID ===== */
.lobby-content {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 1.2rem;
  flex-shrink: 0;
}

/* ===== PANELS SHARED ===== */
.setup-panel,
.stats-panel {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* ===== SETUP PANEL ===== */
.setup-panel {
  padding: 2.5rem 3rem;
  justify-content: center;
  position: relative;
  gap: 0;
}
.setup-panel::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--indigo), var(--primary));
  background-size: 200% 100%;
  animation: gradientShift 3s ease infinite;
}

.panel-header { text-align: center; margin-bottom: 2.2rem; }
.panel-header h2 {
  font-size: 2.2rem;
  font-weight: 800;
  font-family: var(--font-display);
  color: var(--text);
  margin-bottom: 0.5rem;
}
.panel-header p { color: var(--text-3); font-size: 1.05rem; }

.team-form { display: flex; flex-direction: column; }
.team-setup { display: flex; flex-direction: column; gap: 1.4rem; margin-bottom: 2rem; }

.team-input-group {
  padding: 1.8rem 2rem;
  border-radius: var(--radius-lg);
  border: 1.5px solid var(--border);
  background: var(--surface-2);
  transition: var(--transition);
  position: relative;
}
.team-input-group.alpha-team { border-inline-start: 4px solid var(--primary); }
.team-input-group.beta-team  { border-inline-start: 4px solid var(--indigo); }
.team-input-group:hover { box-shadow: var(--shadow-md); }
.team-input-group.valid { border-color: var(--green); }
.team-input-group:focus-within {
  border-color: var(--primary);
  background: var(--surface);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

.team-input-group label {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-2);
  margin-bottom: 1rem;
  font-family: var(--font-display);
}
.team-input-group .team-icon { font-size: 1.4rem; }

.team-input {
  width: 100%;
  padding: 1.2rem 1.5rem;
  font-size: 1.15rem;
  font-weight: 600;
  font-family: var(--font-body);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  color: var(--text);
  text-align: center;
  transition: var(--transition);
}
.team-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
}
.team-input::placeholder { color: var(--text-3); }

.vs-connector {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin: 0.8rem 0;
}
.vs-text {
  background: var(--surface);
  border: 1.5px solid var(--border);
  color: var(--text-3);
  padding: 0.6rem 1.4rem;
  border-radius: var(--radius-full);
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 1px;
}
.connector-line { flex: 1; height: 1.5px; background: var(--border); }

/* ===== LAUNCH BUTTON ===== */
.launch-button {
  position: relative;
  padding: 1.5rem 2rem;
  font-size: 1.2rem;
  font-weight: 800;
  font-family: var(--font-display);
  border: none;
  border-radius: var(--radius-lg);
  cursor: pointer;
  color: white;
  transition: var(--transition);
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  box-shadow: 0 4px 18px var(--primary-glow);
}
.launch-button:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 28px var(--primary-glow);
  filter: brightness(1.05);
}
.launch-button:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }
.btn-content { display: flex; align-items: center; justify-content: center; gap: 0.7rem; }

/* ===== STATS PANEL ===== */
.stats-panel { padding: 2rem; gap: 1.2rem; justify-content: space-between; }

.stats-panel .panel-header h3 {
  font-size: 1.3rem;
  font-weight: 800;
  font-family: var(--font-display);
  color: var(--text);
  margin-bottom: 0.3rem;
}

.mission-details { display: flex; flex-direction: column; gap: 0.9rem; flex: 1; }
.detail-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.2rem;
  background: var(--surface-2);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  flex: 1;
}
.detail-icon { font-size: 1.5rem; flex-shrink: 0; }
.detail-content h4 { font-size: 1rem; font-weight: 700; color: var(--text); margin-bottom: 0.25rem; }
.detail-content p  { font-size: 0.88rem; color: var(--text-3); line-height: 1.4; }

.difficulty-preview {
  background: var(--surface-2);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.5rem;
}
.difficulty-preview h4 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 1rem;
  font-family: var(--font-display);
}
.difficulty-bars { display: flex; flex-direction: column; gap: 0.6rem; }
.diff-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.9rem 1.2rem;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-weight: 700;
}
.diff-bar.easy   { background: rgba(16,185,129,0.1);  color: #059669; border: 1px solid rgba(16,185,129,0.2); }
.diff-bar.medium { background: rgba(245,166,35,0.12); color: var(--primary-dark); border: 1px solid rgba(245,166,35,0.25); }
.diff-bar.hard   { background: rgba(239,68,68,0.08);  color: #DC2626; border: 1px solid rgba(239,68,68,0.18); }

/* ===== SECTIONS BELOW MAIN GRID ===== */
.lobby-section {
  flex-shrink: 0;
  padding: 1.5rem 0;
  border-top: 1.5px solid var(--border);
}

.section-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--primary-dark);
  margin-bottom: 0.4rem;
}
.section-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--text);
  margin-bottom: 1.4rem;
}
.section-title span { color: var(--primary); }

/* ===== GAME MODES ===== */
.modes-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}
.mode-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.7rem;
  padding: 1.6rem 1rem;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
}
.mode-item.active {
  border-color: var(--primary);
  background: rgba(245,166,35,0.04);
}
.mode-item.coming-soon { opacity: 0.55; }

.mode-icon {
  font-size: 1.8rem;
  width: 54px; height: 54px;
  background: var(--surface-2);
  border-radius: var(--radius-md);
  border: 1.5px solid var(--border);
  display: flex; align-items: center; justify-content: center;
}
.mode-item.active .mode-icon {
  background: linear-gradient(135deg, var(--primary-light), var(--primary));
  border-color: var(--primary);
}
.mode-name {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text);
  font-family: var(--font-display);
}
.mode-desc { font-size: 0.78rem; color: var(--text-3); line-height: 1.4; }
.mode-tag {
  font-size: 0.68rem; font-weight: 700;
  padding: 0.22rem 0.7rem;
  border-radius: var(--radius-full);
}
.mode-tag.live { background: rgba(16,185,129,0.12); color: #059669; border: 1px solid rgba(16,185,129,0.25); }
.mode-tag.soon { background: var(--surface-2); color: var(--text-3); border: 1px solid var(--border); }

/* ===== FOOTER ===== */
.lobby-footer {
  border-top: 1.5px solid var(--border);
  padding: 1.5rem 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-shrink: 0;
  margin-top: 0.5rem;
}
.footer-left { display: flex; align-items: center; gap: 1.5rem; }
.footer-logo {
  display: flex; align-items: center; gap: 0.6rem;
  font-family: var(--font-display);
  font-size: 0.95rem; font-weight: 900;
  color: var(--text); text-decoration: none;
}
.footer-logo span { color: var(--primary); }
.footer-rights { font-size: 0.78rem; color: var(--text-3); }

.footer-right { display: flex; align-items: center; gap: 1.5rem; }
.footer-links { display: flex; gap: 1.2rem; }
.footer-link {
  font-size: 0.8rem; color: var(--text-3);
  text-decoration: none; font-weight: 600;
  transition: var(--transition);
}
.footer-link:hover { color: var(--primary); }

.footer-social { display: flex; gap: 0.5rem; }
.social-btn {
  width: 36px; height: 36px;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  border: 1.5px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  text-decoration: none; cursor: pointer;
  color: var(--text-2); font-weight: 700; font-size: 0.85rem;
  transition: var(--transition);
}
.social-btn:hover { border-color: var(--primary); background: var(--primary-glow); transform: translateY(-2px); }
/* ===== RESPONSIVE ===== */
@media (max-width: 1100px) {
  .lobby-content { grid-template-columns: 1fr; gap: 1rem; }
  .setup-panel { order: -1; }
  .lobby-wrapper { padding: 1rem; }
  .modes-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  .lobby-wrapper { padding: 0.75rem; gap: 0.75rem; }
  .game-header-lobby { padding: 0.9rem 1rem; min-height: 0; }
  .logo-container { gap: 0.8rem; }
  .logo-icon { width: 48px; height: 48px; }
  .logo-bulb { font-size: 1.6rem; }
  .game-title { font-size: 1.6rem; }
  .game-subtitle { font-size: 0.8rem; }
  .version-badge { display: none; }
  .setup-panel { padding: 1.75rem 1.25rem; }
  .panel-header { margin-bottom: 1.5rem; }
  .panel-header h2 { font-size: 1.5rem; }
  .panel-header p { font-size: 0.95rem; }
  .team-setup { gap: 0.9rem; }
  .team-input-group { padding: 1.2rem; }
  .stats-panel { padding: 1.25rem; }
  .lobby-footer { flex-direction: column; gap: 1rem; text-align: center; }
  .footer-left, .footer-right { flex-direction: column; gap: 0.75rem; }
}
@media (max-width: 480px) {
  .modes-grid { grid-template-columns: 1fr; }
}
