/*
Theme Name: HitTheButton Premium
Theme URI: https://hitthebutton.io/
Author: HitTheButton.io
Description: Premium dark/light WordPress theme for HitTheButton.io browser games, reaction tests, click speed games, and SEO content.
Version: 1.2.0
Requires at least: 6.0
Tested up to: 6.6
Requires PHP: 7.4
License: GPLv2 or later
Text Domain: hitthebutton-premium
*/

:root {
  --htb-bg: #070914;
  --htb-bg-soft: #0d1224;
  --htb-panel: rgba(255,255,255,.075);
  --htb-panel-strong: rgba(255,255,255,.12);
  --htb-line: rgba(255,255,255,.14);
  --htb-text: #f7fbff;
  --htb-muted: #a7b4c5;
  --htb-cyan: #52f0ff;
  --htb-blue: #6d7cff;
  --htb-pink: #ff4fd8;
  --htb-green: #55f6a5;
  --htb-gold: #ffd166;
  --htb-shadow: rgba(0,0,0,.36);
}

[data-theme="light"] {
  --htb-bg: #f7fbff;
  --htb-bg-soft: #eef5ff;
  --htb-panel: rgba(255,255,255,.78);
  --htb-panel-strong: rgba(255,255,255,.94);
  --htb-line: rgba(21,37,58,.14);
  --htb-text: #102033;
  --htb-muted: #586a7d;
  --htb-cyan: #00a7d8;
  --htb-blue: #5268ff;
  --htb-pink: #d93fd1;
  --htb-green: #108a5c;
  --htb-gold: #b77900;
  --htb-shadow: rgba(31,48,70,.16);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--htb-bg);
  color: var(--htb-text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; }

.htb-page {
  min-height: 100vh;
  position: relative;
  isolation: isolate;
  background:
    radial-gradient(circle at 12% 8%, color-mix(in srgb, var(--htb-cyan) 18%, transparent), transparent 30%),
    radial-gradient(circle at 88% 10%, color-mix(in srgb, var(--htb-pink) 16%, transparent), transparent 32%),
    radial-gradient(circle at 52% 94%, color-mix(in srgb, var(--htb-blue) 18%, transparent), transparent 34%),
    linear-gradient(180deg, var(--htb-bg) 0%, var(--htb-bg-soft) 54%, var(--htb-bg) 100%);
}

.htb-page::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  opacity: .25;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(to bottom, #000, transparent 88%);
}

.htb-particles {
  position: fixed;
  inset: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: .74;
}

.htb-progress {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 100;
  width: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--htb-cyan), var(--htb-pink), var(--htb-gold));
  box-shadow: 0 0 20px color-mix(in srgb, var(--htb-cyan) 70%, transparent);
}

.htb-site-header {
  position: sticky;
  top: 0;
  z-index: 90;
  backdrop-filter: blur(18px);
  background: color-mix(in srgb, var(--htb-bg) 76%, transparent);
  border-bottom: 1px solid var(--htb-line);
}
.admin-bar .htb-site-header { top: 32px; }

.htb-nav {
  width: min(1180px, calc(100% - 28px));
  min-height: 76px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.htb-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 950;
}
.htb-logo {
  width: 42px;
  height: 42px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  color: #06101a;
  background: linear-gradient(135deg, var(--htb-cyan), var(--htb-pink));
  box-shadow: 0 0 28px color-mix(in srgb, var(--htb-cyan) 32%, transparent);
}
.htb-menu {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--htb-muted);
  font-size: 14px;
  font-weight: 800;
}
.htb-menu a {
  padding: 10px 11px;
  border-radius: 10px;
}
.htb-menu a:hover {
  color: var(--htb-text);
  background: var(--htb-panel);
}
.htb-actions { display: flex; align-items: center; gap: 10px; }
.htb-btn,
.htb-theme-toggle,
.htb-menu-toggle {
  min-height: 44px;
  border-radius: 11px;
  border: 1px solid var(--htb-line);
  color: var(--htb-text);
  font: inherit;
  font-weight: 950;
  cursor: pointer;
}
.htb-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 18px;
  background: linear-gradient(135deg, var(--htb-cyan), var(--htb-blue) 48%, var(--htb-pink));
  color: #fff;
  box-shadow: 0 14px 38px color-mix(in srgb, var(--htb-blue) 26%, transparent);
}
.htb-btn:hover { transform: translateY(-2px); }
.htb-btn.ghost,
.htb-theme-toggle,
.htb-menu-toggle {
  background: var(--htb-panel);
}
.htb-menu-toggle { display: none; width: 46px; padding: 0; }
.htb-menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  border-radius: 999px;
  background: currentColor;
}
.htb-mobile-panel {
  display: none;
  width: min(1180px, calc(100% - 28px));
  margin: 0 auto 14px;
  padding: 12px;
  border: 1px solid var(--htb-line);
  border-radius: 16px;
  background: color-mix(in srgb, var(--htb-bg) 88%, transparent);
  backdrop-filter: blur(18px);
}
.htb-mobile-panel a {
  display: flex;
  justify-content: space-between;
  padding: 13px 12px;
  border-radius: 10px;
  font-weight: 900;
}
.htb-mobile-panel a:hover { background: var(--htb-panel); }

.htb-section {
  width: min(1180px, calc(100% - 28px));
  margin: 0 auto;
  padding: 84px 0;
}
.htb-hero {
  min-height: calc(100vh - 76px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(330px, .86fr);
  gap: 34px;
  align-items: center;
  padding-top: 56px;
}
.htb-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  padding: 8px 12px;
  border: 1px solid color-mix(in srgb, var(--htb-cyan) 28%, transparent);
  border-radius: 999px;
  background: color-mix(in srgb, var(--htb-cyan) 9%, transparent);
  color: var(--htb-text);
  font-size: 13px;
  font-weight: 900;
}
.htb-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--htb-green);
  box-shadow: 0 0 16px var(--htb-green);
}
.htb-hero h1 {
  margin: 0;
  max-width: 820px;
  font-size: clamp(42px, 7vw, 88px);
  line-height: .98;
  letter-spacing: 0;
}
.htb-gradient-text {
  background: linear-gradient(90deg, #fff, #ccfbff 26%, #b7bfff 58%, #ffd7f5);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
[data-theme="light"] .htb-gradient-text {
  background: linear-gradient(90deg, #102033, #0079a8, #5268ff, #c02cb5);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.htb-lead {
  max-width: 700px;
  margin: 22px 0 0;
  color: var(--htb-muted);
  font-size: clamp(17px, 2vw, 21px);
  line-height: 1.58;
}
.htb-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}
.htb-trust {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 30px;
}
.htb-mini,
.htb-card,
.htb-step,
.htb-game-card,
.htb-newsletter,
.htb-faq-item {
  border: 1px solid var(--htb-line);
  background: linear-gradient(160deg, var(--htb-panel-strong), var(--htb-panel));
  backdrop-filter: blur(18px);
  box-shadow: 0 18px 48px var(--htb-shadow);
}
.htb-mini {
  padding: 13px;
  border-radius: 14px;
}
.htb-mini strong { display: block; font-size: 24px; }
.htb-mini span { color: var(--htb-muted); font-size: 12px; font-weight: 800; }

.htb-visual {
  min-height: 540px;
  position: relative;
  perspective: 1100px;
}
.htb-orbit {
  position: absolute;
  inset: 34px 0;
  transform-style: preserve-3d;
  transform: rotateX(8deg) rotateY(-12deg);
  transition: transform .18s ease;
}
.htb-game-card {
  position: absolute;
  inset: 50px 22px 42px;
  border-radius: 28px;
  padding: 22px;
  overflow: hidden;
  transform: translateZ(80px);
}
.htb-game-card::before {
  content: "";
  position: absolute;
  inset: -60px;
  background: conic-gradient(from 120deg, transparent, color-mix(in srgb, var(--htb-cyan) 28%, transparent), transparent, color-mix(in srgb, var(--htb-pink) 25%, transparent), transparent);
  animation: htb-spin 9s linear infinite;
}
.htb-game-inner {
  position: relative;
  z-index: 1;
  height: 100%;
  display: grid;
  align-content: center;
  gap: 18px;
  text-align: center;
  border-radius: 22px;
  background: color-mix(in srgb, var(--htb-bg) 76%, transparent);
  padding: 18px;
}
.htb-hit {
  width: min(72vw, 235px);
  aspect-ratio: 1;
  margin: 0 auto;
  border: 0;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 38%, rgba(255,255,255,.42), transparent 22%), linear-gradient(145deg, #ff6377, #8238ff 52%, #17dcff);
  color: #fff;
  font-size: clamp(34px, 6vw, 54px);
  font-weight: 950;
  box-shadow: inset 0 -18px 30px rgba(0,0,0,.22), 0 24px 50px color-mix(in srgb, var(--htb-blue) 36%, transparent);
}
.htb-float {
  position: absolute;
  padding: 12px 14px;
  border: 1px solid var(--htb-line);
  border-radius: 16px;
  background: var(--htb-panel);
  backdrop-filter: blur(18px);
  box-shadow: 0 18px 42px var(--htb-shadow);
  font-weight: 950;
  animation: htb-float 5.5s ease-in-out infinite;
}
.htb-float.one { top: 36px; left: 0; color: var(--htb-cyan); }
.htb-float.two { top: 160px; right: 0; color: var(--htb-gold); animation-delay: -1.3s; }
.htb-float.three { left: 34px; bottom: 34px; color: var(--htb-green); animation-delay: -2.4s; }

.htb-section-head {
  display: grid;
  grid-template-columns: minmax(0, .78fr) minmax(260px, .42fr);
  gap: 22px;
  align-items: end;
  margin-bottom: 28px;
}
.htb-section h2 {
  margin: 0;
  font-size: clamp(32px, 5vw, 58px);
  line-height: 1.03;
}
.htb-section-head p,
.htb-card p,
.htb-step p,
.htb-faq-a {
  margin: 0;
  color: var(--htb-muted);
  line-height: 1.58;
}
.htb-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.htb-card,
.htb-step { border-radius: 18px; padding: 18px; transition: transform .2s ease, border-color .2s ease; }
.htb-card:hover { transform: translateY(-5px); border-color: color-mix(in srgb, var(--htb-cyan) 34%, transparent); }
.htb-icon {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  margin-bottom: 16px;
  border-radius: 14px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--htb-cyan) 24%, transparent), color-mix(in srgb, var(--htb-pink) 20%, transparent));
  font-weight: 950;
}
.htb-card h3 { margin: 0 0 8px; font-size: 22px; line-height: 1.18; }
.htb-badge-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.htb-badge {
  padding: 7px 10px;
  border-radius: 999px;
  background: var(--htb-panel);
  border: 1px solid var(--htb-line);
  color: var(--htb-text);
  font-size: 12px;
  font-weight: 850;
}
.htb-empty {
  grid-column: 1 / -1;
  padding: 22px;
  border: 1px dashed var(--htb-line);
  border-radius: 18px;
  background: var(--htb-panel);
  color: var(--htb-muted);
  font-weight: 850;
  text-align: center;
}
.htb-card-image {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  border-radius: 14px;
  margin-bottom: 16px;
  border: 1px solid var(--htb-line);
}

.htb-game-preview {
  display: grid;
  grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr);
  gap: 16px;
}
.htb-live-game {
  min-height: 430px;
  display: grid;
  align-content: center;
  gap: 16px;
  padding: 22px;
  border: 1px solid color-mix(in srgb, var(--htb-cyan) 22%, transparent);
  border-radius: 24px;
  background: radial-gradient(circle at 50% 0%, color-mix(in srgb, var(--htb-cyan) 18%, transparent), transparent 40%), var(--htb-panel);
  backdrop-filter: blur(20px);
  text-align: center;
}
.htb-live-score { display: grid; grid-template-columns: repeat(3,1fr); gap: 8px; }
.htb-live-score div { padding: 10px; border-radius: 12px; background: var(--htb-panel); border: 1px solid var(--htb-line); color: var(--htb-muted); font-size: 12px; font-weight: 800; }
.htb-live-score strong { display: block; color: var(--htb-text); font-size: 22px; }
.htb-steps { display: grid; gap: 12px; }
.htb-step { display: grid; grid-template-columns: 44px minmax(0,1fr); gap: 14px; }
.htb-step-num { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 14px; background: color-mix(in srgb, var(--htb-cyan) 14%, transparent); color: var(--htb-cyan); font-weight: 950; }

.htb-leaderboard { width: 100%; border-collapse: collapse; overflow: hidden; border-radius: 16px; background: var(--htb-panel); }
.htb-leaderboard th,.htb-leaderboard td { padding: 13px; border-bottom: 1px solid var(--htb-line); text-align: left; }
.htb-leaderboard th { color: var(--htb-muted); font-size: 12px; text-transform: uppercase; }
.htb-account-button { min-height: 44px; display: inline-flex; align-items: center; gap: 8px; padding: 0 14px; border: 1px solid var(--htb-line); border-radius: 10px; background: var(--htb-panel); color: var(--htb-text); font: inherit; font-weight: 800; text-decoration: none; cursor: pointer; white-space: nowrap; }
.htb-account-dot { width: 9px; height: 9px; border-radius: 50%; background: #35e6a1; box-shadow: 0 0 12px rgba(53,230,161,.7); }
.htb-google-g { width: 22px; height: 22px; display: inline-grid; place-items: center; border-radius: 50%; background: #fff; color: #4285f4; font-weight: 900; }
.htb-multiplayer { margin-top: 22px; border: 1px solid var(--htb-line); background: var(--htb-panel); padding: 24px; display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 22px; align-items: center; border-radius: 16px; }
.htb-multi-copy h3 { margin: 10px 0 7px; font-size: 24px; }
.htb-multi-copy p { margin: 0; color: var(--htb-muted); max-width: 720px; }
.htb-match { grid-column: 1 / -1; border-top: 1px solid var(--htb-line); padding-top: 22px; text-align: center; }
.htb-racers { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 18px 0; }
.htb-racers div { background: var(--htb-panel-strong); border: 1px solid var(--htb-line); padding: 14px; border-radius: 10px; display: flex; justify-content: space-between; gap: 12px; }
.htb-multi-hit { width: 150px; height: 150px; font-size: 34px; }
.htb-multi-hit:disabled { filter: grayscale(1); opacity: .45; cursor: not-allowed; }
.htb-multi-hit.is-hit { transform: scale(.94); }

.htb-faq { display: grid; gap: 10px; }
.htb-faq-item { border-radius: 18px; overflow: hidden; }
.htb-faq-q { width: 100%; display: flex; justify-content: space-between; padding: 17px; border: 0; background: transparent; color: var(--htb-text); font: inherit; font-weight: 950; text-align: left; cursor: pointer; }
.htb-faq-a { display: none; padding: 0 17px 17px; }
.htb-faq-item.open .htb-faq-a { display: block; }

.htb-newsletter { border-radius: 24px; padding: 28px; display: grid; grid-template-columns: minmax(0,.95fr) minmax(280px,.55fr); gap: 20px; align-items: center; }
.htb-form { display: flex; gap: 8px; }
.htb-form input { flex: 1; min-width: 0; min-height: 46px; padding: 0 14px; border: 1px solid var(--htb-line); border-radius: 10px; background: var(--htb-panel); color: var(--htb-text); font: inherit; }

.htb-site-footer { border-top: 1px solid var(--htb-line); background: color-mix(in srgb, var(--htb-bg) 76%, transparent); }
.htb-footer-inner { width: min(1180px, calc(100% - 28px)); margin: 0 auto; padding: 34px 0; display: grid; grid-template-columns: minmax(0,1.1fr) repeat(3,minmax(140px,.35fr)); gap: 20px; color: var(--htb-muted); line-height: 1.6; }
.htb-footer-inner h3 { color: var(--htb-text); font-size: 15px; }
.htb-footer-inner a { display: block; margin: 7px 0; color: var(--htb-muted); }

.htb-floating-cta,.htb-top-button { position: fixed; z-index: 80; right: 18px; }
.htb-floating-cta { bottom: 18px; }
.htb-top-button { bottom: 76px; width: 44px; min-height: 44px; padding: 0; opacity: 0; pointer-events: none; }
.htb-top-button.show { opacity: 1; pointer-events: auto; }

.reveal { opacity: 1; transform: translateY(0); filter: blur(0); }
.htb-js .reveal { opacity: 0; transform: translateY(22px); filter: blur(10px); transition: opacity .65s ease, transform .65s ease, filter .65s ease; }
.htb-js .reveal.in { opacity: 1; transform: translateY(0); filter: blur(0); }

@keyframes htb-spin { to { transform: rotate(360deg); } }
@keyframes htb-float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-14px); } }

@media (max-width: 900px) {
  .admin-bar .htb-site-header { top: 46px; }
  .htb-menu { display: none; }
  .htb-menu-toggle { display: block; }
  .menu-open .htb-mobile-panel { display: block; }
  .htb-hero,.htb-section-head,.htb-game-preview,.htb-newsletter,.htb-footer-inner { grid-template-columns: 1fr; }
  .htb-hero { min-height: auto; }
  .htb-visual { min-height: 480px; }
  .htb-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 620px) {
  .htb-account-button { padding: 0 10px; font-size: 13px; }
  .htb-multiplayer { grid-template-columns: 1fr; }
  .htb-racers { grid-template-columns: 1fr; }
  .htb-section { padding: 58px 0; }
  .htb-grid,.htb-trust,.htb-live-score { grid-template-columns: 1fr; }
  .htb-visual { min-height: 420px; }
  .htb-game-card { inset: 34px 0; }
  .htb-actions .htb-btn { display: none; }
  .htb-form { flex-direction: column; }
  .htb-floating-cta { left: 14px; right: 14px; }
  .htb-floating-cta .htb-btn { width: 100%; }
}

.htb-single-wrap {
  width: min(1180px, calc(100% - 28px));
  margin: 0 auto;
  padding: 72px 0 96px;
}
.htb-single-head { max-width: 880px; margin: 0 auto 30px; text-align: center; }
.htb-single-head h1 { margin: 8px 0 14px; font-size: clamp(38px, 6vw, 68px); line-height: 1.02; }
.htb-single-summary { margin: 0 auto; max-width: 760px; color: var(--htb-muted); font-size: 18px; line-height: 1.7; }
.htb-single-meta { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.htb-single-meta span { padding: 8px 11px; border: 1px solid var(--htb-border); border-radius: 999px; background: var(--htb-panel); color: var(--htb-muted); font-size: 13px; font-weight: 800; }
.htb-game-stage { width: 100%; overflow: hidden; }
.htb-game-stage > * { max-width: 100%; }
.htb-player-note { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin: 28px auto 0; padding: 22px; border: 1px solid var(--htb-border); border-radius: 16px; background: var(--htb-panel); }
.htb-player-note strong { font-size: 20px; }
.htb-player-note p { margin: 6px 0 0; max-width: 760px; color: var(--htb-muted); line-height: 1.6; }
.htb-related-games { padding-top: 78px; }
.htb-related-games .htb-section-head { margin-bottom: 24px; }
.htb-related-games .htb-section-head h2 { margin: 4px 0 0; font-size: clamp(30px, 4vw, 46px); }
@media (max-width: 720px) {
  .htb-single-wrap { padding-top: 48px; }
  .htb-single-head h1 { font-size: 40px; }
  .htb-player-note { align-items: flex-start; flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) {
  *,*::before,*::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
