:root {
  --bg-main: linear-gradient(145deg, #1b1b1f 0%, #0f0f12 100%);
  --text-main: #f3e9d2;
  --panel-bg: #26262e;
  --card-bg: #1a1a22;
  --accent: #ffb703;
  --modal-bg: #121218;
  --container-bg: rgba(255, 255, 255, 0.05);
  --table-text: #f3e9d2;
  --top-player: rgba(255, 183, 3, 0.22);
}

body.light-mode {
  --bg-main: linear-gradient(135deg, #0f172a 0%, #111827 45%, #1e293b 100%);
  --text-main: #f8fafc;
  --panel-bg: rgba(30, 41, 59, 0.72);
  --card-bg: #1e293b;
  --accent: #38bdf8;
  --modal-bg: #0f172a;
  --container-bg: rgba(0, 0, 0, 0.04);
  --table-text: #e2e8f0;
  --top-player: rgba(217, 119, 6, 0.18);
}

body {
  background: var(--bg-main);
  min-height: 100vh;
  margin: 0;
  font-family: "Segoe UI", "Poppins", system-ui, sans-serif;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  margin: 0;
}

main {
  max-width: 500px;
  margin: 0 auto;
  display: none;
}

a {
  text-decoration: none;
  color: var(--accent);
}

a:hover {
  color: var(--top-player);
}

h1,
h2 {
  font-size: 2.6rem;
  font-weight: 700;
  letter-spacing: 2px;
  text-shadow: 0 4px 10px rgba(0, 0, 0, 0.7);
  margin-bottom: 0.5rem;
  display: flex;
  gap: 0.4rem;
  color: var(--text-main);
}

h3 {
  color: var(--text-main);
  text-shadow: 0 4px 10px rgba(0, 0, 0, 0.7);
  text-decoration: underline;
}

p,
ul li,
pre,
ol li {
  color: var(--table-text);
}

.update-msg {
  font-style: italic;
  margin-bottom: 1rem;
  color: var(--text-main);
  border-bottom: 1px solid var(--accent);
  text-align: center;
}

.update-msg a:hover {
  color: #000;
}

#leaderboard {
  height: 50px;
  width: 196px;
}

.play-flex {
  display: flex;
  flex-wrap: wrap;
  width: 300px;
  justify-content: center;
}

.play-flex .button {
  width: 250px;
  height: 50px;
  margin-bottom: 4px;
}

#htp {
  height: 50px;
  width: 50px;
}

.section-top {
  border-top: 4px solid var(--accent);
  margin-top: 2rem;
}

.home-flex {
  display: flex;
}

.homepage-info h2 {
  margin-top: 1rem;
}

.button {
  position: relative;
  background-color: transparent;
  cursor: pointer;
  overflow: hidden;
  color: var(--accent);
  border: 2px solid var(--accent);
  transition: all 1s ease-in-out;
  font-size: 1.5rem;
  font-weight: bolder;
}

.button::after {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  transition: all 1s ease-in-out;
  background-color: var(--accent);
  visibility: hidden;
  height: 10px;
  width: 10px;
  z-index: -1;
}

.button:hover {
  color: var(--text-main);
  box-shadow: inset 1px 1px 1px 1px var(--modal-bg);
}

.button:hover::after {
  visibility: visible;
  transform: scale(100) translateX(2px);
}

.toggle {
  position: absolute;
  right: 10px;
  bottom: 110px;
  background: transparent;
  border: none;
  padding: 1rem;
  font-size: 2rem;
  cursor: pointer;
  z-index: 3;
}

.toggle-leader {
  bottom: 15px;
}

.flip-card,
.front-card,
.back-card,
.deal,
.deck,
.deck-cards {
  width: 8vw;
  min-width: 90px;
  max-width: 120px;
  aspect-ratio: 5/7;
  border-radius: 1rem;
  box-shadow:
    0 15px 25px rgba(0, 0, 0, 0.5),
    inset 0 -3px 0 rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  font-weight: 800;
  border: 2px solid #d4b87a;
  background: radial-gradient(circle at 20% 20%, #fff6e6, #e7d7b8);
  z-index: 3;
}

.flip-card {
  position: relative;
  transition: transform 0.6s;
  transform-style: preserve-3d;
}

.front-card,
.back-card {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
}

.back-card {
  transform: rotateY(180deg);
  display: flex;
  flex-direction: column;
  padding: 0;
}

.deck {
  margin-top: 1rem;
}

.front-card,
.deck-cards,
.deal {
  background: linear-gradient(115deg, #e8dbbd 0%, #c9aa5e 50%, #e8dbbd 100%);
  position: relative;
  overflow: hidden;
}

.front-card::before,
.deck-cards::before,
.deal::before {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    45deg,
    rgba(255, 215, 0, 0.1) 0px,
    rgba(255, 215, 0, 0.1) 2px,
    transparent 2px,
    transparent 12px
  );
}

.front-card::after,
.deck-cards::after,
.deal::after {
  content: "⚜";
  font-size: 4rem;
  color: rgba(255, 217, 0, 0.74);
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.card-value {
  position: absolute;
  font-size: xx-large;
}

.cards[data-locked="true"] {
  pointer-events: none;
  opacity: 0.7;
}

.higher,
.lower {
  flex: 1;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
}

.higher {
  border-top-left-radius: 1rem;
  border-top-right-radius: 1rem;
  color: transparent;
}

.lower {
  border-bottom-left-radius: 1rem;
  border-bottom-right-radius: 1rem;
  color: transparent;
}

.higher:hover {
  background: linear-gradient(
    to bottom,
    rgba(76, 175, 80, 0.7),
    rgba(76, 175, 80, 0.2)
  );
  color: #000;
}

.back-card:has(.higher:hover) {
  border-color: #8bc34a;
  box-shadow:
    0 0 35px #4caf50,
    0 10px 25px black;
}

.lower:hover {
  background: linear-gradient(
    to top,
    rgba(244, 67, 54, 0.7),
    rgba(244, 67, 54, 0.2)
  );
  color: #000;
}

.back-card:has(.lower:hover) {
  box-shadow:
    0 0 35px #f44336,
    0 10px 25px black;
  border-color: #e57373;
}

.e-flip {
  transform: scaleX(-1);
}

.hot {
  animation: burn 3s ease-out infinite;
  border-radius: 1rem;
}

.extra-hot {
  animation: burner 1s ease-out infinite;
  border-radius: 1rem;
}

@keyframes burn {
  0% {
    color: #ff826e;
    box-shadow:
      0 0 5px 0 #ffb703,
      0 0 5px 0 #ffb703;
  }

  100% {
    color: black;
    background: white;
    box-shadow:
      0 0px 40px 10px rgba(255, 130, 10, 0),
      0 0px 30px 10px rgba(230, 30, 10, 0),
      0 0px 10px 0 rgba(255, 255, 10, 0);
  }
}

@keyframes burner {
  0% {
    color: #ff826e;
    box-shadow:
      0 0 5px 5px #d90429,
      0 0 5px 0 #f08080;
  }

  100% {
    color: black;
    background: white;
    box-shadow:
      0 0px 40px 10px rgba(255, 130, 10, 0),
      0 0px 30px 10px rgba(230, 30, 10, 0),
      0 0px 10px 0 rgba(255, 255, 10, 0);
  }
}

.container {
  max-width: 650px;
  min-width: 320px;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(16px);
  border-radius: 3.5rem;
  padding: 1rem 1.8rem 2.2rem;
  box-shadow:
    0 30px 50px rgba(0, 0, 0, 0.6),
    inset 0 1px 1px rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.15);
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 0 auto 1rem;
  position: relative;
  z-index: 2;
}

.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  justify-items: center;
  align-items: center;
  max-height: 540px;
  margin: 0 0 2rem 0;
  min-width: 320px;
}

.panel {
  width: 90%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--panel-bg);
  border-radius: 4rem;
  padding: 0.8rem 2rem;
  margin: 0.75rem 0 1.8rem;
  box-shadow:
    inset 0 4px 8px rgba(0, 0, 0, 0.5),
    0 8px 18px rgba(0, 0, 0, 0.4);
  color: #fae7b3;
  font-weight: bold;
  flex-wrap: wrap;
}

.form-control {
  position: relative;
  display: flex;
  justify-content: center;
}

.form-control input {
  background-color: transparent;
  border: 0;
  border-bottom: 2px #fff solid;
  display: block;
  padding: 15px 0;
  font-size: 18px;
  color: var(--text-main);
  margin-right: 1rem;
}

.form-control input:focus,
.form-control input:valid {
  outline: 0;
  border-bottom-color: #ffb703;
}

.form-control label {
  position: absolute;
  top: 15px;
  left: 0;
  pointer-events: none;
}

.form-control label span {
  display: inline-block;
  font-size: 18px;
  color: #fff;
  transition: 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.form-control input:focus + label span,
.form-control input:valid + label span {
  color: #ffb703;
  transform: translateY(-30px);
}

#endText {
  margin-bottom: 3rem;
  text-align: left;
}

.modal-btn {
  height: 45px;
  min-width: 110px;
  border-radius: 0.75rem;
  cursor: pointer;
  border: 2px solid #ffb703;
  background: transparent;
  color: #ffb703;
  font-size: 1rem;
  font-weight: bold;
  margin-top: 0.5rem;
}

.modal-btn:hover {
  color: #0f1a1b;
  background-color: #ffb703;
}

.score-modal {
  position: relative;
}

.restart-button {
  cursor: pointer;
  border: none;
  background: #ffb703;
  color: #0f1a1b;
  width: 75px;
  height: 75px;
  border-radius: 50%;
  overflow: hidden;
  position: absolute;
  font-weight: 600;
  right: 20px;
  top: 20px;
}

.button__text {
  position: absolute;
  inset: 0;
  animation: text-rotation 8s linear infinite;

  > span {
    position: absolute;
    transform: rotate(calc(19deg * var(--index)));
    inset: -10px;
  }
}

.restart-button:hover {
  background: #0f1a1b;
  color: #ffb703;
  box-shadow: 1px 1px 1px 1px #ffb703;
  transform: scale(1.05);
}

@keyframes text-rotation {
  to {
    rotate: 360deg;
  }
}

.end-score {
  width: 100%;
  display: flex;
  justify-content: space-between;
}

.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 999;
}

.modal.active {
  display: flex;
}

.modal-box {
  background: var(--modal-bg);
  padding: 2rem 3rem;
  border-radius: 1.5rem;
  text-align: center;
  color: var(--text-main);
  box-shadow: 0 0 40px rgba(0, 0, 0, 0.8);
}

.restart-btn {
  margin-top: 1rem;
  padding: 0.6rem 1.5rem;
  border: none;
  border-radius: 0.8rem;
  cursor: pointer;
}

.container.correct {
  box-shadow: 0 0 40px rgba(76, 175, 80, 0.6);
}

.container.wrong {
  box-shadow: 0 0 40px rgba(244, 67, 54, 0.6);
  animation: shake 0.4s ease;
}

@keyframes shake {
  0% {
    transform: translateX(0);
  }

  20% {
    transform: translateX(-6px);
  }

  40% {
    transform: translateX(6px);
  }

  60% {
    transform: translateX(-4px);
  }

  80% {
    transform: translateX(4px);
  }

  100% {
    transform: translateX(0);
  }
}

.top-player {
  background: var(--top-player);
}

td:nth-child(n + 3) {
  text-align: right;
}

thead {
  position: sticky;
  top: 0;
  background: var(--panel-bg);
}

#leaderboardModal .modal-box {
  position: relative;
}

#closeLeaderboard {
  position: absolute;
  background-color: #d90429;
  right: 1rem;
  top: 1rem;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  font-size: 24px;
}

#closeLeaderboard:hover {
  cursor: pointer;
  background-color: #e57373;
  box-shadow: inset 1px 1px 1px 1px #000;
}

.table {
  width: 100%;
  color: var(--table-text);
  border: 1px solid var(--table-text);
}

.modal-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

#submitStatus {
  margin-top: 10px;
  font-size: 0.9rem;
  color: #ffb703;
  opacity: 0;
  transition: 0.3s ease;
}

#submitStatus.show {
  opacity: 1;
  margin: 1rem 0 0 1rem;
  text-align: center;
}

.form-control input.invalid {
  border-bottom-color: #f44336;
  box-shadow: 0 2px 0 #f44336;
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin: 2rem 0;
  color: var(--table-text);
}

.pagination button {
  padding: 0.7rem 1.2rem;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: bold;
}

.pagination button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

#leaderboardModal a {
  border: 2px solid var(--accent);
  color: var(--accent);
  padding: 1rem;
}

#leaderboardModal a:hover {
  background-color: var(--accent);
  color: var(--text-main);
}

table {
  margin-bottom: 2rem;
}

.leader-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  width: 100%;
  background: var(--card-bg);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  margin-bottom: 1rem;
}

nav {
  display: flex;
  justify-content: center;
}

.nav {
  width: 100%;
  max-width: 1200px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 1.25rem;
  position: relative;
}

.site-id {
  margin: 0;
  padding: 1rem 0;
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--table-text);
  transition: 0.25s;
}

.site-id:hover {
  color: var(--accent);
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-list > li {
  position: relative;
}

.nav-list > li > a {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--table-text);
  padding: 0.85rem 1rem;
  border-radius: 12px;
  font-weight: 600;
}

.nav-list > li > a::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 6px;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: center;
  transition: 0.25s;
}

.nav-list > li > a:hover {
  color: var(--accent);
  background: rgba(255, 255, 255, 0.04);
}

.nav-list > li > a:hover::after {
  transform: scaleX(1);
}

.dropdown-arrow {
  font-size: 0.75rem;
  transition: 0.25s;
}

.dropdown:hover .dropdown-arrow {
  transform: rotate(180deg);
}

.dropdown-menu {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  min-width: 220px;
  padding: 0.5rem;
  margin: 0;
  list-style: none;
  background: #666666;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 0 0 16px 16px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: 0.25s;
}

.dropdown:hover .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-menu li a {
  display: block;
  padding: 0.85rem 1rem;
  border-radius: 10px;
  color: var(--table-text);
  transition: 0.2s;
}

.dropdown-menu li a:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--accent);
}

.nav-log {
  background: var(--accent);
  color: #000 !important;
  border-radius: 999px;
  padding: 0.8rem 1.25rem !important;
  font-weight: 700;
}

.nav-log:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
}

.menu {
  display: none;
  background: none;
  border: none;
  color: var(--table-text);
  font-size: 1.8rem;
  cursor: pointer;
}

@media (max-width: 900px) {
  .nav {
    flex-wrap: wrap;
  }

  .menu {
    display: block;
  }

  .nav-list {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease;
  }

  .nav-list.open {
    max-height: 800px;
  }

  .nav-list li {
    width: 100%;
  }

  .nav-list li a {
    border-radius: 0;
  }

  .dropdown-menu {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    display: none;
    margin-left: 1rem;
    border: none;
    box-shadow: none;
    background: transparent;
  }

  .dropdown.open .dropdown-menu {
    display: block;
  }
}

.leader-con {
  display: flex;
  justify-content: space-between;
  padding: 0 2rem;
}

.banner-ad {
  width: 728px;
  height: 90px;
  border: 2px dotted rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.03);
}

.banner-ad ins {
  height: inherit;
}

#global-leaderboard table tr:hover {
  background: #ffffff10;
}

.main {
  max-width: 1080px;
  margin: 0 auto;
}

.support-form {
  width: min(1000px, 95%);
  margin: 2rem auto;
  padding: 1.5rem;
  background: var(--panel-bg);
  border-radius: 16px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.35);

  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 1rem;
}

.form-sub,
.form-info {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.form-sub {
  justify-content: flex-start;
}

.form-info {
  min-height: 100%;
}

.support-form input,
.support-form select,
.support-form textarea,
.support-form button {
  width: 100%;
  border: none;
  outline: none;
  border-radius: 10px;
  padding: 0.9rem 1rem;
  font-size: 1rem;
  box-sizing: border-box;
}

.support-form input,
.support-form select,
.support-form textarea {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-main);
  border: 2px solid transparent;
  transition: 0.2s ease;
}

.support-form input::placeholder,
.support-form textarea::placeholder {
  color: var(--text-main);
}

.support-form input:focus,
.support-form select:focus,
.support-form textarea:focus {
  border-color: #5ea1ff;
  background: rgba(255, 255, 255, 0.12);
}

.support-form textarea {
  resize: vertical;
  min-height: 250px;
  flex: 1;
}

.support-form > div:last-child {
  grid-column: 1 / -1;

  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

#submitBtn {
  cursor: pointer;
  font-weight: 700;
  background: linear-gradient(135deg, #4f8cff, #6ea8ff);
  color: white;
  transition: 0.2s ease;
}

#submitBtn:hover {
  transform: translateY(-2px);
  filter: brightness(1.05);
}

#submitBtn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.form-message {
  display: none;
  padding: 0.85rem 1rem;
  border-radius: 10px;
  font-size: 0.95rem;
  white-space: pre-line;
}

.form-message.error {
  display: block;
  background: rgba(247, 0, 0, 0.685);
  border: 1px solid rgba(255, 70, 70, 0.4);
  color: #ffb3b3;
}

.form-message.success {
  display: block;
  background: rgba(60, 200, 120, 0.15);
  border: 1px solid rgba(60, 200, 120, 0.4);
  color: #b7ffd1;
}

@media (max-width: 750px) {
  .support-form {
    grid-template-columns: 1fr;
  }

  .support-form textarea {
    min-height: 180px;
  }
}

footer {
  height: 100px;
  width: 100%;
  margin: auto auto 0 auto;
  background-color: var(--panel-bg);
}

.footer {
  max-width: 1080px;
  display: flex;
  justify-content: space-between;
  margin: 0 auto;
  margin-top: 1rem;
}

footer h2 {
  margin: 0;
}

footer div a {
  display: flex;
  color: var(--table-text);
  margin-bottom: 0.2rem;
}

footer div a:hover {
  color: var(--accent);
}

.overlay {
  position: absolute;
  color: #000;
  background-color: red;
  border-radius: 1rem;
  border: 2px solid #e76005;
  z-index: 4;
  opacity: 1;
  font-size: 1.5rem;
  font-style: italic;
  font-weight: bold;
}

.login {
  margin: auto;
  color: var(--accent);
  border: 2px solid var(--accent);
  border-radius: 1rem;
  padding: 1rem;
}

.login div {
  display: flex;
  flex-wrap: wrap;
}

.login div input {
  width: 100%;
  margin-bottom: 1rem;
  border: none;
  border-bottom: 2px solid var(--accent);
  color: var(--text-main);
  background-color: transparent;
}

.login button {
  width: 100%;
  padding: 0.5rem 0;
  background-color: transparent;
  border: 2px solid var(--accent);
  color: var(--accent);
  font-weight: bold;
  cursor: pointer;
  margin-bottom: 0.5rem;
}

.login button:hover,
.login button:active {
  background-color: var(--accent);
  color: var(--modal-bg);
}

.login p {
  text-align: center;
  margin: 0 auto;
  font-style: italic;
  opacity: 0.7;
  margin-bottom: 0.5rem;
}

.login a {
  width: 100%;
  text-align: center;
  color: var(--text-main);
}

.login a:hover {
  color: var(--accent);
}

.login-msg {
  color: #ff0000;
  font-weight: 700;
  font-style: oblique;
}

.nav-log::before {
  content: "";
  font-style: italic;
  font-weight: 500;
}

.dashboard {
  display: flex;
  justify-content: center;
  padding: 4rem 1rem;
  color: #fff;
}

.dashboard-card {
  width: 100%;
  max-width: 700px;
  background: var(--panel-bg);
  padding: 2rem;
  border-radius: 20px;
}

.dashboard-card h1 {
  margin-bottom: 2rem;
}

.dashboard-info {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.dashboard-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  background: var(--card-bg);
  border-radius: 12px;
}

.dashboard-actions {
  display: flex;
  justify-content: center;
  margin-top: 2rem;
}

.logout-btn {
  display: inline-block;
  padding: 1.5rem 3rem;
  border-radius: 12px;
  text-decoration: none;
  color: #c90000;
  border: 1px solid #c90000;
  font-weight: bold;
  box-shadow: 5px 5px 5px #000;
}

.logout-btn:hover {
  box-shadow: inset 2px 2px 2px #000;
  background-color: #c90000;
  color: #000;
}

.logged-user {
  margin-right: 1rem;
}

.coins {
  color: red;
}

.card-preview {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  border-radius: 1.5rem;
}

.default,
.shop-card p {
  margin: 0 auto;
  text-align: center;
}

.shop-card p {
  margin-top: 1rem;
  width: 120px;
}

.shop-card {
  background-color: #ffffff35;
}

.shop .skin-lava,
.shop .skin-red,
.shop .skin-floral,
.shop .skin-rain,
.shop .skin-galaxy {
  margin: 0 auto;
}

.skin-floral {
  background: #006d77;
  border: 2px solid #ffddd2;
}

.front-card.skin-floral::before,
.deal.skin-floral::before,
.deck-cards.skin-floral::before {
  content: "";
  position: absolute;
  inset: 10px;
  border: 2px dotted #ffddd2;
  border-radius: 1rem;
}

.front-card.skin-floral::after,
.deal.skin-floral::after,
.deck-cards.skin-floral::after {
  content: "🌸";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 4rem;
  color: #ffddd2;
}

.skin-red {
  border-radius: 5px;
  box-shadow: 2px 2px 5px rgba(#000, 0.5);
  background: linear-gradient(to left top, #ec0101, #06cced);
}

.front-card.skin-red::before,
.deal.skin-red::before,
.deck-cards.skin-red::before {
  position: absolute;
  inset: 0;
  z-index: 0;
  content: "";
  background: var(--map), var(--pattern);
  --map: repeating-linear-gradient(45deg, #000, #666, #000 20%);
  --pattern:
    repeating-radial-gradient(circle, #06cced, #000, #06cced 5%),
    repeating-conic-gradient(#ff0000, #ff0000, #ff0000 5%);
  background-blend-mode: screen, difference;
}

.front-card.skin-red::after,
.deal.skin-red::after,
.deck-cards.skin-red::after {
  content: "";
  background: linear-gradient(90deg, #251967, #d0135e);
  mix-blend-mode: screen;
}

.skin-lava {
  border: 5px solid #363636;
  background: linear-gradient(-45deg, #fab82b, #e78f3c, #d1581f, #7f1f1b);
  background-size: 400% 400%;
  animation: lavaFlow 15s ease infinite;
}

.front-card.skin-lava::before,
.deal.skin-lava::before,
.deck-cards.skin-lava::before {
  content: "♠️";
  position: absolute;
  font-size: 4rem;
  display: flex;
  justify-content: center;
  background: repeating-linear-gradient(
    180deg,
    rgba(255, 215, 0, 0.1) 0px,
    rgba(255, 215, 0, 0.1) 2px,
    transparent 2px,
    transparent 12px
  );
}

.front-card.skin-lava::after,
.deal.skin-lava::after,
.deck-cards.skin-lava::after {
  content: "";
  position: absolute;
  bottom: -50%;
  left: -50%;
  height: 200%;
  width: 200%;
  box-sizing: border-box;
  background: repeating-linear-gradient(
    to right,
    #7f1f1b,
    #b73527,
    #d6402e,
    #ff5233
  );
  border-radius: 40%;
  animation: spin 20s linear infinite;
}

@keyframes lavaFlow {
  0% {
    background-position: 0% 50%;
  }

  50% {
    background-position: 100% 50%;
  }

  100% {
    background-position: 0% 50%;
  }
}

@keyframes spin {
  0% {
    transform: translateY(0) rotate(0deg);
  }

  50% {
    transform: translateY(-40%) rotate(360deg);
  }

  100% {
    transform: translateY(0) rotate(0deg);
  }
}

.skin-rain {
  border: 4px solid #000dc2;
  background: #2980b9;
  background: linear-gradient(to bottom, #2980b9, #6dd5fa, #ffffff);
}

.front-card.skin-rain::before,
.deal.skin-rain::before,
.deck-cards.skin-rain::before {
  position: absolute;
  width: 3px;
  height: 6px;
  top: 25%;
  left: 50%;
  border-radius: 50%;
  animation: rain 0.7s linear infinite;
}

.front-card.skin-rain::after,
.deal.skin-rain::after,
.deck-cards.skin-rain::after {
  content: "";
  position: absolute;
  height: 50px;
  width: 50px;
  top: 35%;
  left: 15%;
  background: #797979;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  box-shadow:
    #797979 65px -15px 0 15px,
    #797979 25px -25px,
    #797979 30px 10px,
    #797979 60px 15px 0 -10px,
    #797979 85px 5px 0 -5px;
  animation: cloud 5s ease-in-out infinite;
}

@keyframes cloud {
  50% {
    transform: translate(-50%, -70%);
  }

  100% {
    transform: translate(-50%, -50%);
  }
}

@keyframes rain {
  0% {
    box-shadow:
      rgba(0, 0, 0, 0) -10px 30px,
      rgba(0, 0, 0, 0) 40px 40px,
      rgba(0, 0, 0, 0.3) -50px 75px,
      rgba(0, 0, 0, 0.3) 55px 50px,
      rgba(0, 0, 0, 0.3) -18px 100px,
      rgba(0, 0, 0, 0.3) 12px 95px,
      rgba(0, 0, 0, 0.3) -31px 45px,
      rgba(0, 0, 0, 0.3) 30px 35px;
  }

  25% {
    box-shadow:
      rgba(0, 0, 0, 0.3) -10px 45px,
      rgba(0, 0, 0, 0.3) 40px 60px,
      rgba(0, 0, 0, 0.3) -50px 90px,
      rgba(0, 0, 0, 0.3) 55px 65px,
      rgba(0, 0, 0, 0) -18px 120px,
      rgba(0, 0, 0, 0) 12px 120px,
      rgba(0, 0, 0, 0.3) -31px 70px,
      rgba(0, 0, 0, 0.3) 30px 60px;
  }

  26% {
    box-shadow:
      rgba(0, 0, 0, 0.3) -10px 45px,
      rgba(0, 0, 0, 0.3) 40px 60px,
      rgba(0, 0, 0, 0.3) -50px 90px,
      rgba(0, 0, 0, 0.3) 55px 65px,
      rgba(0, 0, 0, 0) -18px 40px,
      rgba(0, 0, 0, 0) 12px 20px,
      rgba(0, 0, 0, 0.3) -31px 70px,
      rgba(0, 0, 0, 0.3) 30px 60px;
  }

  50% {
    box-shadow:
      rgba(0, 0, 0, 0.3) -10px 70px,
      rgba(0, 0, 0, 0.3) 40px 80px,
      rgba(0, 0, 0, 0) -50px 100px,
      rgba(0, 0, 0, 0.3) 55px 80px,
      rgba(0, 0, 0, 0.3) -18px 60px,
      rgba(0, 0, 0, 0.3) 12px 45px,
      rgba(0, 0, 0, 0.3) -31px 95px,
      rgba(0, 0, 0, 0.3) 30px 85px;
  }

  51% {
    box-shadow:
      rgba(0, 0, 0, 0.3) -10px 70px,
      rgba(0, 0, 0, 0.3) 40px 80px,
      rgba(0, 0, 0, 0) -50px 45px,
      rgba(0, 0, 0, 0.3) 55px 80px,
      rgba(0, 0, 0, 0.3) -18px 60px,
      rgba(0, 0, 0, 0.3) 12px 45px,
      rgba(0, 0, 0, 0.3) -31px 95px,
      rgba(0, 0, 0, 0.3) 30px 85px;
  }

  75% {
    box-shadow:
      rgba(0, 0, 0, 0.3) -10px 95px,
      rgba(0, 0, 0, 0.3) 40px 100px,
      rgba(0, 0, 0, 0.3) -50px 60px,
      rgba(0, 0, 0, 0) 55px 95px,
      rgba(0, 0, 0, 0.3) -18px 80px,
      rgba(0, 0, 0, 0.3) 12px 70px,
      rgba(0, 0, 0, 0) -31px 120px,
      rgba(0, 0, 0, 0) 30px 110px;
  }

  76% {
    box-shadow:
      rgba(0, 0, 0, 0.3) -10px 95px,
      rgba(0, 0, 0, 0.3) 40px 100px,
      rgba(0, 0, 0, 0.3) -50px 60px,
      rgba(0, 0, 0, 0) 55px 35px,
      rgba(0, 0, 0, 0.3) -18px 80px,
      rgba(0, 0, 0, 0.3) 12px 70px,
      rgba(0, 0, 0, 0) -31px 25px,
      rgba(0, 0, 0, 0) 30px 15px;
  }

  100% {
    box-shadow:
      rgba(0, 0, 0, 0) -10px 120px,
      rgba(0, 0, 0, 0) 40px 120px,
      rgba(0, 0, 0, 0.3) -50px 75px,
      rgba(0, 0, 0, 0.3) 55px 50px,
      rgba(0, 0, 0, 0.3) -18px 100px,
      rgba(0, 0, 0, 0.3) 12px 95px,
      rgba(0, 0, 0, 0.3) -31px 45px,
      rgba(0, 0, 0, 0.3) 30px 35px;
  }
}

.skin-galaxy {
  position: relative;
  background: radial-gradient(circle at center, #1b2735 0%, #090a0f 70%);
  border: 2px solid #7c5cff;
}

.front-card.skin-galaxy::before,
.deal.skin-galaxy::before,
.deck-cards.skin-galaxy::before {
  content: "";
  position: absolute;
  inset: -50%;
  background:
    radial-gradient(circle, rgb(255, 255, 255) 1px, transparent 2px) 5% 10% /
      18% 18%,
    radial-gradient(circle, rgba(235, 155, 255, 0.9) 1px, transparent 2px) 20%
      80% / 22% 22%,
    radial-gradient(circle, rgba(235, 155, 255, 0.8) 2px, transparent 3px) 40%
      25% / 20% 20%,
    radial-gradient(circle, rgba(235, 155, 255, 1) 1px, transparent 2px) 70%
      40% / 18% 18%,
    radial-gradient(circle, rgba(235, 155, 255, 0.7) 2px, transparent 3px) 85%
      15% / 24% 24%,
    radial-gradient(circle, rgba(235, 155, 255, 0.9) 1px, transparent 2px) 10%
      60% / 20% 20%,
    radial-gradient(circle, rgba(235, 155, 255, 0.8) 1px, transparent 2px) 35%
      75% / 18% 18%,
    radial-gradient(circle, rgba(235, 155, 255, 1) 2px, transparent 3px) 55%
      90% / 24% 24%,
    radial-gradient(circle, rgba(235, 155, 255, 0.7) 1px, transparent 2px) 90%
      70% / 18% 18%,
    radial-gradient(circle, rgba(235, 155, 255, 0.9) 2px, transparent 3px) 60%
      10% / 22% 22%,
    radial-gradient(circle, rgba(235, 155, 255, 0.8) 1px, transparent 2px) 75%
      85% / 18% 18%,
    radial-gradient(circle, rgba(235, 155, 255, 1) 2px, transparent 3px) 48%
      48% / 26% 26%;
  animation:
    galaxyZoom 18s linear infinite,
    starPulse 3s ease-in-out infinite alternate;
  opacity: 0.95;
}

.front-card.skin-galaxy::after,
.deal.skin-galaxy::after,
.deck-cards.skin-galaxy::after {
  content: "✦";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 3rem;
  color: rgba(180, 140, 255, 0.5);
  text-shadow:
    0 0 8px #c4b5fd,
    0 0 18px #8b5cf6,
    0 0 40px #6d28d9,
    0 0 70px #4c1d95;
  animation: galaxyCore 4s ease-in-out infinite;
}

@keyframes galaxyZoom {
  0% {
    transform: scale(1);
  }

  50% {
    transform: scale(2);
  }

  75% {
    transform: scale(0.5);
  }

  100% {
    transform: scale(1);
  }
}

@keyframes starPulse {
  0% {
    opacity: 0.45;
    filter: brightness(0.8);
  }

  100% {
    opacity: 1;
    filter: brightness(1.5);
  }
}

@keyframes galaxyCore {
  0% {
    transform: translate(-50%, -50%) scale(1);
  }

  50% {
    transform: translate(-50%, -50%) scale(1.18);
  }

  100% {
    transform: translate(-50%, -50%) scale(1);
  }
}

.shop-card {
  width: 100%;
  max-width: 190px;
  border: 2px dotted #fff;
  border-radius: 1rem;
  padding: 0.25rem;
}

.buy-btn {
  width: 100%;
  max-width: 200px;
  padding: 0.9rem 1rem;
  margin-top: 1rem;
  border: none;
  border-radius: 1rem;
  background: linear-gradient(135deg, #ffb703, #ff8800);
  color: #111;
  font-weight: 800;
  font-size: 1rem;
  cursor: pointer;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    filter 0.2s ease;
  box-shadow:
    0 10px 20px rgba(0, 0, 0, 0.35),
    inset 0 1px 1px rgba(255, 255, 255, 0.3);
}

.buy-btn:hover {
  transform: translateY(-3px) scale(1.03);
  filter: brightness(1.05);
  box-shadow:
    0 14px 28px rgba(0, 0, 0, 0.45),
    0 0 15px rgba(255, 183, 3, 0.35);
}

.buy-btn:active {
  transform: scale(0.97);
}

.buy-btn:disabled {
  cursor: not-allowed;
}

.owned-btn {
  background: linear-gradient(135deg, #2ecc71, #27ae60);
  color: white;
}

.shop-message {
  min-height: 24px;
  font-weight: bold;
  opacity: 0;
  transform: translateY(5px);
  transition:
    opacity 0.25s ease,
    transform 0.25s ease;
}

.shop-message.show {
  opacity: 1;
  transform: translateY(0);
}

.shop-message.success {
  color: #4caf50;
}

.shop-message.error {
  color: #ff6b6b;
}

.equipped-btn {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: white;
  border: none;
}

.equipped-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 18px rgba(239, 68, 68, 0.4);
}

.admin thead th {
  color: #000;
  background: transparent;
}

.admin td,
.admin th,
.admin {
  border: 2px solid #000;
}

/* Just Works */

.higher::before {
  content: "👆";
}

.higher::after {
  content: "👆";
}

.lower::after {
  content: "👇";
}

.lower::before {
  content: "👇";
}
