:root {
  --bg: #050505;
  --card: rgba(15, 15, 15, 0.94);
  --gold: #d4af37;
  --gold2: #ffd86b;
  --text: #f6e7b7;
  --line: rgba(212, 175, 55, 0.28);
  --red: #ff4d4d;
  --green: #31d16b;
  --hacker: #00ff66;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--bg);
}

body {
  position: relative;
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  color: var(--text);
  font-family: Arial, Helvetica, sans-serif;
  background:
    linear-gradient(rgba(0, 0, 0, 0.82), rgba(0, 0, 0, 0.82)),
    url("https://i.gyazo.com/78c4d3a1ca7a1bc95c2815e005dd4b23.jpg")
    center / cover no-repeat fixed;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.top-header {
  position: relative;
  z-index: 6;
  width: min(820px, calc(100% - 28px));
  margin: 0 auto;
  padding: 20px 0 8px;
}

.logo-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 58px;
  padding: 10px 16px;
  background: rgba(5, 5, 5, 0.86);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 0 22px rgba(212, 175, 55, 0.12);
}

.logo {
  display: block;
  width: min(220px, 65%);
  height: auto;
  object-fit: contain;
}

.digital-clock {
  color: var(--hacker);
  font-size: 20px;
  font-weight: bold;
  white-space: nowrap;
  text-shadow: 0 0 8px rgba(0, 255, 102, 0.45);
}

.app {
  position: relative;
  z-index: 5;
  display: grid;
  grid-template-columns: minmax(0, 820px);
  gap: 22px;
  width: min(820px, calc(100% - 28px));
  margin: 0 auto;
  padding: 12px 0 46px;
}

.card {
  position: relative;
  width: 100%;
  min-width: 0;
  padding: 22px;
  overflow: hidden;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: 0 0 30px rgba(212, 175, 55, 0.12);
  backdrop-filter: blur(10px);
}

.badge {
  display: inline-block;
  margin-bottom: 14px;
  color: var(--gold2);
  font-size: 14px;
  font-weight: bold;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.provider-select,
#gameSearch {
  width: 100%;
  min-height: 44px;
  padding: 11px 13px;
  color: var(--text);
  background: #101010;
  border: 1px solid var(--line);
  border-radius: 10px;
  outline: none;
}

.provider-select:focus,
#gameSearch:focus {
  border-color: var(--gold);
  box-shadow: 0 0 12px rgba(212, 175, 55, 0.2);
}

.provider-select option {
  color: #111;
  background: #fff;
}

.search-row {
  position: relative;
  margin-top: 18px;
}

.game-list {
  position: relative;
  z-index: 10;
  max-height: 280px;
  margin-top: 8px;
  overflow-y: auto;
  background: #101010;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.hidden {
  display: none !important;
}

.game-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  color: var(--text);
  border-bottom: 1px solid rgba(212, 175, 55, 0.12);
}

.game-item:last-child {
  border-bottom: 0;
}

.game-item:hover,
.game-item.active,
.game-item.hovered {
  color: #111;
  background: var(--gold2);
}

.game-item span {
  min-width: 0;
  overflow: hidden;
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.game-item small {
  color: var(--gold2);
  white-space: nowrap;
}

.game-item:hover small,
.game-item.active small,
.game-item.hovered small {
  color: #111;
}

.pattern-card {
  min-height: 430px;
  background: #050505;
}

.pattern-title,
.pattern-header h2 {
  position: relative;
  z-index: 2;
  margin: 0 0 18px;
  color: var(--gold2);
}

.random-wrapper,
.copy-wrapper {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: center;
  margin: 14px 0;
}

.random-btn,
.copy-btn {
  padding: 11px 20px;
  color: #111;
  font-weight: bold;
  background: linear-gradient(135deg, var(--gold), var(--gold2));
  border: 0;
  border-radius: 10px;
  box-shadow: 0 0 14px rgba(212, 175, 55, 0.25);
  transition: transform 0.15s ease, filter 0.15s ease;
}

.random-btn:hover,
.copy-btn:hover {
  filter: brightness(1.12);
  transform: translateY(-1px);
}

.btn-pressed {
  transform: scale(0.96) !important;
}

#patternOutput {
  position: relative;
  z-index: 2;
}

#patternOutput > p {
  margin: 9px 0;
}

.pattern-header {
  margin-top: 20px;
}

.pattern-box {
  position: relative;
  z-index: 2;
  width: calc(100% - 250px);
  min-height: 150px;
  padding: 12px;
  background: #050505;
  border: 1px solid rgba(212, 175, 55, 0.2);
  border-radius: 12px;
}

.pattern-list {
  display: grid;
  gap: 8px;
}

.pattern-row {
  padding: 9px 11px;
  color: var(--text);
  background: #101010;
  border-radius: 8px;
  font-size: 14px;
}

.turbo-on {
  color: var(--green);
  font-weight: bold;
}

.turbo-off {
  color: var(--red);
  font-weight: bold;
}

.provider-image,
.provider-label {
  pointer-events: none;
}

.provider-label {
  position: absolute;
  top: 115px;
  right: 10px;
  z-index: 2;
  color: var(--gold2);
  font-size: 14px;
  font-weight: bold;
  letter-spacing: 3px;
  writing-mode: vertical-rl;
  text-orientation: mixed;
  text-shadow: 0 0 8px rgba(255, 216, 107, 0.55);
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 50;
  padding: 12px 16px;
  color: #111;
  background: var(--gold2);
  border-radius: 8px;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.watermark-grid,
.side-glow,
.bottom-watermark {
  display: none !important;
}

.watermark {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 20;
  display: block;
  width: 100%;
  overflow: hidden;
  color: var(--gold2);
  background: rgba(0, 0, 0, 0.9);
  border-bottom: 1px solid rgba(212, 175, 55, 0.28);
  white-space: nowrap;
  pointer-events: none;
}

.watermark span {
  display: inline-block;
  padding: 9px 0;
  padding-left: 100%;
  font-size: 12px;
  font-weight: bold;
  letter-spacing: 0.8px;
  animation: marquee 24s linear infinite;
}

@keyframes marquee {
  from {
    transform: translateX(0);
  }

  to {
    transform: translateX(-100%);
  }
}

.particles {
  position: fixed;
  inset: 0;
  z-index: 2;
  overflow: hidden;
  pointer-events: none;
}

.particle {
  position: absolute;
  bottom: -12px;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #fff4bd;
  box-shadow: 0 0 6px 2px rgba(255, 216, 107, 0.75);
  animation: flyStar linear infinite;
}

.particle:nth-child(3n) {
  width: 2px;
  height: 2px;
  background: #fff;
}

.particle:nth-child(4n) {
  width: 4px;
  height: 4px;
  opacity: 0.55;
}

@keyframes flyStar {
  0% {
    transform: translate3d(0, 10vh, 0) scale(0.5);
    opacity: 0;
  }

  15% {
    opacity: 0.8;
  }

  85% {
    opacity: 0.45;
  }

  100% {
    transform: translate3d(-90px, -115vh, 0) scale(1);
    opacity: 0;
  }
}

@media (max-width: 768px) {
  .top-header {
    width: min(100% - 20px, 600px);
    padding-top: 18px;
  }

  .app {
    width: min(100% - 20px, 600px);
    padding-top: 10px;
  }

  .pattern-card {
    min-height: 500px;
  }

  .pattern-box {
    width: 100%;
  }

  .provider-label {
    top: auto;
    right: 8px;
    bottom: 42px;
    font-size: 12px;
  }
}

@media (max-width: 480px) {
  .logo-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .logo {
    width: 190px;
  }

  .digital-clock {
    font-size: 17px;
  }

  .card {
    padding: 16px;
    border-radius: 16px;
  }

  .game-item {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  .particle {
    animation-duration: 10s !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .watermark span {
    animation-play-state: paused;
  }

  .particle {
    animation-play-state: paused;
  }
}