/* Enhanced styles for raffle cards and selection effects */

/* Base raffle card styles enhancement */
.raffle-card {
  transition: all 0.3s ease-in-out;
  overflow: hidden;
  position: relative;
}

/* Hover effect */
.raffle-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(255, 215, 0, 0.4);
}

/* Add shine effect on hover */
.raffle-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 50%;
  height: 100%;
  background: linear-gradient(
    to right,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.3) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  transform: skewX(-25deg);
  transition: all 0.75s;
  z-index: 2;
}

.raffle-card:hover::before {
  left: 125%;
}

/* Selection effects with gold/yellow glow */
.raffle-card.selected {
  box-shadow: 
    0 0 10px 5px #FFD700,
    0 0 20px 10px rgba(255, 215, 0, 0.6),
    0 0 30px 15px rgba(192, 138, 47, 0.5);
  border: 3px solid #FFD700 !important;
  transform: scale(1.03);
}

/* Pulse animation for selected cards */
@keyframes selectedPulse {
  0% { box-shadow: 0 0 10px 5px #FFD700, 0 0 20px 10px rgba(255, 215, 0, 0.4); }
  50% { box-shadow: 0 0 15px 8px #FFD700, 0 0 30px 15px rgba(255, 215, 0, 0.6); }
  100% { box-shadow: 0 0 10px 5px #FFD700, 0 0 20px 10px rgba(255, 215, 0, 0.4); }
}

.raffle-card.selected {
  animation: selectedPulse 2s infinite;
}

/* Unselected state for raffle cards */
.raffle-card {
  opacity: 0.9;
  filter: grayscale(0.3) brightness(0.85);
  transition: opacity 0.3s, filter 0.3s;
}
.raffle-card.selected {
  opacity: 1;
  filter: none;
}

/* Enhanced overlay */
.raffle-overlay {
  background: rgba(0, 0, 0, 0.65);
  font-weight: 700;
  letter-spacing: 1.5px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
  transform: translateY(0);
  transition: transform 0.3s ease, background 0.3s ease;
  border-top: 1px solid rgba(255, 215, 0, 0.5);
}

.raffle-card:hover .raffle-overlay {
  background: rgba(0, 0, 0, 0.8);
}

/* Selected badge styling */
.selected-badge {
  letter-spacing: 2px;
  text-transform: uppercase;
  font-family: 'Montserrat', 'Segoe UI', Arial, sans-serif;
  animation: badgePulse 2s infinite alternate ease-in-out, badgeGlow 1.2s infinite alternate;
  position: absolute;
  left: 0; right: 0;
  top: 50%;
  transform: translateY(-50%);
  background: linear-gradient(90deg, rgba(0,0,0,0.85) 60%, #FFD70022 100%);
  color: #FFD700;
  padding: 15px 0;
  font-weight: bold;
  font-size: 1.3em;
  text-align: center;
  border-top: 2px solid #FFD700;
  border-bottom: 2px solid #FFD700;
  box-shadow: 0 0 20px rgba(255, 215, 0, 0.8);
  z-index: 5;
  opacity: 1;
  pointer-events: none;
  text-shadow: 0 0 8px #FFD700, 0 0 16px #FFD70099;
}

@keyframes badgeGlow {
  0% { text-shadow: 0 0 8px #FFD700, 0 0 16px #FFD70099; }
  100% { text-shadow: 0 0 24px #FFD700, 0 0 32px #FFD700cc; }
}

/* Modal raffle card styles */
.raffle-card-modal {
  width: 100%;
  max-width: 320px;
  margin: 0 auto;
  background: #181818;
  color: #FFD700;
  border: 2px solid #FFD700;
  border-radius: 1rem;
  font-size: 1.2em;
  font-weight: bold;
  padding: 18px 0;
  box-shadow: 0 4px 24px 0 rgba(255,215,0,0.10), 0 0 32px #111a;
  transition: all 0.2s;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  margin-bottom: 8px;
}
.raffle-card-modal .raffle-overlay {
  background: none;
  color: #FFD700;
  font-size: 1.1em;
  font-weight: bold;
  text-shadow: 0 2px 8px #c08a2f66, 0 0 6px #ffd70044;
}
.raffle-card-modal:hover, .raffle-card-modal.selected {
  background: #FFD700;
  color: #181818;
  border-color: #181818;
  box-shadow: 0 0 16px 4px #FFD70099;
}
.raffle-card-modal.selected .raffle-overlay {
  color: #181818;
}

/* Modal raffle card image style */
.raffle-modal-img {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: 10px;
  margin-right: 16px;
  box-shadow: 0 2px 8px #0003;
  background: #fff;
  flex-shrink: 0;
}

.raffle-card-modal {
  flex-direction: row;
  justify-content: flex-start;
  align-items: center;
}

@media (max-width: 600px) {
  .raffle-card-modal {
    font-size: 1em;
    padding: 12px 0;
    max-width: 98vw;
  }
  .raffle-modal-img {
    width: 44px;
    height: 44px;
    margin-right: 10px;
  }
  .raffle-card-modal {
    font-size: 0.95em;
    padding: 10px 0;
  }
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .selected-badge {
    font-size: 1.2em !important;
    padding: 10px 0 !important;
  }
}

/* --- Raffle Modal Modern Redesign --- */
.raffle-modal-overlay {
  position: fixed; inset: 0; z-index: 9999;
  background: rgba(0,0,0,0.85);
  display: flex; align-items: center; justify-content: center;
  transition: background 0.3s;
}
.raffle-modal-content {
  background: #181818;
  border-radius: 1.5em;
  box-shadow: 0 8px 40px #000a, 0 0 0 4px #ffd70055;
  padding: 2em 1em 1.5em 1em;
  max-width: 95vw;
  width: 400px;
  text-align: center;
  position: relative;
  animation: modal-pop 0.5s cubic-bezier(.23,1.12,.62,1.01);
}
@keyframes modal-pop {
  0% { transform: scale(0.85) translateY(40px); opacity: 0; }
  100% { transform: scale(1) translateY(0); opacity: 1; }
}
.raffle-modal-title {
  color: #ffd700;
  font-size: 2.8rem;
  font-weight: 900;
  margin-bottom: 0.2em;
  letter-spacing: 1px;
  text-shadow: 0 2px 8px #c08a2f66;
}
@media (max-width: 600px) {
  .raffle-modal-title {
    font-size: 1.5rem !important;
  }
}
.raffle-modal-desc {
  color: #fffbe7;
  font-size: 1.1em;
  margin-bottom: 1.5em;
  font-weight: 500;
}
.raffle-modal-cards {
  display: flex;
  flex-direction: column;
  gap: 1.2em;
  margin-bottom: 1.5em;
}
.raffle-card-modal {
  display: flex;
  align-items: center;
  background: #222;
  border: 2px solid #ffd700;
  border-radius: 1em;
  overflow: hidden;
  box-shadow: 0 2px 16px #0006;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s, border-color 0.2s;
  position: relative;
  min-height: 90px;
  outline: none;
}
.raffle-card-modal:active,
.raffle-card-modal.selected {
  transform: scale(0.97);
  border-color: #fffbe7;
  box-shadow: 0 4px 24px #ffd70055;
}
.raffle-card-img {
  width: 80px; height: 80px;
  background-size: cover;
  background-position: center;
  border-radius: 0.8em;
  margin: 0.5em 1em 0.5em 0.5em;
  flex-shrink: 0;
  box-shadow: 0 2px 8px #0003;
}
.raffle-card-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  color: #fff;
  text-align: left;
}
.raffle-card-title {
  font-size: 1.2em;
  font-weight: 700;
  color: #ffd700;
  text-shadow: 0 1px 4px #000a;
}
.raffle-card-sub {
  font-size: 0.98em;
  color: #fffbe7;
  opacity: 0.85;
  margin-top: 0.2em;
}
.raffle-card-badge {
  position: absolute;
  right: 1em; top: 1em;
  background: linear-gradient(90deg,#ffd700,#fffbe7);
  color: #181818;
  font-weight: 800;
  font-size: 0.95em;
  padding: 0.3em 1em;
  border-radius: 1em;
  box-shadow: 0 2px 8px #ffd70044;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}
.raffle-card-modal.selected .raffle-card-badge {
  opacity: 1;
  animation: badge-pop 0.4s;
}
@keyframes badge-pop {
  0% { transform: scale(0.7); opacity: 0; }
  80% { transform: scale(1.15); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}
.raffle-modal-cancel {
  margin-top: 1.2em;
  background: linear-gradient(90deg,#ffd700,#c08a2f);
  color: #181818;
  font-weight: 800;
  font-size: 1.1em;
  border: none;
  border-radius: 0.8em;
  padding: 0.7em 2.5em;
  box-shadow: 0 2px 8px #ffd70044;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.raffle-modal-cancel:hover {
  background: #fffbe7;
  color: #c08a2f;
}

/* --- Modal raffle card as full background button --- */
.raffle-card-modal-bg {
  position: relative;
  width: 100%;
  min-height: 140px;
  height: 150px;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  border: 2.5px solid #ffd700;
  border-radius: 1em;
  box-shadow: 0 2px 16px #0006;
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
  overflow: hidden;
  margin-bottom: 0.5em;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s, border-color 0.2s;
  outline: none;
  padding: 0;
  font-size: 2.1em;
}
.raffle-card-modal-bg:hover,
.raffle-card-modal-bg:active,
.raffle-card-modal-bg.selected {
  /* Keep background fixed and smooth */
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  /* Only change border and shadow */
  border-color: #fffbe7;
  box-shadow: 0 4px 24px #ffd70055;
  transform: scale(0.97);
}
.raffle-card-modal-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg,rgba(0,0,0,0.45) 60%,rgba(24,24,24,0.95) 100%);
  z-index: 1;
  pointer-events: none;
  transition: background 0.2s;
}
.raffle-card-modal-bg.selected .raffle-card-modal-overlay {
  background: linear-gradient(180deg,rgba(255,215,0,0.18) 0%,rgba(24,24,24,0.95) 100%);
}
.raffle-card-modal-text {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 1.6em 1.5em 1.6em 1.5em;
  width: 100%;
}
.raffle-card-title {
  font-size: 1.6em;
  font-weight: 900;
  color: #ffd700;
  text-shadow: 0 2px 8px #000a, 0 0 2px #fffbe7;
  margin-bottom: 0.15em;
  letter-spacing: 0.5px;
}
.raffle-card-sub {
  font-size: 1.15em;
  color: #fffbe7;
  opacity: 0.92;
  font-weight: 500;
  text-shadow: 0 1px 4px #000a;
}
@media (max-width: 600px) {
  .raffle-modal-content {
    width: 98vw;
    padding: 1.2em 0.2em 1em 0.2em;
    min-width: unset;
  }
  .raffle-card-modal_bg {
    min-height: 90px;
    height: 100px;
    font-size: 1.1em;
  }
  .raffle-card-modal-text {
    padding: 1em 0.7em 1em 0.7em;
  }
  .raffle-card-title {
    font-size: 1.7em;
  }
  .raffle-card-sub {
    font-size: 1.2em;
  }
  .raffle-modal-title {
    font-size: 1em;
  }
}

/* Modal lookup styling enhancements for mobile */
#lookupResultModal {
  transition: all 0.3s ease;
  max-height: 200px;
  overflow-y: auto;
}

#lookupResultModal:empty {
  display: none;
}

#lookupFormModal {
  flex-direction: column;
  align-items: stretch;
}

#lookupFormModal input {
  margin-bottom: 0.5em;
}

#lookupFormModal button {
  align-self: center;
  min-width: 120px;
}

@media (max-width: 480px) {
  #lookupFormModal {
    gap: 0.75em;
  }
  
  #lookupIdentifierModal {
    font-size: 16px !important; /* Prevent zoom on iOS */
    padding: 0.75em !important;
  }
  
  #lookupFormModal button {
    padding: 0.75em 1.5em !important;
    font-size: 1em;
  }
  
  #lookupResultModal {
    font-size: 0.95em;
    max-height: 150px;
  }
}
