/* ==========================================
   GAMING MODAL ENHANCEMENTS
   ========================================== */

/* Import Poppins if not already imported */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;600;700&family=Inter:wght@400;500&display=swap');

.gaming-modal .modal-content,
.gaming-modal-content {
  position: relative;
  overflow: hidden;
  background: rgba(13, 10, 20, 0.92);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 107, 53, 0.25);
  box-shadow: 0 0 40px rgba(255, 107, 53, 0.15), 0 0 80px rgba(0, 212, 255, 0.08), inset 0 1px 0 rgba(255,255,255,0.06);
  border-radius: 20px;
  animation: modalSlideIn 0.35s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

@keyframes modalSlideIn {
  from { opacity: 0; transform: translateY(-40px) scale(0.95); }
  to   { opacity: 1; transform: translateY(0)   scale(1); }
}

.modal-particles {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  z-index: 0;
  opacity: 0.35;
}

.gaming-modal-content > *:not(.modal-particles) {
  position: relative;
  z-index: 1;
}

.gaming-close {
  position: absolute;
  top: 16px; right: 20px;
  font-size: 24px;
  color: #b0b0c8;
  cursor: pointer;
  z-index: 10;
  transition: color 0.2s, transform 0.2s;
}
.gaming-close:hover { color: #ff6b35; transform: rotate(90deg); }

.gaming-modal-header {
  text-align: center;
  padding-bottom: 8px;
}
.gaming-modal-title {
  font-family: 'Poppins', sans-serif;
  font-size: 1.6rem;
  font-weight: 700;
  background: linear-gradient(135deg, #ff6b35, #00d4ff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin: 0 0 4px 0;
}
.gaming-modal-subtitle {
  color: #8888aa;
  font-size: 0.88rem;
  margin: 0 0 10px 0;
}

.modal-avatar-ring {
  width: 60px; height: 60px;
  border-radius: 50%;
  margin: 0 auto 10px;
  background: linear-gradient(135deg, #ff6b35, #00d4ff);
  display: flex; align-items: center; justify-content: center;
  font-size: 28px;
  box-shadow: 0 0 20px rgba(255, 107, 53, 0.4);
}

.last-seen-badge {
  display: inline-block;
  background: rgba(0, 212, 255, 0.12);
  border: 1px solid rgba(0, 212, 255, 0.3);
  color: #00d4ff;
  border-radius: 20px;
  padding: 3px 12px;
  font-size: 0.78rem;
  margin-bottom: 6px;
}

.daily-reward-badge {
  display: inline-block;
  background: linear-gradient(135deg, rgba(255,107,53,0.2), rgba(0,212,255,0.1));
  border: 1px solid rgba(255,107,53,0.4);
  color: #ff6b35;
  border-radius: 20px;
  padding: 4px 14px;
  font-size: 0.8rem;
  margin-bottom: 8px;
  animation: pulseBadge 2s infinite;
}
@keyframes pulseBadge {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255,107,53,0.4); }
  50%       { box-shadow: 0 0 0 6px rgba(255,107,53,0); }
}

/* Continue as section */
.continue-as-section { margin-bottom: 14px; }
.btn-continue-as {
  width: 100%;
  background: linear-gradient(135deg, rgba(255,107,53,0.15), rgba(0,212,255,0.1));
  border: 1px solid rgba(255,107,53,0.4);
  color: #fff;
  border-radius: 12px;
  padding: 12px 16px;
  font-size: 0.95rem;
  cursor: pointer;
  display: flex; align-items: center; justify-content: space-between;
  transition: all 0.25s;
}
.btn-continue-as:hover {
  background: linear-gradient(135deg, rgba(255,107,53,0.3), rgba(0,212,255,0.15));
  border-color: #ff6b35;
}
.continue-as-arrow { font-size: 1.2rem; color: #ff6b35; }

.or-divider {
  display: flex; align-items: center; gap: 12px;
  margin: 12px 0;
  color: #4a4a6a;
  font-size: 0.82rem;
}
.or-divider::before,
.or-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(255,255,255,0.08);
}

/* Form groups */
.gaming-form-group {
  margin-bottom: 16px;
}
.gaming-form-group label {
  display: block;
  font-size: 0.85rem;
  color: #b0b0c8;
  margin-bottom: 6px;
  font-weight: 500;
}
.gaming-form-group input {
  width: 100%;
  background: rgba(255,255,255,0.05);
  border: 1.5px solid rgba(255,255,255,0.1);
  border-radius: 10px;
  padding: 12px 14px;
  color: #fff;
  font-size: 0.95rem;
  transition: border-color 0.25s, box-shadow 0.25s;
  box-sizing: border-box;
  min-height: 48px;
}
.gaming-form-group input:focus {
  outline: none;
  border-color: #ff6b35;
  box-shadow: 0 0 0 3px rgba(255,107,53,0.2), 0 0 12px rgba(255,107,53,0.1);
  background: rgba(255,107,53,0.05);
}
.gaming-form-group input.field-invalid {
  border-color: #ff4444;
  box-shadow: 0 0 0 3px rgba(255,68,68,0.15);
}
.gaming-form-group input.field-valid {
  border-color: #00d4ff;
  box-shadow: 0 0 0 3px rgba(0,212,255,0.1);
}
.field-error {
  display: block;
  color: #ff6666;
  font-size: 0.78rem;
  margin-top: 4px;
  min-height: 16px;
}

/* Password toggle */
.password-wrapper {
  position: relative;
  display: flex; align-items: center;
}
.password-wrapper input {
  padding-right: 46px !important;
}
.toggle-password {
  position: absolute;
  right: 12px;
  background: none;
  border: none;
  cursor: pointer;
  color: #6e6e8f;
  padding: 4px;
  display: flex; align-items: center;
  transition: color 0.2s;
}
.toggle-password:hover { color: #ff6b35; }
.eye-icon {
  width: 18px; height: 18px;
  stroke: currentColor;
}

/* Login extras row */
.login-extras {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.form-row { display: flex; align-items: center; justify-content: space-between; }
.remember-me-label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #b0b0c8;
  font-size: 0.85rem;
  cursor: pointer;
  user-select: none;
}
.remember-checkbox {
  width: 16px; height: 16px;
  accent-color: #ff6b35;
  cursor: pointer;
}
.forgot-link {
  color: #00d4ff;
  font-size: 0.85rem;
  text-decoration: none;
  transition: color 0.2s;
}
.forgot-link:hover { color: #ff6b35; }

/* Rate warning */
.rate-warning {
  background: rgba(255,68,68,0.12);
  border: 1px solid rgba(255,68,68,0.3);
  color: #ff8888;
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 0.82rem;
  margin-bottom: 12px;
  text-align: center;
}

/* Gaming button */
.btn-gaming-primary {
  width: 100%;
  background: linear-gradient(135deg, #ff6b35 0%, #e85d2d 50%, #cc4e22 100%);
  border: none;
  color: #fff;
  border-radius: 12px;
  padding: 14px;
  font-size: 1rem;
  font-weight: 600;
  font-family: 'Poppins', sans-serif;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: all 0.25s;
  min-height: 48px;
  box-shadow: 0 4px 20px rgba(255,107,53,0.35);
  display: flex; align-items: center; justify-content: center; gap: 8px;
}
.btn-gaming-primary::before {
  content: '';
  position: absolute; top: 0; left: -100%; width: 100%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
  transition: left 0.5s;
}
.btn-gaming-primary:hover::before { left: 100%; }
.btn-gaming-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(255,107,53,0.5);
}
.btn-gaming-primary:active { transform: translateY(0); }
.btn-gaming-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* Social divider */
.social-divider {
  display: flex; align-items: center; gap: 12px;
  margin: 16px 0;
  color: #4a4a6a;
  font-size: 0.82rem;
}
.social-divider::before,
.social-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(255,255,255,0.08);
}

/* Google button */
.btn-google {
  width: 100%;
  background: #fff;
  border: 1.5px solid #ddd;
  color: #3c3c3c;
  border-radius: 12px;
  padding: 12px 16px;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  transition: all 0.25s;
  margin-bottom: 14px;
}
.btn-google:hover {
  background: #f8f8f8;
  box-shadow: 0 2px 12px rgba(0,0,0,0.15);
  transform: translateY(-1px);
}
.google-icon {
  width: 20px; height: 20px;
  flex-shrink: 0;
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  top: 20px; right: 20px;
  z-index: 99999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}
.toast {
  background: rgba(13, 10, 20, 0.95);
  backdrop-filter: blur(12px);
  border-radius: 12px;
  padding: 14px 18px;
  display: flex; align-items: flex-start; gap: 12px;
  min-width: 280px; max-width: 360px;
  pointer-events: all;
  animation: toastSlideIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) both;
  border-left: 4px solid;
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
}
.toast.success { border-color: #00d4ff; }
.toast.error   { border-color: #ff4444; }
.toast.warning { border-color: #ffaa00; }
.toast.info    { border-color: #7c5cbf; }
.toast-icon { font-size: 1.2rem; }
.toast-body { flex: 1; }
.toast-title { font-weight: 600; font-size: 0.9rem; margin: 0 0 2px; }
.toast-message { font-size: 0.82rem; color: #b0b0c8; margin: 0; }
.toast-close {
  background: none; border: none; color: #6e6e8f;
  cursor: pointer; font-size: 1rem; padding: 0 2px;
}
.toast-close:hover { color: #fff; }
@keyframes toastSlideIn {
  from { opacity: 0; transform: translateX(50px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes toastFadeOut {
  from { opacity: 1; transform: translateX(0); }
  to   { opacity: 0; transform: translateX(50px); }
}

/* Post-login stats panel */
.post-login-stats {
  background: rgba(13, 10, 20, 0.96);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255,107,53,0.3);
  border-radius: 16px;
  padding: 20px;
  text-align: center;
  animation: modalSlideIn 0.3s ease both;
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 16px;
}
.stat-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px;
  padding: 12px 8px;
}
.stat-value {
  font-size: 1.4rem;
  font-weight: 700;
  color: #ff6b35;
  font-family: 'Poppins', sans-serif;
}
.stat-label {
  font-size: 0.72rem;
  color: #8888aa;
  margin-top: 2px;
}

/* Mobile optimizations */
@media (max-width: 480px) {
  .gaming-modal-content {
    border-radius: 16px 16px 0 0 !important;
    max-height: 92vh;
    overflow-y: auto;
  }
  .gaming-modal {
    align-items: flex-end !important;
  }
  .stats-grid { grid-template-columns: repeat(3, 1fr); }
  .toast-container { top: auto; bottom: 80px; right: 10px; left: 10px; }
  .toast { min-width: unset; }
}

/* Prevent background scroll when modal open */
body.modal-open { overflow: hidden; }
