:root {
  --primary-color: #ffd700; /* Gold */
  --secondary-color: #ff6347; /* Tomato */
  --accent-color: #ffa500; /* Orange for highlights */
  --background-color: #020a11;
  --card-background: #0b1f31; /* Used for jackpot, winners table, showcase items */
  --text-color: #e0e7ef;
  --text-secondary-color: #a0b0c0;
  --border-color: #15324d; /* Dark desaturated blue for borders */
  --highlight-border-color: #2a4966; /* Slightly lighter border for hover/focus on cards */
  --font-family: "system-ui", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell,
    "Open Sans", "Helvetica Neue", sans-serif;
  --box-shadow-soft: 0 4px 15px rgba(0, 0, 0, 0.3);
  --box-shadow-inset: inset 0 2px 4px rgba(0, 0, 0, 0.4);
  --text-shadow-gold: 0 0 5px rgba(255, 215, 0, 0.5), 0 0 10px rgba(255, 215, 0, 0.3);
}

body {
  font-family: var(--font-family);
  margin: 0;
  padding: 0;
  background-color: var(--background-color);
  color: var(--text-color);
  line-height: 1.6;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

header {
  background: linear-gradient(to bottom, var(--card-background), var(--background-color));
  color: var(--primary-color);
  padding: 20px 0;
  text-align: center;
  width: 100%;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
  border-bottom: 2px solid var(--primary-color);
  display: flex;
  flex-direction: column;
  align-items: center;
}

#game-logo {
  max-width: 220px; /* Adjusted size based on screenshot appearance */
  height: auto;
  margin-bottom: 10px;
}

header h1 {
  margin: 0;
  font-size: 2.2em; /* Slightly smaller to accommodate logo better */
  font-weight: 700;
  text-shadow: 2px 2px 6px rgba(0, 0, 0, 0.7), var(--text-shadow-gold);
  letter-spacing: 1px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.header-icon {
  font-family: "Arial Black", Gadget, sans-serif;
  color: var(--primary-color);
  padding: 0 10px;
  font-size: 0.9em;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5), 0 0 5px var(--primary-color);
  vertical-align: middle;
}

.hero {
  padding: 60px 20px; /* Adjusted padding */
  text-align: center;
  color: var(--text-color);
  border-radius: 12px;
  margin-top: 30px;
  box-shadow: var(--box_shadow_soft);
  position: relative;
  overflow: hidden;
}
/* Removed ::before overlay as hero background is now solid black */

.hero h2 {
  font-size: 2.8em; /* Adjusted size */
  margin-bottom: 15px;
  color: var(--primary-color);
  font-weight: bold; /* Ensure it's bold */
  text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.9), var(--text-shadow-gold);
}

.hero p {
  font-size: 1.1em; /* Adjusted size */
  margin-bottom: 30px;
  color: var(--text-secondary-color); /* Lighter grey for subtext */
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.hero-buttons {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px; /* Space between buttons */
  margin-top: 30px; /* Or adjust as needed */
  flex-wrap: wrap; /* Allow buttons to wrap on smaller screens */
}

.cta-button {
  background: linear-gradient(145deg, var(--primary-color), var(--accent-color));
  color: #010408;
  padding: 15px 35px; /* Adjusted padding */
  text-decoration: none;
  font-size: 1.2em; /* Adjusted size */
  font-weight: bold;
  border-radius: 50px;
  transition: all 0.3s ease;
  box-shadow: 0 5px 20px rgba(255, 215, 0, 0.4), var(--box-shadow-inset);
  border: none;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.cta-button:hover,
.cta-button:focus {
  background: linear-gradient(145deg, var(--accent-color), var(--primary-color));
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 8px 25px rgba(255, 165, 0, 0.5), var(--box-shadow-inset);
  color: #000000;
}

.cta-button-secondary {
  background: transparent;
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
  box-shadow: none; /* Remove primary button's specific shadow if desired */
}

.cta-button-secondary:hover,
.cta-button-secondary:focus {
  background: var(--primary-color);
  color: var(--background-color); /* Or #000 */
  border-color: var(--primary-color);
  /* transform: translateY(-3px) scale(1.03); */ /* Hover animation is inherited from .cta-button */
  box-shadow: 0 6px 20px rgba(255, 215, 0, 0.25); /* Optional: add a subtle glow */
}

.jackpot-section {
  background-color: var(--card-background);
  padding: 40px 20px; /* Adjusted padding */
  margin-top: 40px;
  text-align: center;
  border-radius: 12px;
  box-shadow: var(--box_shadow_soft);
  border: 1px solid var(--border-color);
}

.jackpot-section h3 {
  font-size: 2em; /* Adjusted size */
  color: var(--primary-color);
  margin-bottom: 15px;
  font-weight: 600;
  text-shadow: var(--text-shadow-gold);
}

.jackpot-subtitle {
  margin-top: 15px; /* Adjusted margin */
  font-size: 0.9em; /* Adjusted size */
  color: var(--text-secondary-color);
}

#jackpot-amount {
  font-size: 3.5em; /* Adjusted size */
  font-weight: bold;
  color: var(--secondary-color);
  padding: 12px 20px; /* Adjusted padding */
  background: linear-gradient(135deg, #06111b, #020a11); /* Darker gradient for amount box */
  border-radius: 8px; /* Slightly smaller radius */
  display: inline-block;
  min-width: 300px; /* Adjusted min-width */
  box-shadow: var(--box-shadow-inset), 0 0 10px rgba(255, 99, 71, 0.2);
  letter-spacing: 1px;
  border: 2px solid var(--primary-color);
  text-shadow: 0 0 8px rgba(255, 99, 71, 0.4);
  margin-top: 10px;
}

/* New Game Showcase Section Styles */
.game-showcase-section {
  margin-top: 40px;
  padding: 20px 0;
}

.showcase-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 25px;
}

.showcase-item {
  background-color: var(--card-background);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: var(--box-shadow-soft);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  text-decoration: none;
  color: inherit;
  border: 1px solid var(--border-color);
  display: block; /* To make the whole card a link */
}

.showcase-item:hover,
.showcase-item:focus {
  transform: translateY(-8px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5), 0 0 10px var(--primary-color);
  border-color: var(--highlight-border-color);
}

.showcase-item img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover; /* Ensure image covers the area */
}

/* Styles for optional title below showcase image */
/*
.showcase-item-title {
padding: 10px 15px;
font-size: 1.1em;
font-weight: 600;
color: var(--primary-color);
text-align: center;
background-color: rgba(0,0,0,0.2);
}
*/

.recent-winners-section {
  background-color: var(--card-background);
  padding: 30px 20px; /* Adjusted padding */
  margin-top: 40px;
  text-align: center;
  border-radius: 12px;
  box-shadow: var(--box-shadow-soft);
  border: 1px solid var(--border-color);
}

.recent-winners-section h3 {
  font-size: 2em; /* Adjusted size */
  color: var(--primary-color);
  margin-bottom: 20px; /* Adjusted margin */
  font-weight: 600;
  text-shadow: var(--text-shadow-gold);
}

.table-container {
  overflow-x: auto;
}

#winners-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 15px; /* Adjusted margin */
  color: #cdd3d8;
  border-radius: 8px;
  overflow: hidden; /* Ensures border-radius clips content */
}

#winners-table th,
#winners-table td {
  border: 1px solid var(--border-color);
  padding: 10px 12px; /* Adjusted padding */
  text-align: left;
  border-left: none;
  border-right: none;
  vertical-align: middle;
}
#winners-table td {
  border-bottom: 1px solid var(--border-color);
}
#winners-table tbody tr:last-child td {
  border-bottom: none;
}

#winners-table th {
  background-color: #0e2a40;
  color: var(--primary-color);
  font-weight: bold;
  font-size: 1em; /* Adjusted size */
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

#winners-table tbody tr {
  background-color: #040e18;
}

#winners-table tbody tr:hover {
  background-color: #102c45;
}

#winners-table td:nth-child(2) {
  display: flex;
  align-items: center;
}

.game-list-icon {
  width: 24px;
  height: 24px;
  margin-right: 8px;
  vertical-align: middle;
  object-fit: contain;
  border-radius: 3px;
}

#winners-table td:nth-child(4) {
  color: var(--secondary-color);
  font-weight: bold;
}

footer {
  background-color: #010408;
  color: var(--text-secondary-color);
  text-align: center;
  padding: 25px 0; /* Adjusted padding */
  margin-top: 50px;
  width: 100%;
  font-size: 0.85em; /* Adjusted size */
  border-top: 1px solid var(--border-color);
}

/* Animations (mostly unchanged, ensure they still apply correctly) */
@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes fadeInScaleUp {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes pulseGlow {
  0%,
  100% {
    box-shadow: var(--box-shadow-inset), 0 0 10px rgba(255, 99, 71, 0.2), 0 0 15px rgba(255, 215, 0, 0.1);
    border-color: var(--primary-color);
  }
  50% {
    box-shadow: var(--box-shadow-inset), 0 0 20px rgba(255, 99, 71, 0.5), 0 0 25px rgba(255, 215, 0, 0.25);
    border-color: var(--accent-color);
  }
}

.animate-on-scroll,
.animate-on-load {
  opacity: 0;
  will-change: transform, opacity;
}
.animate-on-scroll.is-visible {
  opacity: 1;
}

.animate-fadeInDown.is-visible,
header.animate-fadeInDown.loaded,
.hero h2.animate-fadeInDown.loaded,
.jackpot-section h3.animate-fadeInDown.is-visible,
.recent-winners-section h3.animate-fadeInDown.is-visible,
.game-showcase-section.is-visible /* Add showcase section to animation trigger */ {
  animation: fadeInDown 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

.animate-fadeInUp.is-visible,
.hero p.animate-fadeInUp.loaded,
.jackpot-subtitle.animate-fadeInUp.is-visible,
.showcase-item.animate-fadeInUp.is-visible /* Target individual showcase items */,
footer.animate-fadeInUp.is-visible {
  animation: fadeInUp 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

.animate-fadeInScaleUp.is-visible,
.cta-button.animate-fadeInScaleUp.loaded,
#jackpot-amount.animate-fadeInScaleUp.is-visible {
  animation: fadeInScaleUp 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

#jackpot-amount.initial-pulse.is-visible {
  animation: fadeInScaleUp 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards, pulseGlow 1.8s ease-in-out 0.4s 1;
}

@keyframes slideInAndFade {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}
#winners-table tbody tr.new-winner-row {
  animation: slideInAndFade 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

#winners-table td.latest-winner-highlight {
  color: var(--primary-color);
}
#winners-table td.animate-jackpot-pop {
  animation: jackpotPopAnimation 0.7s ease-in-out;
}
@keyframes jackpotPopAnimation {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.12);
  }
  100% {
    transform: scale(1);
  }
}

/* Responsive adjustments */
@media (max-width: 992px) {
  /* Adjust breakpoint for showcase grid */
  .showcase-grid {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
  }
  .hero h2 {
    font-size: 2.5em;
  }
  #jackpot-amount {
    font-size: 3em;
  }
}

@media (max-width: 768px) {
  header h1 {
    font-size: 1.8em;
  }
  #game-logo {
    max-width: 180px;
  }
  .hero h2 {
    font-size: 2.2em;
  }
  .hero p {
    font-size: 1em;
  }
  .cta-button {
    padding: 12px 28px;
    font-size: 1.1em;
  }
  #jackpot-amount {
    font-size: 2.5em;
    min-width: auto;
    padding: 10px 15px;
  }
  .jackpot-section h3,
  .recent-winners-section h3 {
    font-size: 1.6em;
  }
  .showcase-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  } /* Stack on smaller screens */
  #winners-table th,
  #winners-table td {
    padding: 8px 10px;
    font-size: 0.9em;
  }
}

@media (max-width: 480px) {
  header h1 {
    font-size: 1.6em;
  }
  #game-logo {
    max-width: 150px;
  }
  .hero h2 {
    font-size: 1.8em;
  }
  .hero p {
    font-size: 0.9em;
  }
  .cta-button {
    padding: 10px 20px;
    font-size: 1em;
  }
  #jackpot-amount {
    font-size: 2em;
  }
  .jackpot-section h3,
  .recent-winners-section h3 {
    font-size: 1.4em;
  }
  #winners-table th,
  #winners-table td {
    font-size: 0.8em;
    padding: 6px 8px;
  }
  .game-list-icon {
    width: 20px;
    height: 20px;
    margin-right: 5px;
  }
}

/* Mobile specific: Hide game name text in winners table, keep icon */
@media (max-width: 480px) {
  #winners-table .game-name-text {
    display: none;
  }

  /* Adjust icon margin and cell content alignment when text is hidden */
  #winners-table td:nth-child(2) .game-list-icon {
    margin-right: 0; /* Remove right margin as there's no text next to it */
  }

  #winners-table td:nth-child(2) {
    justify-content: center; /* Center the icon in the cell */
    text-align: center; /* Fallback for older browsers or if flex not fully applied */
  }
}

.site-footer {
  width: 100%;
  padding: 1rem 1px;
  text-align: center;
  margin-top: 1px;
  background-color: transparent;
}

.site-footer p {
  margin: 0;
  font-size: 0.8em;
  color: var(--text-secondary-color);
  opacity: 0.7;
  display: inline; /* To keep it on the same line if link has other styling */
}

.site-footer a {
  color: inherit; /* Inherit color from parent (which is styled by .site-footer p) */
  text-decoration: none; /* Remove underline */
  transition: opacity 0.2s ease-in-out;
}

.site-footer a:hover {
  opacity: 1; /* Make it slightly more prominent on hover */
  text-decoration: underline; /* Optional: add underline on hover */
}


/* Responsive adjustments for footer if needed */
@media (max-width: 576px) {
  .site-footer p {
    font-size: 0.75em;
  }
}