/* 🎰 BETCIO JACKPOT KARTI SİSTEMİ - Premium Tasarım */

/* === MODAL OVERLAY === */
.jackpot-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.95);
  backdrop-filter: blur(10px);
  z-index: 10000;
  display: none;
  justify-content: center;
  align-items: center;
  animation: fadeIn 0.5s ease;
  overflow: hidden;
  -ms-overflow-style: none;
  /* IE and Edge */
  scrollbar-width: none;
  /* Firefox */
}

.jackpot-overlay::-webkit-scrollbar {
  display: none;
  /* Chrome, Safari, Opera */
}

.jackpot-overlay.active {
  display: flex;
}

/* === JACKPOT CONTAINER === */
.jackpot-container {
  width: 95%;
  max-width: 500px;
  max-height: 90vh;
  background: linear-gradient(145deg, #0a0e27 0%, #1a1f3a 50%, #0f1429 100%);
  border-radius: 20px;
  border: 3px solid transparent;
  background-clip: padding-box;
  position: relative;
  padding: 15px;
  box-shadow:
    0 0 60px rgba(255, 215, 0, 0.3),
    0 0 100px rgba(255, 165, 0, 0.2),
    inset 0 0 60px rgba(255, 215, 0, 0.05);
  animation: jackpotPulse 2s ease-in-out infinite;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.jackpot-container::before {
  content: '';
  position: absolute;
  top: -3px;
  left: -3px;
  right: -3px;
  bottom: -3px;
  background: linear-gradient(45deg, #FFD700, #FFA500, #FFD700, #FF6B00, #FFD700);
  background-size: 400% 400%;
  border-radius: 22px;
  z-index: -1;
  animation: borderGlow 3s ease infinite;
}

@keyframes borderGlow {

  0%,
  100% {
    background-position: 0% 50%;
  }

  50% {
    background-position: 100% 50%;
  }
}

@keyframes jackpotPulse {

  0%,
  100% {
    box-shadow:
      0 0 40px rgba(255, 215, 0, 0.3),
      0 0 80px rgba(255, 165, 0, 0.2);
  }

  50% {
    box-shadow:
      0 0 60px rgba(255, 215, 0, 0.5),
      0 0 100px rgba(255, 165, 0, 0.3);
  }
}

/* === HEADER === */
.jackpot-header {
  text-align: center;
  margin-bottom: 10px;
  flex-shrink: 0;
}

.jackpot-title {
  font-size: 1.6em;
  font-weight: 900;
  background: linear-gradient(135deg, #FFD700 0%, #FFA500 50%, #FFD700 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: 0 0 30px rgba(255, 215, 0, 0.5);
  letter-spacing: 2px;
  margin-bottom: 5px;
  animation: titleShine 2s ease-in-out infinite;
}

@keyframes titleShine {

  0%,
  100% {
    filter: brightness(1);
  }

  50% {
    filter: brightness(1.3);
  }
}

.jackpot-subtitle {
  color: #b8c5d6;
  font-size: 0.85em;
  margin-top: 2px;
}

/* === CARDS CONTAINER === */
.jackpot-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  padding: 10px 5px;
  perspective: 1000px;
  flex: 1;
  min-height: 0;
}

/* === INDIVIDUAL CARD === */
.jackpot-card {
  aspect-ratio: 2/2.5;
  cursor: pointer;
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.jackpot-card:hover:not(.flipped):not(.disabled) {
  transform: translateY(-5px) rotateY(8deg);
}

.jackpot-card.flipped {
  transform: rotateY(180deg);
}

.jackpot-card.disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

.jackpot-card.selected {
  transform: rotateY(180deg) scale(1.05);
  z-index: 10;
}

/* === CARD FACES === */
.card-face {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  overflow: hidden;
}

/* Card Back (Kapalı) */
.card-back {
  background: linear-gradient(145deg, #1a1f3a 0%, #252b4a 50%, #1a1f3a 100%);
  border: 2px solid rgba(255, 215, 0, 0.3);
  box-shadow:
    0 4px 20px rgba(0, 0, 0, 0.3),
    inset 0 0 15px rgba(255, 215, 0, 0.1);
}

.card-back::before {
  content: '?';
  font-size: 2em;
  font-weight: 900;
  color: #FFD700;
  text-shadow: 0 0 15px rgba(255, 215, 0, 0.5);
  animation: questionPulse 1.5s ease-in-out infinite;
}

.card-back::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 215, 0, 0.2), transparent);
  animation: cardShine 3s ease-in-out infinite;
}

@keyframes questionPulse {

  0%,
  100% {
    transform: scale(1);
    opacity: 0.8;
  }

  50% {
    transform: scale(1.1);
    opacity: 1;
  }
}

@keyframes cardShine {
  0% {
    left: -100%;
  }

  50%,
  100% {
    left: 100%;
  }
}

/* Card Front (Açık) */
.card-front {
  background: linear-gradient(145deg, #0f1429 0%, #1a2040 100%);
  border: 2px solid #FFD700;
  transform: rotateY(180deg);
  padding: 10px;
  box-shadow:
    0 0 20px rgba(255, 215, 0, 0.4),
    inset 0 0 20px rgba(255, 215, 0, 0.1);
}

.card-front.winner {
  animation: winnerGlow 0.5s ease-in-out infinite alternate;
}

@keyframes winnerGlow {
  0% {
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
  }

  100% {
    box-shadow: 0 0 40px rgba(255, 215, 0, 0.8), 0 0 60px rgba(255, 165, 0, 0.5);
  }
}

.prize-emoji {
  font-size: 1.8em;
  margin-bottom: 5px;
  animation: emojiPop 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes emojiPop {
  0% {
    transform: scale(0);
  }

  50% {
    transform: scale(1.3);
  }

  100% {
    transform: scale(1);
  }
}

.prize-name {
  font-size: 0.65em;
  font-weight: 700;
  color: #FFD700;
  text-align: center;
  line-height: 1.2;
}

.prize-value {
  font-size: 0.6em;
  color: #00D4FF;
  margin-top: 3px;
}

/* === RESULT SECTION === */
.jackpot-result {
  text-align: center;
  padding: 15px;
  display: none;
  flex-shrink: 0;
}

.jackpot-result.show {
  display: block;
  animation: resultSlideIn 0.5s ease;
}

@keyframes resultSlideIn {
  0% {
    opacity: 0;
    transform: translateY(20px);
  }

  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.result-title {
  font-size: 1.4em;
  font-weight: 900;
  color: #FFD700;
  margin-bottom: 10px;
  text-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
}

.result-prize {
  font-size: 1.8em;
  margin: 10px 0;
}

.result-message {
  font-size: 0.9em;
  color: #00FF88;
  margin-bottom: 15px;
}

.jackpot-close-btn {
  background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
  border: none;
  padding: 12px 30px;
  font-size: 1em;
  font-weight: 700;
  color: #0a0e27;
  border-radius: 50px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 5px 20px rgba(255, 215, 0, 0.3);
}

.jackpot-close-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(255, 215, 0, 0.5);
}

/* === INSTRUCTION TEXT === */
.jackpot-instruction {
  text-align: center;
  color: #00D4FF;
  font-size: 0.9em;
  margin-top: 10px;
  animation: instructionPulse 2s ease-in-out infinite;
  flex-shrink: 0;
}

@keyframes instructionPulse {

  0%,
  100% {
    opacity: 0.7;
  }

  50% {
    opacity: 1;
  }
}

/* === CONFETTI CONTAINER === */
.confetti-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 10001;
  overflow: hidden;
}

.confetti {
  position: absolute;
  width: 10px;
  height: 10px;
  animation: confettiFall 3s ease-out forwards;
}

@keyframes confettiFall {
  0% {
    transform: translateY(-100px) rotate(0deg);
    opacity: 1;
  }

  100% {
    transform: translateY(100vh) rotate(720deg);
    opacity: 0;
  }
}

/* === RESPONSIVE - TAM SAYFA === */

/* Küçük telefonlar (iPhone SE vb.) */
@media (max-height: 600px) {
  .jackpot-container {
    padding: 10px;
    max-height: 95vh;
  }

  .jackpot-title {
    font-size: 1.3em;
  }

  .jackpot-subtitle {
    font-size: 0.75em;
  }

  .jackpot-cards {
    gap: 6px;
    padding: 5px 2px;
  }

  .jackpot-card {
    aspect-ratio: 2/2.2;
  }

  .card-back::before {
    font-size: 1.6em;
  }

  .prize-emoji {
    font-size: 1.4em;
  }

  .prize-name {
    font-size: 0.55em;
  }

  .result-title {
    font-size: 1.2em;
  }

  .result-prize {
    font-size: 1.4em;
  }

  .jackpot-close-btn {
    padding: 10px 25px;
    font-size: 0.9em;
  }
}

/* Normal telefonlar */
@media (max-width: 480px) and (min-height: 601px) {
  .jackpot-container {
    padding: 12px;
  }

  .jackpot-title {
    font-size: 1.5em;
  }

  .jackpot-cards {
    gap: 8px;
    padding: 8px 3px;
  }

  .card-back::before {
    font-size: 1.8em;
  }

  .prize-emoji {
    font-size: 1.6em;
  }

  .prize-name {
    font-size: 0.6em;
  }
}

/* Tablet (yatay) ve Desktop */
@media (min-width: 768px) {
  .jackpot-container {
    max-width: 550px;
    padding: 20px;
  }

  .jackpot-title {
    font-size: 2em;
  }

  .jackpot-subtitle {
    font-size: 1em;
  }

  .jackpot-cards {
    gap: 12px;
    padding: 15px 10px;
  }

  .prize-emoji {
    font-size: 2.2em;
  }

  .prize-name {
    font-size: 0.8em;
  }

  .result-prize {
    font-size: 2.2em;
  }
}

/* === ANIMATIONS === */
@keyframes fadeIn {
  0% {
    opacity: 0;
  }

  100% {
    opacity: 1;
  }
}

/* === SPARKLE EFFECT === */
.sparkle {
  position: absolute;
  width: 6px;
  height: 6px;
  background: #FFD700;
  border-radius: 50%;
  animation: sparkle 1s ease-in-out infinite;
}

@keyframes sparkle {

  0%,
  100% {
    opacity: 0;
    transform: scale(0);
  }

  50% {
    opacity: 1;
    transform: scale(1);
  }
}