/* ---------- Basics ---------- */
:root {
  --bg: #0e0c16;
  --surface: #171425;
  --surface-2: #1f1b33;
  --border: #2f2a4a;
  --text: #f0eefb;
  --muted: #aaa5c7;
  --faint: #766f99;
  --accent: #9a7bff;
  --accent-hot: #b39dff;
  --danger: #ff5a7a;
  --on-accent: #0e0c16;
  --header-bg: rgba(14, 12, 22, 0.85);
  --glow: rgba(154, 123, 255, 0.22);
  --focus-ring: rgba(154, 123, 255, 0.25);
  --logo-gradient: linear-gradient(135deg, #b39dff, #7c5cff);
  --radius: 14px;
  color-scheme: dark;
}
/* ---------- Hidden for now: the AI declaration ----------
   Delete these three rules to bring the AI fields,
   the game page section and the browse filter back. */

.publish-box fieldset:has(#ai_art) {
  display: none;
}

.made {
  display: none;
}

.check-filter {
  display: none;
}

/* ---------- Header ---------- */

header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  padding: 14px 32px;
  background: var(--header-bg);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.logo {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.5px;
  text-decoration: none;
  background: var(--logo-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

nav {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

nav a {
  color: var(--text);
  text-decoration: none;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 15px;
}

nav a:hover {
  background: var(--surface-2);
  color: var(--accent);
}

nav a[href="publish.html"] {
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 700;
}

nav a[href="publish.html"]:hover {
  background: var(--accent-hot);
  color: var(--on-accent);
}

/* ---------- Landing page ---------- */

.hero {
  text-align: center;
  padding: 90px 20px 70px;
  background: radial-gradient(ellipse at 50% 0%, var(--glow), transparent 65%);
}

.hero h1 {
  font-size: clamp(32px, 6vw, 56px);
  max-width: 820px;
  margin: 0 auto 16px;
}

.accent {
  color: var(--accent);
}

.hero p {
  color: var(--muted);
  font-size: 19px;
  max-width: 640px;
  margin: 0 auto 28px;
}

.hero-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.button {
  display: inline-block;
  padding: 13px 26px;
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 700;
  text-decoration: none;
  border: 2px solid var(--accent);
  border-radius: 999px;
}

.button:hover {
  background: var(--accent-hot);
  border-color: var(--accent-hot);
  color: var(--on-accent);
}

.button.secondary {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}

.button.secondary:hover {
  background: transparent;
  border-color: var(--accent);
  color: var(--accent);
}

.audience {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  max-width: 1000px;
  margin: 0 auto 50px;
  padding: 0 20px;
}

.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}

.panel h2 {
  margin: 0 0 8px;
  color: var(--accent);
  font-size: 20px;
}

.panel p {
  margin: 0;
  color: var(--muted);
}

/* ---------- Form controls ---------- */

input[type="text"],
input[type="email"],
input[type="password"],
input[type="url"],
input[type="number"],
select,
textarea {
  padding: 12px 14px;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 16px;
  font-family: inherit;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--focus-ring);
}

::placeholder {
  color: var(--faint);
}

/* ---------- Browse ---------- */

input.search {
  width: 100%;
  padding: 15px 18px;
  margin-bottom: 14px;
  font-size: 17px;
  border-radius: 12px;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-bottom: 12px;
}

.filters select {
  padding: 10px 12px;
  font-size: 15px;
}

.check-filter {
  color: var(--muted);
  font-size: 15px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 22px;
}

.grid > a {
  display: block;
  color: inherit;
  text-decoration: none;
}

.card {
  height: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.grid > a:hover .card {
  transform: translateY(-4px);
  border-color: var(--accent);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45);
}

.cover-img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  background: var(--surface-2);
}

.card h3 {
  margin: 14px 16px 4px;
  font-size: 18px;
}

.card p {
  margin: 0 16px;
  color: var(--muted);
  font-size: 14px;
}

.card .facts {
  margin-top: 4px;
}

.card .price {
  color: var(--accent);
  font-weight: 700;
  margin: 8px 16px 16px;
}

.card p:last-child {
  margin-bottom: 16px;
}

.row-button {
  display: inline-block;
  padding: 8px 16px;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 14px;
  font-family: inherit;
  text-decoration: none;
  cursor: pointer;
}

.row-button:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.row-button.danger:hover {
  border-color: var(--danger);
  color: var(--danger);
}

.row-button:disabled {
  opacity: 0.5;
  cursor: wait;
}

#clear-filters {
  margin-bottom: 14px;
}

.tag-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
}

.filter-chip,
.tag-chip {
  padding: 6px 14px;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--accent);
  border-radius: 999px;
  font-size: 14px;
  font-family: inherit;
  cursor: pointer;
}

.filter-chip:hover,
.tag-chip:hover {
  background: var(--surface-2);
}

footer {
  text-align: center;
  padding: 32px 20px;
  color: var(--faint);
  border-top: 1px solid var(--border);
}

footer p {
  margin: 0 0 4px;
}

/* ---------- Log in, sign up, profile ---------- */

.auth-box {
  max-width: 400px;
  margin: 70px auto;
  text-align: center;
}

.auth-box h1 {
  margin-top: 0;
}

.auth-box input {
  display: block;
  width: 100%;
  margin-bottom: 14px;
}

.auth-box button,
.profile-box button,
.publish-box button[type="submit"] {
  padding: 13px 22px;
  background: var(--accent);
  color: var(--on-accent);
  border: none;
  border-radius: 999px;
  font-size: 16px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
}

.auth-box button,
.publish-box button[type="submit"] {
  width: 100%;
}

.auth-box button:hover,
.profile-box button:hover,
.publish-box button[type="submit"]:hover {
  background: var(--accent-hot);
}

.publish-box button:disabled {
  opacity: 0.6;
  cursor: wait;
}

.profile-box {
  max-width: 520px;
  margin: 60px auto;
}

.profile-box h1 {
  margin-bottom: 4px;
}

.role {
  color: var(--muted);
  text-transform: capitalize;
  margin-top: 0;
}

.bio {
  margin: 16px 0 28px;
}

.profile-box label {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
}

.profile-box input,
.profile-box textarea {
  width: 100%;
  margin-bottom: 14px;
}

/* ---------- Publish and edit ---------- */

.publish-box {
  max-width: 680px;
  margin: 50px auto;
}

.publish-box h1 {
  text-align: center;
  margin-top: 0;
}

.publish-box fieldset {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  margin: 0 0 22px;
}

.publish-box legend {
  color: var(--accent);
  font-weight: 700;
  font-size: 18px;
  padding: 0 10px;
}

.publish-box label {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
}

.publish-box input[type="text"],
.publish-box input[type="url"],
.publish-box input[type="number"],
.publish-box select,
.publish-box textarea {
  width: 100%;
  margin-bottom: 14px;
}

.publish-box input[type="file"] {
  display: block;
  margin-bottom: 14px;
  color: var(--muted);
}

.current-images {
  margin-bottom: 14px;
}

.current-images img {
  height: 80px;
  margin: 0 8px 6px 0;
  border-radius: 8px;
}

.carousel {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 8px 0 12px;
}

.carousel-window {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  border-radius: 12px;
}

.carousel-track {
  display: flex;
  transition: transform 0.3s ease;
}

.platform-card {
  flex: 0 0 100%;
  padding: 18px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 12px;
}

.platform-card h3 {
  color: var(--accent);
  margin: 0 0 14px;
  font-size: 20px;
}

button.arrow {
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  padding: 0;
  background: var(--accent);
  color: var(--on-accent);
  border: none;
  border-radius: 50%;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
}

button.arrow:hover {
  background: var(--accent-hot);
}

.price-row {
  display: flex;
  gap: 10px;
}

.price-row select {
  flex: 2;
}

.price-row input {
  flex: 1;
}

.link-warning {
  color: var(--accent-hot);
  font-size: 14px;
  margin: -6px 0 12px;
}

.carousel-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
}

button.pill {
  padding: 6px 14px;
  background: var(--surface);
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 14px;
  font-family: inherit;
  cursor: pointer;
}

button.pill.filled {
  color: var(--text);
  border-color: var(--faint);
}

button.pill.active {
  color: var(--accent);
  border-color: var(--accent);
}

/* ---------- Game page ---------- */

.game-page {
  max-width: 960px;
  margin: 40px auto;
}

.game-hero {
  display: flex;
  gap: 28px;
  flex-wrap: wrap;
  margin-bottom: 30px;
}

.game-cover {
  width: 380px;
  max-width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.game-info {
  flex: 1;
  min-width: 260px;
}

.game-info h1 {
  margin: 0 0 6px;
  font-size: clamp(28px, 4vw, 40px);
}

.tagline {
  color: var(--muted);
  font-size: 18px;
  margin: 0 0 8px;
}

.byline {
  color: var(--muted);
  margin: 0 0 4px;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.chips span {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 4px 13px;
  font-size: 14px;
  color: var(--muted);
}

.game-page h2 {
  font-size: 20px;
  margin: 34px 0 14px;
}

.buy-button {
  display: block;
  max-width: 440px;
  margin-bottom: 10px;
  padding: 15px 20px;
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 700;
  text-decoration: none;
  text-align: center;
  border-radius: 12px;
}

.buy-button:hover {
  background: var(--accent-hot);
  color: var(--on-accent);
}

.badge {
  margin-left: 6px;
  padding: 2px 9px;
  border-radius: 999px;
  background: var(--on-accent);
  color: var(--accent);
  font-size: 12px;
}

.shots-row {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 8px;
  scroll-snap-type: x proximity;
}

.shots-row a {
  flex: 0 0 auto;
  scroll-snap-align: start;
}

.shots-row img {
  display: block;
  height: 200px;
  border: 1px solid var(--border);
  border-radius: 10px;
}

.about p {
  max-width: 720px;
  margin: 0 0 14px;
  line-height: 1.7;
}

.similar {
  margin-top: 10px;
}

/* ---------- My games ---------- */

.my-games {
  max-width: 780px;
  margin: 40px auto;
}

.my-row {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  padding: 14px;
  margin-bottom: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.my-thumb {
  width: 110px;
  height: 66px;
  object-fit: cover;
  background: var(--surface-2);
  border-radius: 8px;
}

.my-info {
  flex: 1;
  min-width: 180px;
}

.my-info h3 {
  display: inline-block;
  margin: 0 10px 4px 0;
}

.my-info .hint {
  margin: 2px 0;
}

.status {
  font-size: 13px;
  padding: 2px 10px;
  color: var(--muted);
  border: 1px solid var(--faint);
  border-radius: 999px;
}

.status.live {
  color: var(--accent);
  border-color: var(--accent);
}

.my-actions {
  display: flex;
  gap: 8px;
}

.stats {
  margin-top: 8px;
}

.stats p {
  margin: 3px 0;
  font-size: 14px;
  color: var(--muted);
}

/* ---------- Small screens ---------- */

@media (max-width: 640px) {
  header {
    padding: 12px 16px;
  }

  .hero {
    padding: 60px 16px 50px;
  }

  .hero p {
    font-size: 17px;
  }

  .game-cover {
    width: 100%;
  }
}
html[data-theme="ocean"] {
  --bg: #0a1220;
  --surface: #101c30;
  --surface-2: #182740;
  --border: #243652;
  --text: #eaf2fc;
  --muted: #9db0cb;
  --faint: #6a7f9f;
  --accent: #4da3ff;
  --accent-hot: #7fbcff;
  --danger: #ff6b78;
  --on-accent: #07111f;
  --header-bg: rgba(10, 18, 32, 0.85);
  --glow: rgba(77, 163, 255, 0.2);
  --focus-ring: rgba(77, 163, 255, 0.25);
  --logo-gradient: linear-gradient(135deg, #7fbcff, #3a86f0);
  color-scheme: dark;
}

html[data-theme="teal"] {
  --bg: #0a1214;
  --surface: #111d20;
  --surface-2: #182a2e;
  --border: #23383d;
  --text: #ecf6f5;
  --muted: #9bb4b4;
  --faint: #647e80;
  --accent: #2ee6c5;
  --accent-hot: #6af2d9;
  --danger: #ff6b6b;
  --on-accent: #071513;
  --header-bg: rgba(10, 18, 20, 0.85);
  --glow: rgba(46, 230, 197, 0.18);
  --focus-ring: rgba(46, 230, 197, 0.22);
  --logo-gradient: linear-gradient(135deg, #6af2d9, #1fc5a8);
  color-scheme: dark;
}

html[data-theme="forest"] {
  --bg: #0b130e;
  --surface: #121e16;
  --surface-2: #1a2b20;
  --border: #28402f;
  --text: #ecf6ee;
  --muted: #9db8a4;
  --faint: #67826e;
  --accent: #5ee08a;
  --accent-hot: #8aeaa8;
  --danger: #ff6b6b;
  --on-accent: #07150c;
  --header-bg: rgba(11, 19, 14, 0.85);
  --glow: rgba(94, 224, 138, 0.18);
  --focus-ring: rgba(94, 224, 138, 0.22);
  --logo-gradient: linear-gradient(135deg, #8aeaa8, #3cc66b);
  color-scheme: dark;
}

html[data-theme="rose"] {
  --bg: #150d12;
  --surface: #1f141b;
  --surface-2: #2a1b24;
  --border: #3d2733;
  --text: #fbeef4;
  --muted: #c9a9b8;
  --faint: #8f6d7e;
  --accent: #ff6fa5;
  --accent-hot: #ff93bd;
  --danger: #ff5a5f;
  --on-accent: #1a0a12;
  --header-bg: rgba(21, 13, 18, 0.85);
  --glow: rgba(255, 111, 165, 0.2);
  --focus-ring: rgba(255, 111, 165, 0.25);
  --logo-gradient: linear-gradient(135deg, #ff93bd, #f0508c);
  color-scheme: dark;
}

html[data-theme="paper"] {
  --bg: #f5f6fa;
  --surface: #ffffff;
  --surface-2: #eceef5;
  --border: #d9dce8;
  --text: #1a1d2b;
  --muted: #555b73;
  --faint: #8a90a6;
  --accent: #5b4bdb;
  --accent-hot: #4637c4;
  --danger: #d93a4a;
  --on-accent: #ffffff;
  --header-bg: rgba(245, 246, 250, 0.85);
  --glow: rgba(91, 75, 219, 0.12);
  --focus-ring: rgba(91, 75, 219, 0.25);
  --logo-gradient: linear-gradient(135deg, #7a6cf0, #4a3bd0);
  color-scheme: light;
}

html[data-theme="paper"] .grid > a:hover .card {
  box-shadow: 0 10px 24px rgba(30, 40, 80, 0.15);
}

.theme-switcher {
  position: relative;
  margin-left: 6px;
}

.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  padding: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 50%;
  cursor: pointer;
}

.theme-toggle:hover {
  border-color: var(--accent);
}

.theme-dot {
  width: 18px;
  height: 18px;
  border: 1px solid var(--border);
  border-radius: 50%;
}

.theme-menu {
  position: absolute;
  right: 0;
  top: 46px;
  z-index: 20;
  min-width: 190px;
  padding: 6px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
}

.theme-option {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px 10px;
  background: transparent;
  color: var(--text);
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
}

.theme-option:hover {
  background: var(--surface-2);
}

.theme-option.active {
  color: var(--accent);
}

.theme-option .theme-dot {
  flex: 0 0 auto;
}
.legal {
  max-width: 760px;
  margin: 40px auto;
}

.legal h1 {
  margin-top: 0;
}

.legal h2 {
  font-size: 20px;
  margin: 30px 0 10px;
}

.legal p,
.legal li {
  line-height: 1.7;
}

.legal ul {
  padding-left: 22px;
}

.footer-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 18px;
  margin-top: 10px;
}

.footer-links a {
  color: var(--muted);
}

.footer-links a:hover {
  color: var(--accent);
}

.report-link {
  margin-top: 30px;
  font-size: 14px;
}

.report-link a {
  color: var(--faint);
}