@import url("https://fonts.googleapis.com/css2?family=Sarabun:wght@300;400;500;700&display=swap");

:root {
  /* Cosmic Indigo & Neon Pink Theme */
  --primary-color: #6A0DAD;    /* Deep Purple */
  --secondary-color: #E91E63;  /* Vibrant Pink */
  --accent-color: #00BCD4;     /* Bright Cyan */
  --highlight-glow-color: color-mix(in srgb, var(--accent-color) 60%, white); /* For button glows */
  --background-color: #10001E; /* Very Dark Purple/Black */
  --surface-color: #1D0B32;    /* Dark Purple Surface */

  --text-color: #F5F5F5;        /* Soft White */
  --text-secondary-color: #BDBDBD; /* Light Grey */

  --success-color: #4CAF50;     /* Standard Green */
  --error-color: #F44336;       /* Standard Red */

  --font-family: "Sarabun", sans-serif;
  --border-radius: 10px;
  --card-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  --section-padding: 2rem;
}

body {
  font-family: var(--font-family);
  margin: 0;
  padding: 0;
  background-color: var(--background-color);
  background-size: cover;
  background-attachment: fixed;
  color: var(--text-color);
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1.6;
}

.container {
  width: 100%;
  max-width: 900px;
  margin: 20px 0;
  padding: 0 15px;
  box-sizing: border-box;
}

.section {
  background-color: var(--surface-color);
  padding: var(--section-padding);
  margin-bottom: 30px;
  border-radius: var(--border-radius);
  text-align: center;
  box-shadow: var(--card-shadow);
  border: 1px solid color-mix(in srgb, var(--primary-color) 20%, transparent);
  overflow: hidden;
}

/* Icons */
.icon-flame { color: var(--accent-color); margin-right: 0.5em; vertical-align: middle; width: 1.5em; height: 1.5em; }
.icon-small { color: var(--secondary-color); margin-left: 0.2em; vertical-align: middle; width: 1em; height: 1em; }
.icon-button { margin-right: 0.5em; vertical-align: middle; width: 1.2em; height: 1.2em; }
.icon-title { color: var(--secondary-color); margin-right: 0.5em; vertical-align: middle; width: 1.3em; height: 1.3em; }
.icon-header { color: var(--secondary-color); margin-right: 0.3em; vertical-align: middle; width: 1.1em; height: 1.1em; }

/* Enhanced Header Section */
.header-main {
  background-color:  #1d0b32;
  box-shadow: 0 5px 25px color-mix(in srgb, var(--secondary-color) 30%, transparent);
  position: relative; /* For potential pseudo-element effects */
  padding-top: calc(var(--section-padding) + 1rem); /* More space for banner */
  padding-bottom: calc(var(--section-padding) + 1rem);
}

.header-banner img {
  width: 100%;
  max-width: 180px; /* Slightly smaller to not overpower */
  height: auto;
  border-radius: calc(var(--border-radius) - 4px);
  margin-bottom: 1.5rem;
}
.header-content h1 {
  font-size: 2.4em; /* Slightly larger */
  color: var(--text-color);
  margin-bottom: 0.75rem;
  font-weight: 700;
  text-shadow: 2px 2px 5px rgba(0, 0, 0, 0.6); /* More pronounced shadow */
}
.header-content p {
  font-size: 1.15em; /* Slightly larger */
  margin-bottom: 2rem; /* More space before buttons */
  color: var(--text-secondary-color);
  text-shadow: 1px 1px 3px rgba(0,0,0,0.4);
}

/* Enhanced CTA Buttons */
.cta-buttons {
  display: flex;
  justify-content: center;
  gap: 1.5rem; /* More gap */
  flex-wrap: wrap;
}
.btn {
  padding: 1rem 2.2rem; /* Larger padding */
  border: none;
  border-radius: 8px; /* Slightly more rounded */
  font-size: 1.1em; /* Larger font */
  font-weight: 700;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.8px; /* More spacing */
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.35), 
              inset 0 -3px 2px rgba(0, 0, 0, 0.25), /* Inner shadow for depth */
              0 0 0 0 transparent; /* For hover glow */
  position: relative; /* For pseudo-elements if needed */
  overflow: hidden; /* For shimmer effects */
}

.btn::before { /* Optional: subtle shimmer effect on hover */
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(120deg, transparent, rgba(255,255,255,0.25), transparent);
  transition: left 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.btn:hover::before {
  left: 100%;
}

.btn-register {
  background: linear-gradient(135deg, var(--accent-color) 0%, color-mix(in srgb, var(--accent-color) 60%, var(--primary-color) 40%) 100%);
  color: #ffff; /* Dark text on light cyan */
  border: 2px solid var(--accent-color);
  box-shadow: 0 6px 20px color-mix(in srgb, var(--accent-color) 30%, transparent),
              inset 0 -3px 2px rgba(0,0,0,0.3),
              0 0 15px 0 color-mix(in srgb, var(--accent-color) 20%, transparent);
  animation: pulseButton 2.5s infinite cubic-bezier(0.4, 0, 0.6, 1);
}

.btn-register:hover, .btn-register:focus {
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent-color) 80%, white) 0%, var(--accent-color) 100%);
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 8px 25px color-mix(in srgb, var(--accent-color) 50%, transparent), /* Stronger glow */
              inset 0 -2px 1px rgba(0,0,0,0.2),
              0 0 25px 5px color-mix(in srgb, var(--highlight-glow-color) 50%, transparent);
  color: var(--primary-color); /* Ensure contrast on hover */
}

.btn-register:active {
  transform: translateY(0px) scale(0.98);
  box-shadow: 0 3px 10px color-mix(in srgb, var(--accent-color) 20%, transparent),
              inset 0 2px 3px rgba(0,0,0,0.4);
}


.btn-contact {
  background: linear-gradient(135deg, var(--secondary-color) 0%, color-mix(in srgb, var(--secondary-color) 60%, var(--primary-color) 40%) 100%);
  color: white;
  border: 2px solid var(--secondary-color);
  box-shadow: 0 6px 20px color-mix(in srgb, var(--secondary-color) 30%, transparent),
              inset 0 -3px 2px rgba(0,0,0,0.3),
              0 0 15px 0 color-mix(in srgb, var(--secondary-color) 20%, transparent);
}

.btn-contact:hover, .btn-contact:focus {
  background: linear-gradient(135deg, color-mix(in srgb, var(--secondary-color) 80%, white) 0%, var(--secondary-color) 100%);
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 8px 25px color-mix(in srgb, var(--secondary-color) 50%, transparent),
              inset 0 -2px 1px rgba(0,0,0,0.2),
              0 0 25px 5px color-mix(in srgb, var(--secondary-color) 40%, white 10%, transparent);
  color: var(--primary-color);
}

.btn-contact:active {
  transform: translateY(0px) scale(0.98);
  box-shadow: 0 3px 10px color-mix(in srgb, var(--secondary-color) 20%, transparent),
              inset 0 2px 3px rgba(0,0,0,0.4);
}

@keyframes pulseButton {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 6px 20px color-mix(in srgb, var(--accent-color) 30%, transparent),
                inset 0 -3px 2px rgba(0,0,0,0.3),
                0 0 15px 0 color-mix(in srgb, var(--accent-color) 20%, transparent);
  }
  50% {
    transform: scale(1.05);
    box-shadow: 0 8px 25px color-mix(in srgb, var(--accent-color) 50%, transparent),
                inset 0 -3px 2px rgba(0,0,0,0.3),
                0 0 25px 8px color-mix(in srgb, var(--highlight-glow-color) 40%, transparent);
  }
}


/* Game Promo Section */
.game-promo .promo-image-container {
  position: relative;
  border-radius: calc(var(--border-radius) - 4px);
  overflow: hidden;
  margin-bottom: 1rem;
  border: 1px solid color-mix(in srgb, var(--secondary-color) 20%, transparent);
}
.game-promo img { width: 100%; display: none; height: auto; }
.promo-text-overlay { position: absolute; bottom: 0; left: 0; right: 0; background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0) 100%); padding: 2rem 1.5rem 1.5rem; color: white; z-index: 10; }
.promo-text-overlay p { margin: 0.3rem 0; font-size: 1.25em; font-weight: 500; text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7); }
.pagination-dots { margin-top: 1.5rem; }
.pagination-dots .dot { display: inline-block; width: 11px; height: 11px; background-color: color-mix(in srgb, var(--surface-color) 50%, var(--text-secondary-color)); border-radius: 50%; margin: 0 6px; cursor: pointer; transition: all 0.3s ease; border: 1px solid color-mix(in srgb, var(--text-secondary-color) 50%, transparent); }
.pagination-dots .dot.active { background-color: var(--secondary-color); transform: scale(1.3); border-color: var(--secondary-color); box-shadow: 0 0 8px var(--secondary-color); }

/* Withdrawal Ranking Section */
.withdrawal-ranking h2 { color: var(--secondary-color); margin-top: 0; margin-bottom: 1.5rem; font-size: 1.9em; font-weight: 700; text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5); }
.ranking-table-wrapper { overflow-x: auto; }
.ranking-table { width: 100%; border-collapse: separate; border-spacing: 0 8px; }
.ranking-table thead tr { background-color: color-mix(in srgb, var(--surface-color) 50%, black); border-bottom: 1px solid var(--secondary-color); }
.ranking-table th { color: var(--secondary-color); padding: 1rem 0.8rem; text-align: left; font-weight: 700; font-size: 0.95em; text-transform: uppercase; letter-spacing: 0.8px; }
.ranking-table th:nth-child(1) { width: 35%; text-align: left; }
.ranking-table th:nth-child(2) { width: 25%; text-align: left; }
.ranking-table th:nth-child(3) { width: 20%; text-align: left; }
.ranking-table th:nth-child(4) { width: 20%; text-align: right; }
.ranking-table td { padding: 0.9rem 0.8rem; text-align: left; vertical-align: middle; color: var(--text-secondary-color); }
.ranking-table td:last-child { text-align: right; }
.ranking-table tbody tr { background-color: color-mix(in srgb, var(--surface-color) 80%, black); border-radius: 6px; transition: all 0.2s ease-in-out; box-shadow: 0 3px 8px rgba(0, 0, 0, 0.4); border: 1px solid transparent; }
.ranking-table tbody tr:hover { transform: translateY(-2px) scale(1.005); box-shadow: 0 6px 15px rgba(0, 0, 0, 0.5); background-color: color-mix(in srgb, var(--surface-color) 50%, var(--primary-color) 20%); border-color: color-mix(in srgb, var(--secondary-color) 30%, transparent); }
.ranking-table td:first-child { border-top-left-radius: 6px; border-bottom-left-radius: 6px; }
.ranking-table td:last-child { border-top-right-radius: 6px; border-bottom-right-radius: 6px; text-align: right; }
.bank-icon-cell { display: flex; align-items: center; }
.bank-logo-container { width: 30px; height: 30px; margin-right: 10px; border-radius: 50%; overflow: hidden; display: inline-flex; align-items: center; justify-content: center; background-color: #fff; flex-shrink: 0; }
.bank-logo-image { width: 100%; height: 100%; object-fit: contain; }
.bank-name-text { font-weight: 500; color: var(--text-color); }
.user-cell > span, .date-cell > span { display: inline-block; }
.user-cell { font-weight: 500; color: var(--text-color); }
.date-cell { font-size: 0.9em; }
.amount-cell { font-weight: 700; color: var(--secondary-color); font-size: 1.15em; text-shadow: 0 0 5px color-mix(in srgb, var(--secondary-color) 50%, transparent); }
.amount-cell > span { color: var(--secondary-color); }
.updating { opacity: 0.4; transform: scale(0.96); transition: opacity 0.2s ease-out, transform 0.2s ease-out; }
.updated { animation: rowSlideInAndHighlight 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards; }
@keyframes rowSlideInAndHighlight { 0% { opacity: 0; transform: translateY(-15px); background-color: var(--surface-color); } 30% { opacity: 1; transform: translateY(0); background-color: var(--accent-color); } 40% { background-color: var(--accent-color); } 100% { opacity: 1; transform: translateY(0); background-color: color-mix(in srgb, var(--surface-color) 80%, black); } }
.updated td, .updated td span { animation: textFadeInUpdatedRow 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards; }
.updated .amount-cell, .updated .amount-cell span { animation: amountTextFadeInUpdatedRow 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards; }
@keyframes textFadeInUpdatedRow { 0%, 30% { color: var(--background-color) !important; } 40% { color: var(--background-color) !important; } 100% { color: var(--text-secondary-color); } }
@keyframes amountTextFadeInUpdatedRow { 0%, 30% { color: var(--background-color) !important; } 40% { color: var(--background-color) !important; } 100% { color: var(--secondary-color); } }
.value-changed-text { animation: amountChangeEffectText 0.6s ease-in-out; }
@keyframes amountChangeEffectText { 0% { transform: translateY(0); opacity: 1; color: var(--secondary-color); } 25% { transform: translateY(-4px); opacity: 0.8; } 50% { transform: translateY(0); color: var(--accent-color); opacity: 1; text-shadow: 0 0 8px var(--accent-color); } 75% { transform: translateY(2px); opacity: 0.8; } 100% { transform: translateY(0); opacity: 1; color: var(--secondary-color); text-shadow: 0 0 5px color-mix(in srgb, var(--secondary-color) 50%, transparent); } }
.new-entry { animation: newEntrySlideIn 0.6s ease-out; }
@keyframes newEntrySlideIn { from { opacity: 0; transform: translateX(-20px); } to { opacity: 1; transform: translateX(0); } }
.amount-cell[data-high="true"] > span { text-shadow: 0 0 10px var(--secondary-color), 0 0 20px var(--secondary-color); }
.super-high::before { content: ""; position: absolute; top: -50%; left: -50%; width: 200%; height: 200%; background: radial-gradient(circle, color-mix(in srgb, var(--secondary-color) 20%, transparent) 0%, transparent 65%); animation: rotateBackground 15s linear infinite; z-index: 0; }
@keyframes rotateBackground { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }
.first-withdrawal-review h2 { color: var(--secondary-color); margin-top: 0; margin-bottom: 1.5rem; font-size: 1.9em; font-weight: 700; text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5); }
.review-cards-container { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.5rem; }
.review-card { background-color: color-mix(in srgb, var(--surface-color) 90%, black); border-radius: var(--border-radius); overflow: hidden; box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4); transition: transform 0.3s ease, box-shadow 0.3s ease; display: flex; flex-direction: column; border: 1px solid color-mix(in srgb, var(--secondary-color) 15%, transparent); }
.review-card:hover { transform: translateY(-5px) scale(1.02); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5); border-color: color-mix(in srgb, var(--secondary-color) 40%, transparent); }
.review-card img { width: 100%; height: 100%; object-fit: cover; }
.review-card-content { padding: 1.5rem; text-align: left; flex-grow: 1; }
.review-card-content h3 { color: var(--secondary-color); font-size: 1.5em; margin-top: 0; margin-bottom: 0.5rem; font-weight: 700; }
.review-card-content p { font-size: 0.95em; color: var(--text-secondary-color); margin-bottom: 0; }
.testimonials h2 { color: var(--secondary-color); margin-top: 0; margin-bottom: 1.5rem; font-size: 1.9em; font-weight: 700; text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5); }
.testimonial-image-container img { width: 100%; max-width: 600px; height: auto; border-radius: calc(var(--border-radius) - 4px); box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3); border: 1px solid color-mix(in srgb, var(--secondary-color) 20%, transparent); }
.skeleton-loading td { background-color: rgba(255, 255, 255, 0.03); border-radius: 4px; position: relative; overflow: hidden; }
.skeleton-loading td::after { content: ""; position: absolute; top: 0; left: -100%; width: 100%; height: 100%; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.05), transparent); animation: skeletonWave 1.5s infinite; }
@keyframes skeletonWave { 0% { left: -100%; } 100% { left: 100%; } }
.no-data td, .error-message td { text-align: center; padding: 2rem; color: var(--text-secondary-color); font-style: italic; }
.error-message td { color: var(--error-color); background-color: color-mix(in srgb, var(--error-color) 10%, transparent); }

@media (max-width: 768px) {
  :root { --section-padding: 1.5rem; }
  .container { padding: 0 10px; }
  .header-content h1 { font-size: 2em; } /* Adjusted */
  .header-content p { font-size: 1.05em; margin-bottom: 1.5rem; } /* Adjusted */
  .btn { padding: 0.9rem 1.8rem; font-size: 1em; } /* Adjusted */
  .promo-text-overlay p { font-size: 1.15em; }
  .ranking-table td { padding: 0.8rem 0.6rem; }
  .review-card img { height: 100%; }
}

@media (max-width: 576px) {
  .header-content h1 { font-size: 1.8em; } /* Adjusted */
  .cta-buttons { flex-direction: column; gap: 1rem; } /* Adjusted */
  .btn { padding: 0.9rem 1.5rem; font-size: 1em; } /* Ensure full width and consistent padding */
  .ranking-table thead { display: none !important; }
  .ranking-table tbody tr { display: block; margin-bottom: 1rem; padding: 1rem; box-shadow: 0 5px 15px rgba(0, 0, 0, 0.45); border-radius: var(--border-radius); border: 1px solid color-mix(in srgb, var(--secondary-color) 10%, transparent); background-color: color-mix(in srgb, var(--surface-color) 70%, black); }
  .ranking-table td { display: flex; justify-content: space-between; align-items: center; padding: 0.6rem 0; text-align: right; border-bottom: 1px solid color-mix(in srgb, var(--text-color) 10%, transparent); min-height: 26px; }
  .ranking-table td:last-child { border-bottom: none; }
  .ranking-table td::before { content: attr(data-label); font-weight: 400; color: var(--text-secondary-color); margin-right: 0.5rem; text-align: left; font-size: 0.75em; flex-shrink: 0; max-width: 35%; }
  .bank-icon-cell .bank-value-container { display: flex; align-items: center; justify-content: flex-end; text-align: right; flex-grow: 1; min-width: 0; }
  .bank-icon-cell .bank-logo-container { width: 22px; height: 22px; margin-right: 6px; }
  .bank-icon-cell .bank-name-text { font-size: 0.8em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: calc(100% - 28px); }
  .user-cell > span, .date-cell > span { font-size: 0.8em; color: var(--text-color); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: right; flex-grow: 1; }
  .amount-cell { padding-top: 0.6rem; padding-bottom: 0.3rem; }
  .amount-cell::before { font-size: 0.75em; font-weight: 400; color: var(--text-secondary-color); line-height: 1.2; }
  .amount-cell > span { font-size: 1.25em; font-weight: 700; color: var(--secondary-color); text-shadow: 0 0 6px color-mix(in srgb, var(--secondary-color) 60%, transparent); margin-left: auto; text-align: right; line-height: 1.2; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
  .btn-register { animation: none; } /* Disable pulse on reduced motion */
}

.ranking-table-wrapper::-webkit-scrollbar { height: 10px; background-color: var(--surface-color); }
.ranking-table-wrapper::-webkit-scrollbar-track { background-color: color-mix(in srgb, var(--surface-color) 80%, black); border-radius: var(--border-radius); margin: 0 2px; }
.ranking-table-wrapper::-webkit-scrollbar-thumb { background-color: var(--secondary-color); border-radius: var(--border-radius); border: 2px solid color-mix(in srgb, var(--surface-color) 80%, black); }
.ranking-table-wrapper::-webkit-scrollbar-thumb:hover { background-color: color-mix(in srgb, var(--secondary-color) 80%, white); }
.ranking-table-wrapper { scrollbar-width: thin; scrollbar-color: var(--secondary-color) color-mix(in srgb, var(--surface-color) 80%, black); }
.promo-slide { display: none; width: 100%; height: auto; transition: opacity 0.5s ease-in-out; }
.promo-slide.active { display: block; opacity: 1; }
#promo-pagination { margin-top: 1rem; }
body { background-color: var(--background-color); }

.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;
  }
}

/* Base styles (outside media queries) */
.header-content .main-title {
  font-size: 2.2em; /* Or your original h1 size */
  /* other h1 styles */
  margin-bottom: 0.1em; /* Minimal space if subtitle follows directly */
}
.header-content .sub-title {
  font-size: 1.8em; /* Adjust as needed */
  color: var(--text-color); /* Or a slightly different color */
  margin-top: 0;
  margin-bottom: 0.75rem;
  font-weight: 600; /* Or 700 if same as main title */
  text-shadow: 1px 1px 3px rgba(0,0,0,0.5);
}

/* Then inside @media (max-width: 768px) */
.header-content .main-title { font-size: 1.8em; }
.header-content .sub-title { font-size: 1.5em; }

/* And inside @media (max-width: 576px) */
.header-content .main-title { font-size: 1.5em; }
.header-content .sub-title { font-size: 1.2em; }