@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=Cinzel:wght@600;700;900&display=swap');

:root {
  --bg-color: #0b0f19;
  --bg-gradient: linear-gradient(135deg, #0b0f19 0%, #121829 50%, #07090e 100%);
  --gold-primary: #dfba6b;
  --gold-secondary: #eed296;
  --gold-dark: #b28e3b;
  --gold-gradient: linear-gradient(135deg, #eed296 0%, #dfba6b 50%, #b28e3b 100%);
  --text-light: #f3f4f6;
  --text-muted: #9ca3af;
  --glass-bg: rgba(17, 24, 39, 0.7);
  --glass-border: rgba(223, 186, 107, 0.15);
  --glass-shadow: 0 15px 35px 0 rgba(0, 0, 0, 0.5);
}

body {
  font-family: 'Outfit', sans-serif;
  background: var(--bg-gradient);
  color: var(--text-light);
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  position: relative;
}

/* Background overlay decoration */
body::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at 10% 20%, rgba(212, 175, 55, 0.05) 0%, transparent 40%),
              radial-gradient(circle at 90% 80%, rgba(138, 43, 226, 0.08) 0%, transparent 50%);
  z-index: -1;
  pointer-events: none;
}

h1, h2, h3, h4, h5, .font-title {
  font-family: 'Cinzel', serif;
  font-weight: 700;
  letter-spacing: 1px;
}

/* Glassmorphism Cards */
.glass-card {
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
  border-radius: 16px;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.glass-card:hover {
  border-color: rgba(223, 186, 107, 0.35);
  box-shadow: 0 12px 40px 0 rgba(223, 186, 107, 0.1);
}

/* Gold Text Gradient */
.gold-text {
  background: var(--gold-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.15));
}

/* Override Bootstrap text-muted for higher contrast on dark backgrounds */
.text-muted {
  color: var(--text-muted) !important;
}

/* Glassmorphism Alerts for Premium Dark Mode */
.alert-danger {
  background: rgba(220, 53, 69, 0.15) !important;
  border: 1px solid rgba(220, 53, 69, 0.3) !important;
  color: #ff8585 !important;
}
.alert-success {
  background: rgba(40, 167, 69, 0.15) !important;
  border: 1px solid rgba(40, 167, 69, 0.3) !important;
  color: #5deb7a !important;
}
.alert-warning {
  background: rgba(255, 193, 7, 0.15) !important;
  border: 1px solid rgba(255, 193, 7, 0.3) !important;
  color: #ffe066 !important;
}
.alert-info {
  background: rgba(23, 162, 184, 0.15) !important;
  border: 1px solid rgba(23, 162, 184, 0.3) !important;
  color: #5bc0de !important;
}

/* Custom Input Styling */
.custom-input {
  background: rgba(255, 255, 255, 0.05) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  color: #fff !important;
  border-radius: 8px !important;
  padding: 12px 20px !important;
  font-weight: 500;
  letter-spacing: 1px;
  transition: all 0.3s ease;
}

.custom-input::placeholder {
  color: rgba(255, 255, 255, 0.3);
}

.custom-input:focus {
  background: rgba(255, 255, 255, 0.08) !important;
  border-color: var(--gold-primary) !important;
  box-shadow: 0 0 15px rgba(212, 175, 55, 0.3) !important;
  outline: none;
}

select.custom-input option {
  background-color: #0e1424;
  color: #fff;
}

/* Premium Gold Button */
.btn-gold {
  background: var(--gold-gradient);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #0b0f19;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  padding: 12px 30px;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(223, 186, 107, 0.25);
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.btn-gold:hover {
  background: linear-gradient(135deg, #fff 0%, #eed296 40%, #dfba6b 100%);
  color: #0b0f19;
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(223, 186, 107, 0.45);
}

.btn-gold:active {
  transform: translateY(-1px);
}

/* Game Board Styling */
.treasure-room {
  min-height: 60vh;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Floating Animation for boxes */
@keyframes float {
  0% { transform: translateY(0px) rotate(0deg); }
  50% { transform: translateY(-12px) rotate(0.5deg); }
  100% { transform: translateY(0px) rotate(0deg); }
}

/* Shaking Animation for clicking */
@keyframes shake {
  0%, 100% { transform: translateX(0) scale(1.05); }
  10%, 30%, 50%, 70%, 90% { transform: translateX(-8px) scale(1.05); }
  20%, 40%, 60%, 80% { transform: translateX(8px) scale(1.05); }
}

.box-wrapper {
  position: relative;
  cursor: pointer;
  transition: all 0.3s ease;
  animation: float 4s ease-in-out infinite;
}

/* Stagger floating animations for boxes */
.box-wrapper:nth-child(2) {
  animation-delay: 0.6s;
}
.box-wrapper:nth-child(3) {
  animation-delay: 1.2s;
}

.box-wrapper:hover {
  transform: scale(1.05) translateY(-5px);
  filter: drop-shadow(0 0 25px rgba(223, 186, 107, 0.25));
  animation-play-state: paused;
}

.box-wrapper.shaking {
  animation: shake 0.6s ease-in-out !important;
}

.box-img {
  width: 100%;
  max-width: 250px;
  height: auto;
  transition: all 0.3s ease;
  filter: drop-shadow(0 10px 15px rgba(0,0,0,0.5));
}

/* Glow effect behind open box */
.glow-behind {
  position: absolute;
  top: 45%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 250px;
  height: 250px;
  background: radial-gradient(circle, rgba(223, 186, 107, 0.35) 0%, rgba(223, 186, 107, 0) 70%);
  z-index: -1;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s ease;
}

.box-wrapper.open .glow-behind {
  opacity: 1;
}

/* Modal styling for Prize Reveal */
.prize-modal .modal-content {
  background: linear-gradient(135deg, #0b0f19 0%, #17223b 100%) !important;
  border: 1px solid var(--gold-primary) !important;
  border-radius: 20px !important;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5) !important;
  color: #fff !important;
}

.prize-modal .modal-header {
  border-bottom: 1px solid rgba(223, 186, 107, 0.08) !important;
}

.prize-modal .modal-footer {
  border-top: 1px solid rgba(223, 186, 107, 0.08) !important;
}

.prize-reveal-image {
  max-width: 150px;
  height: auto;
  animation: zoomInPop 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes zoomInPop {
  0% { transform: scale(0) rotate(-15deg); opacity: 0; }
  70% { transform: scale(1.1) rotate(5deg); }
  100% { transform: scale(1) rotate(0); opacity: 1; }
}

/* Confetti particles */
.confetti-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 9999;
  overflow: hidden;
}

.confetti-piece {
  position: absolute;
  width: 10px;
  height: 20px;
  background: #ffd700;
  opacity: 0.8;
  top: -20px;
}

/* Admin Styling */
.admin-body {
  font-size: 0.82rem !important;
}

.admin-body h1, .admin-body .h1 {
  font-size: 1.35rem !important;
}

.admin-body h3, .admin-body .h3 {
  font-size: 1.2rem !important;
}

.admin-body h5, .admin-body .h5 {
  font-size: 1.0rem !important;
}

.admin-body .form-control, 
.admin-body .form-select, 
.admin-body .input-group-text,
.admin-body .btn {
  font-size: 0.8rem !important;
}

.admin-body .table th {
  font-size: 0.75rem !important;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.admin-body .table td {
  font-size: 0.78rem !important;
}

.admin-nav {
  background: rgba(11, 15, 25, 0.9) !important;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(223, 186, 107, 0.08) !important;
  position: sticky;
  top: 0;
  z-index: 1030;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.admin-sidebar {
  background: #0e1424;
  border-right: 1px solid rgba(255, 255, 255, 0.05);
  position: sticky;
  top: 73px;
  height: calc(100vh - 73px);
  overflow-y: auto;
  z-index: 1010;
}

.admin-sidebar .nav-link {
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.95rem;
  padding: 10px 16px;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.admin-sidebar .nav-link:hover, .admin-sidebar .nav-link.active {
  color: #fff;
  background: rgba(255, 255, 255, 0.03);
  border-left: 3px solid var(--gold-primary);
}

.admin-card {
  background: rgba(18, 26, 47, 0.65);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(223, 186, 107, 0.08);
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
  transition: all 0.3s ease;
}

.admin-card:hover {
  border-color: rgba(223, 186, 107, 0.18);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.45);
}

.table-custom {
  color: var(--text-light) !important;
}

.table-custom th {
  background: rgba(255, 255, 255, 0.03) !important;
  color: var(--gold-primary) !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
  font-weight: 600;
}

.table-custom td {
  background: transparent !important;
  color: var(--text-light) !important;
  border-color: rgba(255, 255, 255, 0.05) !important;
  vertical-align: middle;
}

.badge-active {
  background-color: rgba(110, 231, 183, 0.12) !important;
  color: #6ee7b7 !important;
  border: 1px solid rgba(110, 231, 183, 0.25) !important;
}

.badge-used {
  background-color: rgba(252, 165, 165, 0.12) !important;
  color: #fca5a5 !important;
  border: 1px solid rgba(252, 165, 165, 0.25) !important;
}

/* High-contrast dark mode overrides for Bootstrap text utility classes */
.text-success {
  color: #6ee7b7 !important;
}
.text-danger {
  color: #fca5a5 !important;
}
.text-warning {
  color: #f5d082 !important;
}
.text-info {
  color: #93c5fd !important;
}

/* Custom Styled Scrollbar for Premium Dark Theme */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.2);
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(223, 186, 107, 0.35);
}

/* Responsive adjustments */
@media (max-width: 991.98px) {
  .admin-sidebar {
    min-height: auto;
    border-right: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    position: relative !important;
    top: 0 !important;
    height: auto !important;
  }
}

@media (max-width: 768px) {
  .box-img {
    max-width: 170px;
  }
  .treasure-room {
    min-height: 50vh;
  }
}

@media (max-width: 480px) {
  .box-img {
    max-width: 85px;
  }
  .glow-behind {
    width: 100px;
    height: 100px;
  }
  h1 {
    font-size: 1.6rem;
  }
  .btn-gold {
    padding: 10px 20px;
    font-size: 0.85rem;
    letter-spacing: 1px;
  }
}

/* Premium Gold Outline Button Style */
.btn-gold-outline,
.btn-gold-outline:link,
.btn-gold-outline:visited {
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  border: 1px solid rgba(223, 186, 107, 0.3) !important;
  color: var(--gold-primary) !important;
  background: transparent !important;
}

.btn-gold-outline:hover {
  transform: translateY(-2px);
  background: var(--gold-gradient) !important;
  color: #0b0f19 !important;
  box-shadow: 0 5px 15px rgba(223, 186, 107, 0.4) !important;
  border-color: transparent !important;
}

/* Call To Action Registration Button Pulsing Animation */
.btn-register-pulse {
  animation: registerPulse 2s infinite ease-in-out;
}

.btn-register-pulse:hover {
  animation-play-state: paused;
}

@keyframes registerPulse {
  0% {
    box-shadow: 0 0 0 0 rgba(223, 186, 107, 0.25);
    transform: scale(1);
  }
  50% {
    box-shadow: 0 0 15px 4px rgba(223, 186, 107, 0.45);
    transform: scale(1.02);
    border-color: rgba(223, 186, 107, 0.8) !important;
    background: rgba(223, 186, 107, 0.05);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(223, 186, 107, 0);
    transform: scale(1);
  }
}

/* Premium Glassmorphic Sticky Header */
.sticky-header {
  position: sticky;
  top: 0;
  z-index: 1020;
  background: rgba(11, 15, 25, 0.75) !important;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(223, 186, 107, 0.08) !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
  transition: all 0.3s ease;
}

/* Custom Premium Audio Control Button */
.btn-audio-custom {
  border-radius: 50px;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid rgba(223, 186, 107, 0.25) !important;
  color: var(--gold-primary) !important;
  background: transparent;
  transition: all 0.3s ease;
}

.btn-audio-custom.muted {
  opacity: 0.5;
  border-color: rgba(255, 255, 255, 0.12) !important;
  color: var(--text-muted) !important;
}

.btn-audio-custom.active {
  opacity: 1;
  border-color: var(--gold-primary) !important;
  box-shadow: 0 0 10px rgba(223, 186, 107, 0.2);
}

.btn-audio-custom:hover {
  opacity: 1;
  background: rgba(223, 186, 107, 0.1);
  border-color: var(--gold-primary) !important;
  color: var(--gold-primary) !important;
}

/* Admin Header Buttons Styling Override */
.admin-nav .btn-outline-warning {
  border: 1px solid rgba(223, 186, 107, 0.3) !important;
  color: var(--gold-primary) !important;
  background: transparent !important;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  font-size: 0.75rem;
  font-weight: 500;
  border-radius: 6px;
}

.admin-nav .btn-outline-warning:hover {
  background: var(--gold-gradient) !important;
  color: #0b0f19 !important;
  border-color: transparent !important;
  box-shadow: 0 4px 12px rgba(223, 186, 107, 0.25);
  transform: translateY(-1px);
}

.admin-nav .btn-outline-danger {
  border: 1px solid rgba(239, 68, 68, 0.25) !important;
  color: #f87171 !important;
  background: transparent !important;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  font-size: 0.75rem;
  font-weight: 500;
  border-radius: 6px;
}

.admin-nav .btn-outline-danger:hover {
  background: #ef4444 !important;
  color: #ffffff !important;
  border-color: transparent !important;
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
  transform: translateY(-1px);
}

/* Footer Self Internal Link hover styling */
.footer-link {
  color: var(--gold-primary) !important;
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-link:hover {
  color: #eed296 !important;
}

/* Prize Claim Summary Card Style */
.prize-summary-box {
  background: rgba(11, 15, 25, 0.5) !important;
  border: 1px solid rgba(223, 186, 107, 0.18) !important;
  border-radius: 12px;
  padding: 20px;
  box-shadow: inset 0 0 20px rgba(223, 186, 107, 0.05);
}

/* Responsive adjustments for Mobile Navbar */
@media (max-width: 576px) {
  .navbar-brand span {
    font-size: 1rem !important; /* Smaller brand name text */
  }
  .navbar-brand .brand-icon {
    width: 28px !important;
    height: 28px !important;
  }
  .navbar-brand .brand-icon i {
    font-size: 0.9rem !important;
  }
  .sticky-header .btn-gold {
    padding: 6px 10px !important;
    font-size: 0.65rem !important;
  }
  #btnToggleMusic {
    width: 28px !important;
    height: 28px !important;
  }
  #btnToggleMusic i {
    font-size: 0.85rem !important;
  }
}
