/*
 * AICQ Game Lobby Styles
 */

.game-lobby-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 10001;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.25s ease;
  pointer-events: none;
}

.game-lobby-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

/* Card */
.gl-card {
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
  border-radius: 20px;
  padding: 28px 32px;
  max-width: 400px;
  width: 90vw;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.06);
  animation: glSlideUp 0.3s ease-out;
}

@keyframes glSlideUp {
  from {
    transform: translateY(20px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* Header */
.gl-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 24px;
  position: relative;
}

.gl-icon {
  font-size: 36px;
  line-height: 1;
}

.gl-title {
  font-size: 20px;
  font-weight: 700;
  color: #fff;
  flex: 1;
}

.gl-close-btn {
  position: absolute;
  top: -4px;
  right: -8px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.08);
  color: #999;
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, color 0.2s;
}

.gl-close-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
}

/* Choices */
.gl-choices {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.gl-choice-btn {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  border-radius: 14px;
  border: 1.5px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: left;
  color: #fff;
  font-family: inherit;
  width: 100%;
}

.gl-choice-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.15);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

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

.gl-choice-icon {
  font-size: 32px;
  line-height: 1;
  flex-shrink: 0;
}

.gl-choice-title {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 2px;
}

.gl-choice-desc {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.45);
}

.gl-choice-wait:hover {
  border-color: rgba(79, 195, 247, 0.4);
  background: rgba(79, 195, 247, 0.08);
}

.gl-choice-robot:hover {
  border-color: rgba(76, 175, 80, 0.4);
  background: rgba(76, 175, 80, 0.08);
}

/* Waiting state */
.gl-waiting {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 20px 0;
}

.gl-spinner {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.1);
  border-top-color: #4fc3f7;
  animation: glSpin 0.8s linear infinite;
}

@keyframes glSpin {
  to { transform: rotate(360deg); }
}

.gl-waiting-title {
  font-size: 17px;
  font-weight: 700;
  color: #fff;
}

.gl-waiting-text {
  font-size: 15px;
  color: rgba(255, 255, 255, 0.6);
}

.gl-waiting-room-id {
  font-size: 20px;
  font-weight: 700;
  color: #4fc3f7;
  font-family: 'SF Mono', 'Consolas', monospace;
  letter-spacing: 3px;
  background: rgba(79, 195, 247, 0.1);
  padding: 6px 16px;
  border-radius: 8px;
}

.gl-waiting-hint {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.35);
  text-align: center;
}

.gl-cancel-btn {
  margin-top: 8px;
  padding: 10px 32px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.06);
  color: #ccc;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.gl-cancel-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

/* Error state */
.gl-error {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 20px 0;
}

.gl-error-icon {
  font-size: 36px;
}

.gl-error-text {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.6);
  text-align: center;
}

.gl-retry-btn {
  padding: 8px 24px;
  border-radius: 8px;
  border: none;
  background: #e94560;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.gl-retry-btn:hover {
  background: #ff5a7a;
}

/* Responsive */
@media (max-width: 480px) {
  .gl-card {
    padding: 20px;
    border-radius: 16px;
  }

  .gl-icon {
    font-size: 28px;
  }

  .gl-title {
    font-size: 17px;
  }

  .gl-choice-btn {
    padding: 12px 14px;
  }

  .gl-choice-icon {
    font-size: 26px;
  }

  .gl-choice-title {
    font-size: 14px;
  }
}
