/* Video Grid Layout - 4 columns */
.video-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  margin: 3rem 0;
}

/* Video Card */
.video-item {
  border: none;
  border-radius: 1.125rem;
  background: #13163F;
  padding: 0.9375rem;
  transition: box-shadow 0.3s ease;
}

.video-item:hover {
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.dark .video-item {
  border-color: #404660;
  background: #13163F;
}

/* Image Wrapper */
.img-wrapper {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%;
  background: #f0f0f0;
  border-radius: 0.75rem;
  overflow: hidden;
}

.img-wrapper img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Image Swap on Hover - Desktop only */
.img-jpg {
  opacity: 1;
  transition: opacity 0.3s ease;
}

.img-webp {
  opacity: 0;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  transition: opacity 0.3s ease;
  z-index: 1;
}

.video-item:hover .img-jpg {
  opacity: 0;
}

.video-item:hover .img-webp {
  opacity: 1;
}

/* Mobile: Hide JPG, always show WebP */
@media (max-width: 768px) {
  .container {
    display: block !important;
  }

  .video-grid {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 1.5rem !important;
    margin: 3rem 0 !important;
  }

  .video-item {
    display: block !important;
    border: none !important;
    border-radius: 1.125rem !important;
    background: #13163F !important;
    padding: 0.9375rem !important;
  }

  .img-wrapper {
    display: block !important;
    position: relative !important;
    width: 100% !important;
    padding-bottom: 56.25% !important;
    background: #f0f0f0 !important;
    border-radius: 0.75rem !important;
    overflow: hidden !important;
  }

  .img-jpg {
    display: none !important;
  }

  .img-webp {
    display: block !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    opacity: 1 !important;
    object-fit: cover !important;
    z-index: auto !important;
  }

  .video-info {
    display: block !important;
    margin-top: 0.75rem !important;
    font-size: 1.125rem !important;
    color: #6b7280 !important;
    text-align: center !important;
  }

  .video-item:hover .img-jpg {
    opacity: 0;
  }

  .video-item:hover .img-webp {
    opacity: 1;
  }
}

/* Tablet: 3 columns */
@media (min-width: 769px) and (max-width: 1024px) {
  .video-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Small mobile: 1 column */
@media (max-width: 480px) {
  .video-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
}

/* Video Info */
.video-info {
  margin-top: 0.75rem;
  font-size: 1.125rem;
  color: #6b7280;
  text-align: center;
}

.dark .video-info {
  color: #d1d5db;
}

.video-info i {
  margin: 0 0.25rem;
}

/* Modal Styles */
.modal-body.video-container {
  position: relative;
  height: 0;
  padding-bottom: 100%;
}

.modal-body.video-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

@media (min-width: 768px) {
  .modal-body.video-container iframe {
    max-width: 800px;
    max-height: 800px;
    margin: 0 auto;
  }
}

body {
  margin: 0;
  padding: 0;
}

#introModal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  z-index: 9999;
  justify-content: center;
  align-items: center;
}

#introModal.active {
  display: flex;
}

.intro-modal-inner {
  position: relative;
  width: 90%;
  max-width: 400px;
  border-radius: 1rem;
  overflow: hidden;
  background: #131736;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.intro-modal-video {
  position: relative;
  padding-top: 177.78%;
}

.intro-modal-video iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.intro-modal-close {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 10;
  background: rgba(0, 0, 0, 0.6);
  border: none;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s;
}

.intro-modal-close:hover {
  background: rgba(0, 0, 0, 0.9);
}

.roulette-compact-card {
  background: linear-gradient(135deg, #1a1f4e 0%, #13163F 100%);
  border-radius: 1rem;
  padding: 1.25rem 1.5rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.roulette-compact-main {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.roulette-compact-icon {
  width: 2.75rem;
  height: 2.75rem;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.375rem;
  color: white;
  flex-shrink: 0;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.roulette-compact-text {
  flex: 1;
  min-width: 0;
}

.roulette-compact-title {
  font-size: 1.125rem;
  font-weight: 700;
  color: white;
  margin: 0 0 0.375rem 0;
  letter-spacing: -0.01em;
}

.roulette-compact-rules {
  font-size: 0.875rem;
  color: #d1d5db;
  margin: 0 0 0.5rem 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  line-height: 1.4;
}

.roulette-compact-rules i {
  color: #667eea;
  margin-right: 0.3rem;
}

.roulette-compact-prizes {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0.75rem;
  font-size: 0.75rem;
  color: #9ca3af;
  line-height: 1.4;
}

.roulette-compact-prize::before {
  content: '•';
  color: #667eea;
  margin-right: 0.4rem;
}

.roulette-compact-prize:first-child::before {
  content: '';
  margin: 0;
}

.roulette-compact-action {
  flex-shrink: 0;
  text-align: center;
  background: rgba(102, 126, 234, 0.12);
  padding: 0.625rem 1.125rem;
  border-radius: 0.625rem;
  border: 1px solid rgba(102, 126, 234, 0.25);
  min-width: 180px;
  max-width: 240px;
}

.roulette-compact-action .roulette-compact-timer-label {
  line-height: 1.3;
}

.roulette-compact-timer-label {
  display: block;
  font-size: 0.65rem;
  color: #9ca3af;
  margin-bottom: 0.25rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.roulette-compact-timer-value {
  display: block;
  font-size: 1.25rem;
  font-weight: 700;
  color: white;
  font-family: 'Courier New', monospace;
  letter-spacing: 0.05em;
  line-height: 1.1;
}

.roulette-compact-action.is-locked {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.08);
  opacity: 0.7;
}

.roulette-compact-lock {
  display: block;
  font-size: 1.125rem;
  color: #9ca3af;
  margin-bottom: 0.25rem;
}

@media (max-width: 768px) {
  .roulette-compact-card {
    padding: 1rem;
  }

  .roulette-compact-main {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
    gap: 0.875rem;
  }

  .roulette-compact-icon {
    margin: 0 auto;
  }

  .roulette-compact-rules {
    justify-content: center;
  }

  .roulette-compact-prizes {
    justify-content: center;
  }

  .roulette-compact-action {
    width: 100%;
  }
}
