/* Custom styling for Rifarito Engine matching Rifa luxury neon theme */
:root {
  --rifa-primary: #ec1379;
  --rifa-secondary: #00ffc2;
  --rifa-accent: #fbb034;
  --rifa-bg-dark: #0b004b;
  --rifa-card-bg: #190967;
  --rifa-card-border: rgba(255, 255, 255, 0.1);
  --rifa-glow: 0 0 20px rgba(236, 19, 121, 0.4);
}

/* Custom enhancements for Rifa */
.rifa-neon-btn {
  background: linear-gradient(90deg, #ec1379 0%, #7b1fa2 100%);
  color: #fff !important;
  font-weight: 700;
  border: none;
  border-radius: 50px;
  padding: 12px 30px;
  box-shadow: 0 10px 25px rgba(236, 19, 121, 0.45);
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.rifa-neon-btn:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 15px 35px rgba(236, 19, 121, 0.65);
  color: #fff !important;
}

.rifa-outline-btn {
  background: transparent;
  color: #fff !important;
  border: 2px solid var(--rifa-secondary);
  border-radius: 50px;
  padding: 10px 25px;
  font-weight: 700;
  transition: all 0.3s ease;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.rifa-outline-btn:hover {
  background: var(--rifa-secondary);
  color: #0b004b !important;
  box-shadow: 0 0 25px rgba(0, 255, 194, 0.5);
}

/* Glassmorphism containers */
.rifa-glass-card {
  background: rgba(25, 9, 103, 0.85);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 20px;
  padding: 30px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

/* Ticket Grid Engine */
.ticket-grid-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(65px, 1fr));
  gap: 10px;
  max-height: 420px;
  overflow-y: auto;
  padding: 15px;
  background: rgba(11, 0, 75, 0.7);
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.ticket-ball {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  font-weight: 800;
  font-size: 15px;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  user-select: none;
  background: #201178;
  color: #d1c4e9;
  border: 1px solid rgba(255, 255, 255, 0.1);
  position: relative;
}

.ticket-ball:hover:not(.sold) {
  transform: translateY(-4px) scale(1.08);
  border-color: var(--rifa-secondary);
  color: #fff;
  box-shadow: 0 0 15px rgba(0, 255, 194, 0.4);
}

.ticket-ball.selected {
  background: linear-gradient(135deg, #ec1379 0%, #ff4081 100%);
  color: #ffffff;
  border-color: #fff;
  box-shadow: 0 0 20px rgba(236, 19, 121, 0.8);
  transform: scale(1.08);
  z-index: 2;
}

.ticket-ball.sold {
  background: rgba(30, 20, 80, 0.4);
  color: rgba(255, 255, 255, 0.25);
  cursor: not-allowed;
  border: 1px dashed rgba(255, 255, 255, 0.1);
  text-decoration: line-through;
}

.ticket-ball.reserved {
  background: rgba(251, 176, 52, 0.2);
  color: #fbb034;
  border-color: #fbb034;
  cursor: not-allowed;
}

/* Quick Pick Badge Buttons */
.quick-pick-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  padding: 8px 16px;
  border-radius: 30px;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
}
.quick-pick-btn:hover {
  background: var(--rifa-primary);
  border-color: var(--rifa-primary);
  box-shadow: 0 0 15px rgba(236, 19, 121, 0.5);
}

/* Live Progress Bar with glow */
.rifa-progress {
  height: 12px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  overflow: hidden;
  position: relative;
}
.rifa-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #ec1379, #fbb034, #00ffc2);
  border-radius: 10px;
  box-shadow: 0 0 15px rgba(236, 19, 121, 0.7);
  transition: width 0.8s ease-in-out;
}

/* Digital Winner Drawer Animation */
.winner-wheel-container {
  background: radial-gradient(circle, #290e7e 0%, #0c0044 100%);
  border: 3px solid var(--rifa-accent);
  border-radius: 24px;
  padding: 40px;
  text-align: center;
  box-shadow: 0 0 50px rgba(251, 176, 52, 0.35);
  position: relative;
  overflow: hidden;
}

.winner-counter-box {
  display: inline-flex;
  gap: 15px;
  margin: 25px 0;
}
.winner-digit {
  width: 70px;
  height: 90px;
  background: #0f0535;
  border: 2px solid var(--rifa-secondary);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
  font-weight: 900;
  color: var(--rifa-secondary);
  box-shadow: inset 0 0 20px rgba(0, 255, 194, 0.3), 0 0 20px rgba(0, 255, 194, 0.2);
  font-family: 'Josefin Sans', monospace;
}

/* Floating Admin Panel Trigger - ONLY VISIBLE FOR LOGGED IN ADMIN */
.floating-admin-trigger {
  position: fixed;
  bottom: 30px;
  left: 30px;
  right: auto;
  z-index: 9999;
  background: linear-gradient(135deg, #11998e, #38ef7d);
  color: #0b004b;
  font-weight: 800;
  padding: 14px 24px;
  border-radius: 50px;
  box-shadow: 0 10px 30px rgba(56, 239, 125, 0.5);
  cursor: pointer;
  display: none !important;
  align-items: center;
  gap: 10px;
  transition: all 0.3s;
  border: 2px solid #fff;
}
.floating-admin-trigger.is-admin-active {
  display: flex !important;
}
.floating-admin-trigger:hover {
  transform: translateY(-5px) scale(1.05);
  box-shadow: 0 15px 40px rgba(56, 239, 125, 0.7);
}

/* Floating WhatsApp Button */
.floating-whatsapp-btn {
  position: fixed;
  bottom: 30px;
  right: 30px;
  z-index: 9995;
  background: #25D366;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px 12px 14px;
  border-radius: 50px;
  box-shadow: 0 8px 24px rgba(37, 211, 102, 0.45);
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  border: 2px solid rgba(255, 255, 255, 0.25);
}
.floating-whatsapp-btn:hover {
  transform: translateY(-4px) scale(1.05);
  box-shadow: 0 14px 32px rgba(37, 211, 102, 0.65);
  color: #ffffff;
}
.floating-whatsapp-btn .whatsapp-icon {
  font-size: 28px;
  line-height: 1;
}
.floating-whatsapp-btn .whatsapp-tooltip {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.2px;
  white-space: nowrap;
}
.whatsapp-pulse {
  position: absolute;
  top: 50%;
  left: 20px;
  transform: translate(-50%, -50%);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(37, 211, 102, 0.4);
  z-index: -1;
  animation: waPulse 2s infinite;
  pointer-events: none;
}
@keyframes waPulse {
  0% {
    transform: translate(-50%, -50%) scale(0.9);
    opacity: 0.8;
  }
  70% {
    transform: translate(-50%, -50%) scale(1.6);
    opacity: 0;
  }
  100% {
    transform: translate(-50%, -50%) scale(1.6);
    opacity: 0;
  }
}
@media (max-width: 767px) {
  .floating-whatsapp-btn {
    bottom: 20px;
    right: 20px;
    padding: 13px;
    border-radius: 50%;
  }
  .whatsapp-pulse {
    left: 50%;
  }
}

/* Modals */
.rifa-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(11, 0, 75, 0.85);
  backdrop-filter: blur(8px);
  overflow-y: auto;
  padding: 30px 15px;
  align-items: center;
  justify-content: center;
}
.rifa-modal.active {
  display: flex;
}
.rifa-modal-content {
  background: #15065c;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 24px;
  max-width: 720px;
  width: 100%;
  color: #fff;
  padding: 35px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.6);
  position: relative;
  animation: modalIn 0.3s ease-out;
}
@keyframes modalIn {
  from { opacity: 0; transform: scale(0.95) translateY(20px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}
.rifa-modal-close {
  position: absolute;
  top: 20px;
  right: 25px;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: #fff;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  cursor: pointer;
  transition: 0.2s;
}
.rifa-modal-close:hover {
  background: var(--rifa-primary);
}

/* Upload dropzone for payment proof */
.proof-dropzone {
  border: 2px dashed rgba(255, 255, 255, 0.25);
  border-radius: 16px;
  padding: 25px;
  text-align: center;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.03);
  transition: all 0.2s;
}
.proof-dropzone:hover, .proof-dropzone.dragover {
  border-color: var(--rifa-secondary);
  background: rgba(0, 255, 194, 0.05);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: #0b004b;
}
::-webkit-scrollbar-thumb {
  background: #2a1188;
  border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--rifa-primary);
}

/* Ticket Pill */
.selected-pill {
  background: rgba(236, 19, 121, 0.2);
  border: 1px solid var(--rifa-primary);
  color: #ff80ab;
  padding: 4px 10px;
  border-radius: 20px;
  font-weight: 700;
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.selected-pill span.remove {
  cursor: pointer;
  color: #fff;
  font-weight: 900;
}
.selected-pill span.remove:hover {
  color: #ff1744;
}

/* Verified Badge in Public Verifier */
.ticket-verified-card {
  background: linear-gradient(135deg, #1c0a6b 0%, #0d0144 100%);
  border: 2px solid var(--rifa-secondary);
  border-radius: 20px;
  padding: 25px;
  box-shadow: 0 10px 30px rgba(0, 255, 194, 0.2);
}

/* Bank Pill Buttons in Footer */
.bank-pill-btn {
  background: #190967;
  padding: 8px 14px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.18);
  transition: all 0.22s ease;
  user-select: none;
}
.bank-pill-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.45);
  border-color: var(--rifa-secondary) !important;
  color: #00ffc2;
}
.bank-pill-btn:active {
  transform: translateY(0);
}
