/* Custom Popup Styles */

.popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.popup-box {
  background: var(--bg-light, #1e293b);
  border-radius: 12px;
  min-width: 300px;
  max-width: 500px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  animation: slideIn 0.2s ease;
}

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

.popup-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border, #475569);
}

.popup-header h3 {
  margin: 0;
  font-size: 1.1rem;
  color: var(--text, #f8fafc);
}

.popup-close {
  background: none;
  border: none;
  color: var(--text-muted, #94a3b8);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0;
  line-height: 1;
}

.popup-close:hover {
  color: var(--text, #f8fafc);
}

.popup-body {
  padding: 20px;
  color: var(--text, #f8fafc);
}

.popup-body p {
  margin: 0;
  line-height: 1.5;
  white-space: pre-wrap;
}

.popup-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px 20px;
  border-top: 1px solid var(--border, #475569);
}

/* Button styles */
.popup-footer .btn {
  padding: 10px 20px;
  border: none;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.popup-footer .btn-primary {
  background: var(--primary, #6366f1);
  color: white;
}

.popup-footer .btn-primary:hover {
  background: var(--primary-dark, #4f46e5);
}

.popup-footer .btn-secondary {
  background: var(--bg-card, #334155);
  color: var(--text, #f8fafc);
}

.popup-footer .btn-secondary:hover {
  background: var(--border, #475569);
}

.popup-footer .btn-danger {
  background: var(--danger, #ef4444);
  color: white;
}

.popup-footer .btn-success {
  background: var(--secondary, #22c55e);
  color: white;
}

/* Popup types */
.popup-box.error .popup-header h3 {
  color: var(--danger, #ef4444);
}

.popup-box.success .popup-header h3 {
  color: var(--secondary, #22c55e);
}

/* Custom content popup */
.popup-custom {
  max-width: 600px;
}

.popup-custom-content {
  max-height: 400px;
  overflow-y: auto;
}

/* Leaderboard in popup */
.popup-leaderboard-item {
  display: flex;
  align-items: center;
  padding: 10px 12px;
  background: var(--bg, #0f172a);
  border-radius: 8px;
  margin-bottom: 8px;
}

.popup-leaderboard-item:first-child {
  background: linear-gradient(135deg, #FFD700, #FFA500);
  color: var(--bg, #0f172a);
}

.popup-leaderboard-item:nth-child(2) {
  background: linear-gradient(135deg, #E0E0E0, #B0B0B0);
  color: var(--bg, #0f172a);
}

.popup-leaderboard-item:nth-child(3) {
  background: linear-gradient(135deg, #CD7F32, #8C5A2B);
  color: var(--bg, #0f172a);
}

.popup-rank {
  width: 30px;
  font-weight: bold;
}

.popup-name {
  flex: 1;
}

.popup-score {
  font-weight: bold;
}
