:root {
  --bg-dark-primary: #1a1a1a;
  --bg-dark-secondary: #2c2c2c;
  --text-light: #f0f0f0;
  --text-muted: #a0a0a0;
  --accent-primary: #00aaff;
  --accent-secondary: #ff47ab;
  --accent-gold: #ffc400;
  --border-color: rgba(255, 255, 255, 0.1);
  --shadow-color: rgba(0, 0, 0, 0.5);
  --glow-primary: 0 0 5px var(--accent-primary), 0 0 10px var(--accent-primary),
    0 0 20px var(--accent-primary);
  --glow-secondary: 0 0 5px var(--accent-secondary),
    0 0 10px var(--accent-secondary), 0 0 20px var(--accent-secondary);
  --header-image-bg: url("https://i.imgur.com/oIOZmL6.png");
  --status-ok-color: #4caf50;
  --status-required-color: #f44336;
}

@keyframes border-glow {
  0% {
    border-color: var(--accent-primary);
    box-shadow: 0 0 15px var(--accent-primary);
  }
  50% {
    border-color: var(--accent-secondary);
    box-shadow: 0 0 15px var(--accent-secondary);
  }
  100% {
    border-color: var(--accent-primary);
    box-shadow: 0 0 15px var(--accent-primary);
  }
}

@keyframes text-glow {
  0% {
    text-shadow: 0 0 4px var(--accent-primary);
  }
  50% {
    text-shadow: 0 0 8px var(--accent-secondary);
  }
  100% {
    text-shadow: 0 0 4px var(--accent-primary);
  }
}

@keyframes pulse-discord {
  0%,
  100% {
    transform: scale(1);
    box-shadow: 0 0 5px var(--accent-primary);
  }
  50% {
    transform: scale(1.05);
    box-shadow: 0 0 15px var(--accent-primary);
  }
}

@keyframes move-gradient {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

@keyframes subtle-flash {
  0%,
  100% {
    opacity: 0.6;
  }
  50% {
    opacity: 1;
  }
}

@keyframes card-border-glow {
  0% {
    border-color: var(--accent-gold);
    box-shadow: 0 0 10px -2px var(--accent-gold);
  }
  50% {
    border-color: #ffdc73;
    box-shadow: 0 0 12px -2px var(--accent-gold);
  }
  100% {
    border-color: var(--accent-gold);
    box-shadow: 0 0 10px -2px var(--accent-gold);
  }
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: "Poppins", sans-serif;
  background-color: var(--bg-dark-primary);
  color: var(--text-light);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  overflow-x: hidden;
}

body.menu-open {
  overflow: hidden;
}

header {
  background-image: var(--header-image-bg);
  background-size: cover;
  background-position: center;
  height: 25vh;
  min-height: 200px;
}

main {
  flex-grow: 1;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px 0;
}

main.simple-page-main {
  justify-content: center;
  align-items: center;
  padding: 40px 20px;
}

footer {
  background-color: var(--bg-dark-secondary);
  color: var(--text-muted);
  padding: 30px 20px;
  text-align: center;
  border-top: 1px solid var(--border-color);
}

nav {
  background-color: var(--bg-dark-secondary);
  padding: 10px 25px;
  width: 100%;
  position: sticky;
  top: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--border-color);
}

#navDiscordBtn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background-color: transparent;
  color: var(--accent-primary);
  text-decoration: none;
  padding: 8px 14px;
  border-radius: 8px;
  border: 1px solid var(--accent-primary);
  font-weight: 600;
  transition: all 0.3s ease;
  animation: pulse-discord 3s infinite ease-in-out;
  margin-left: auto;
}

#navDiscordBtn:hover {
  background-color: var(--accent-primary);
  color: var(--bg-dark-primary);
  transform: scale(1.05);
}

#navDiscordBtn i {
  font-size: 1.2em;
}

nav ul {
  display: flex;
  align-items: center;
  gap: 25px;
  list-style: none;
}

nav ul a {
  color: var(--text-light);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
}

nav ul a:hover {
  color: var(--accent-primary);
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-light);
  font-size: 1.8em;
  cursor: pointer;
  z-index: 1001;
}

.no-link {
  cursor: default;
  opacity: 0.6;
  pointer-events: none;
}

.content-box {
  width: 90%;
  max-width: 900px;
  padding: 30px;
  background-color: rgba(44, 44, 44, 0.4);
  border: 1px solid var(--accent-primary);
  border-radius: 12px;
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  animation: border-glow 4s infinite ease-in-out;
  margin: 25px auto;
}

.content-box h1 {
  font-size: 2.5em;
  margin-bottom: 25px;
  text-align: center;
}

.content-box h3 {
  font-size: 1.5em;
  color: var(--accent-gold);
  margin-top: 30px;
  margin-bottom: 10px;
  padding-bottom: 5px;
  border-bottom: 1px solid var(--border-color);
}

.content-box p,
.content-box li {
  font-size: 1.1em;
  line-height: 1.7;
  color: var(--text-light);
  margin-bottom: 1em;
  text-align: left;
}

.content-box ul {
  list-style-position: inside;
  padding-left: 0;
}

.content-box a {
  color: var(--accent-gold);
  text-decoration: none;
  font-weight: 600;
  transition: text-shadow 0.3s;
}

.content-box a:hover {
  text-shadow: 0 0 8px var(--accent-gold);
}

.footer-buttons {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 25px;
  flex-wrap: wrap;
}

.footer-buttons a,
.footer-buttons small {
  font-size: 0.9em;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-buttons a:hover {
  color: var(--accent-primary);
}

#backToTopBtn {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background-color: var(--bg-dark-secondary);
  color: var(--text-light);
  border: 1px solid var(--border-color);
  border-radius: 50%;
  width: 45px;
  height: 45px;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  z-index: 1000;
  transition: all 0.3s ease;
}

#backToTopBtn.show {
  opacity: 1;
  visibility: visible;
}

#backToTopBtn:hover {
  background-color: var(--accent-primary);
  color: var(--bg-dark-primary);
  transform: scale(1.1);
}

.main-layout {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.h1-welcome {
  color: var(--text-muted);
  font-weight: 500;
}

.flashing-text {
  font-weight: 700;
  background: linear-gradient(
    90deg,
    var(--accent-primary),
    var(--accent-secondary),
    var(--accent-primary)
  );
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: text-glow 2s infinite ease-in-out, move-gradient 4s linear infinite;
}

.update-container {
  padding: 20px 0;
  margin: 30px 0;
}

.welcome-content-area > .update-container:first-child {
  margin-top: 0;
  padding-top: 0;
}

.update-container h3 {
  position: relative;
  text-align: center;
  font-size: 1.5em;
  color: var(--text-light);
  margin-top: 0;
  margin-bottom: 20px;
  padding-top: 15px;
  animation: subtle-flash 2s infinite ease-in-out;
}

.update-container h3::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60%;
  height: 2px;
  background: radial-gradient(
    ellipse at center,
    rgba(204, 204, 204, 0.5) 0%,
    rgba(204, 204, 204, 0) 75%
  );
}

.welcome-content-area > .update-container:first-child h3::before {
  display: none;
}

.update-container p {
  color: var(--text-muted);
  text-align: left;
  font-size: 1.1em;
  line-height: 1.7;
}

.update-container p strong {
  color: var(--text-light);
  font-weight: 600;
}

.swiper-container {
  width: 100%;
  max-width: 900px;
  margin: 20px auto 40px auto;
  position: relative;
}

.swiper-slide {
  display: flex;
  justify-content: center;
  align-items: center;
}

.bonus-item {
  max-width: 900px;
  padding: 30px;
  background-color: rgba(44, 44, 44, 0.4);
  border: 1px solid var(--accent-primary);
  border-radius: 12px;
  text-align: center;
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  animation: border-glow 4s infinite ease-in-out;
  width: 100%;
  margin: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  gap: 15px;
  padding-bottom: 60px;
}

.bonus-item h2 {
  font-size: 1.8em;
  margin-bottom: 10px;
  padding-bottom: 15px;
  border-bottom: 1px solid var(--border-color);
  width: 100%;
}

.bonus-item h2 a {
  text-decoration: none;
  color: var(--accent-gold);
  transition: color 0.3s, text-shadow 0.3s;
}

.bonus-item h2 a:hover {
  color: var(--text-light);
  text-shadow: 0 0 8px var(--accent-gold);
}

.casino-item a {
  display: block;
  border-radius: 10px;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  background: linear-gradient(145deg, #2c2c2c, #1a1a1a);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.casino-item a:hover {
  transform: translateY(-5px) scale(1.03);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.7);
}

.casino-item img {
  width: 100%;
  height: auto;
  display: block;
}

#crypto-casinos .casino-item a {
  display: flex;
  flex-direction: column;
  gap: 15px;
  background: rgba(0, 0, 0, 0.2);
  padding: 15px;
}

#crypto-casinos.bonus-item {
  justify-content: flex-start;
}

.faucet-info {
  list-style: none;
  font-size: 0.9em;
  color: var(--text-muted);
}

.swiper-pagination {
  position: absolute !important;
  bottom: 25px !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  width: auto !important;
}

.swiper-button-next,
.swiper-button-prev {
  color: var(--accent-primary);
}

.swiper-pagination-bullet-active {
  background-color: var(--accent-primary);
}

.payid-casinos-header {
  width: 90%;
  max-width: 900px;
  padding: 30px;
  background-color: rgba(44, 44, 44, 0.4);
  border: 1px solid var(--accent-gold);
  border-radius: 12px;
  margin: 25px auto;
  animation: border-glow 4s infinite ease-in-out;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
}

.payid-casinos-header h1 {
  margin: 0;
  font-size: 2.2em;
  font-weight: bold;
  color: var(--text-light);
}

.sort-and-random-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  justify-content: center;
  width: 100%;
}

#sortSelect {
  padding: 8px 30px 8px 12px;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  font-size: 0.9em;
  background-color: var(--bg-dark-secondary);
  color: var(--text-light);
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-image: url('data:image/svg+xml;utf8,<svg fill="%23ffc400" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M7 10l5 5 5-5z"/></svg>');
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 16px;
  transition: background-color 0.3s, border-color 0.3s;
}

#sortSelect:hover {
  border-color: var(--accent-gold);
}

#randomCasinoBtn {
  padding: 10px 20px;
  font-size: 1em;
  font-weight: bold;
  color: var(--text-light);
  background: linear-gradient(145deg, #3a3f42, #2a3238);
  border: 1px solid var(--border-color);
  border-radius: 9px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: all 0.3s ease-in-out;
}

#randomCasinoBtn:hover {
  border-color: var(--accent-gold);
  transform: translateY(-2px);
  color: var(--accent-gold);
}

#randomCasinoBtn i {
  color: var(--accent-gold);
}

.payid-casinos-container {
  width: 90%;
  max-width: 900px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 25px;
  margin: 25px auto;
}

.casino-link {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  padding: 20px;
  background: var(--bg-dark-secondary);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  text-align: center;
  text-decoration: none;
  color: var(--text-light);
  transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out,
    border-color 0.2s ease-in-out;
  animation: card-border-glow 5s infinite ease-in-out;
}

.casino-link:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
  border-color: var(--accent-primary);
  animation-play-state: paused;
}

.casino-image {
  display: block;
  width: 180px;
  height: 50px;
  object-fit: contain;
  margin: 0 auto 15px auto;
}

.casino-link.has-image .casino-title {
  display: none;
}

.casino-title {
  font-weight: bold;
  font-size: 1.4em;
  margin: 0 0 12px 0;
  color: var(--text-light);
  text-align: left;
}

.casino-bonus {
  color: var(--accent-gold);
  font-weight: bold;
  font-size: 1.15em;
  margin-bottom: 12px;
  text-align: left;
}

.casino-requirements {
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
}

.requirement-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.requirement-status i {
  font-size: 1.2em;
}

.requirement-status.status-ok i {
  color: var(--status-ok-color);
}

.requirement-status.status-required i {
  color: var(--status-required-color);
}

.requirement-label {
  font-size: 0.9em;
  color: var(--text-muted);
  text-align: left;
}

.casino-date-container {
  position: absolute;
  bottom: 8px;
  right: 8px;
}

.calendar-flip-container {
  perspective: 1000px;
  width: 42px;
  height: 46px;
}

.calendar-flipper {
  transition: 0.6s transform;
  transform-style: preserve-3d;
  position: relative;
  width: 100%;
  height: 100%;
}

.casino-link:hover .calendar-flipper {
  transform: rotateY(180deg);
}

.new-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background-color: #1a1a1a;
  color: var(--accent-primary);
  padding: 3px 8px;
  border-radius: 5px;
  font-size: 0.8em;
  font-weight: bold;
  text-transform: uppercase;
  z-index: 10;
  border: 1px solid var(--accent-primary);
  box-shadow: 0 0 5px var(--accent-primary), 0 0 10px var(--accent-primary);
}

.clean-calendar-icon {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  border-radius: 6px;
  font-family: sans-serif;
  overflow: hidden;
  text-align: center;
  position: absolute;
  top: 0;
  left: 0;
  backface-visibility: hidden;
}

.calendar-front {
  z-index: 2;
  background-color: #ffffff;
}

.calendar-back {
  transform: rotateY(180deg);
  background-color: var(--bg-dark-secondary);
  color: var(--accent-gold);
  border: 1px solid var(--accent-gold);
  box-shadow: inset 0 0 4px rgba(255, 196, 0, 0.5);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  font-weight: normal;
  padding: 2px;
  line-height: 1;
}

.calendar-back-day {
  font-size: 0.95em;
  font-weight: 700;
}

.calendar-back-month {
  font-size: 0.7em;
  font-weight: 450;
  letter-spacing: 0.5px;
}

.calendar-back-year {
  font-size: 0.82em;
  font-weight: 700;
  opacity: 0.8;
}

.calendar-month-header {
  background-color: #e63946;
  color: white;
  font-size: 0.65em;
  font-weight: 600;
  padding: 3px 0;
}

.calendar-day-display {
  color: #212529;
  font-size: 1.6em;
  font-weight: 700;
  flex-grow: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

@media (max-width: 1024px) {
  header {
    min-height: 150px;
  }
  nav {
    justify-content: space-between;
    padding: 10px 15px;
  }
  #navDiscordBtn span {
    display: none;
  }
  .menu-toggle {
    display: block;
  }
  nav ul {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(26, 26, 26, 0.95);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 30px;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
  }
  nav ul.show {
    display: flex;
  }
  nav ul.show #navDiscordBtn {
    position: absolute;
    bottom: 8vh;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    max-width: 300px;
    justify-content: center;
    animation: none;
  }
  nav ul.show #navDiscordBtn span {
    display: inline;
  }
  nav ul li a {
    font-size: 1.5em;
    font-weight: 600;
  }
  .content-box h1 {
    font-size: 1.8em;
  }
  .content-box h3 {
    font-size: 1.3em;
  }
  .content-box p,
  .content-box li {
    font-size: 1em;
  }
  .footer-buttons {
    flex-direction: column;
    gap: 15px;
  }
  .bonus-item h2 {
    font-size: 1.4em;
  }
  .bonus-item:not(#crypto-casinos) .casino-item img {
    height: 56px;
    width: auto;
    max-width: 100%;
    object-fit: contain;
  }
  .swiper-container {
    width: 90%;
  }
}

@media (max-width: 992px) {
  .payid-casinos-container {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }
}

@media (max-width: 768px) {
  .payid-casinos-container {
    grid-template-columns: 1fr;
  }
  .payid-casinos-header {
    width: 90%;
  }
  .payid-casinos-header h1 {
    font-size: 1.8em;
  }
}

@media (min-width: 1025px) {
  .main-layout {
    flex-direction: row;
    align-items: stretch;
    justify-content: center;
    gap: 30px;
    width: 100%;
    max-width: 1200px;
    padding: 0 20px;
    margin: 30px auto;
  }
  .content-box.homepage-welcome {
    flex: 1 1 550px;
    max-width: 550px;
    margin: 0;
    padding: 25px;
    display: flex;
    flex-direction: column;
  }
  .welcome-content-area {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
  }
  .swiper-container {
    flex: 0 1 450px;
    max-width: 450px;
    margin: 0;
  }
  .content-box.homepage-welcome h1 {
    font-size: 2em;
    margin-bottom: 10px;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--border-color);
  }
  .content-box.homepage-welcome p {
    font-size: 0.9em;
    margin-bottom: 1em;
  }
  .content-box.homepage-welcome .update-container {
    margin: 0;
    padding: 0;
  }
  .content-box.homepage-welcome .update-container h3 {
    margin-top: 0;
    padding-top: 0;
    margin-bottom: 15px;
  }
  .content-box.homepage-welcome .welcome-content-area > :last-child {
    margin-bottom: 0;
  }
  .bonus-item {
    height: 100%;
    justify-content: space-between;
    padding: 25px;
    padding-bottom: 60px;
  }
  .bonus-item h2 {
    font-size: 1.5em;
  }
  .bonus-item:not(#crypto-casinos) .casino-item img {
    width: 100%;
    height: 75px;
    object-fit: contain;
  }
  #crypto-casinos .casino-item {
    flex-grow: 1;
    display: flex;
  }
  #crypto-casinos .casino-item a {
    flex-grow: 1;
    justify-content: center;
  }
}
