:root,
body[data-theme="dark"] {
  --bg-main: #0F1115;
  --bg-card: #181C23;
  --bg-elevated: #202631;
  --brand-green: #00D26A;
  --deal-red: #FF4D4D;
  --text-main: #F5F7FA;
  --text-muted: #9CA3AF;
  --border-soft: rgba(255,255,255,0.08);
  --surface-hover: var(--bg-elevated);
  --shadow-soft: 0 18px 50px rgb(0 0 0 / 24%);
  --radius-card: 12px;
}

body[data-theme="light"] {
  --bg-main: #F5F7FA;
  --bg-card: #FFFFFF;
  --bg-elevated: #F1F5F9;
  --text-main: #111827;
  --text-muted: #6B7280;
  --border-soft: rgba(17,24,39,0.12);
  --surface-hover: var(--bg-elevated);
  --shadow-soft: 0 18px 50px rgb(17 24 39 / 10%);
}

html,
body {
  min-height: 100%;
}

body.deals4all-theme {
  background:
    radial-gradient(circle at top left, rgb(0 210 106 / 12%), transparent 28rem),
    var(--bg-main);
  color: var(--text-main);
}

body.deals4all-theme .bg-body,
body.deals4all-theme .bg-body-tertiary,
body.deals4all-theme .card,
body.deals4all-theme .dropdown-menu,
body.deals4all-theme .form-control,
body.deals4all-theme .form-select {
  color: var(--text-main);
}

body.deals4all-theme .border,
body.deals4all-theme .border-bottom,
body.deals4all-theme .border-top,
body.deals4all-theme .card,
body.deals4all-theme .form-control,
body.deals4all-theme .form-select,
body.deals4all-theme .dropdown-menu {
  border-color: var(--border-soft) !important;
}

body.deals4all-theme .text-secondary,
body.deals4all-theme .text-muted,
body.deals4all-theme .link-secondary {
  color: var(--text-muted) !important;
}

body.deals4all-theme .text-body,
body.deals4all-theme .text-dark {
  color: var(--text-main) !important;
}

body.deals4all-theme a {
  color: inherit;
}

body.deals4all-theme a:hover {
  color: var(--brand-green);
}

.page-hero {
  background:
    linear-gradient(135deg, rgb(0 210 106 / 14%), transparent 42%),
    linear-gradient(180deg, var(--bg-elevated), var(--bg-main));
  border-bottom: 1px solid var(--border-soft);
}

.page-hero .text-primary {
  color: var(--brand-green) !important;
}

.deal-section + .deal-section {
  border-top: 1px solid var(--border-soft);
  padding-top: 2rem;
}

.empty-state,
.deal-cover-large {
  border-radius: var(--radius-card);
}

.deal-cover-large {
  aspect-ratio: 3 / 4;
  object-fit: contain;
  width: 100%;
}

.deal-gallery-thumbs {
  display: grid;
  gap: 0.65rem;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.deal-gallery-thumb {
  aspect-ratio: 16 / 9;
  background: var(--bg-elevated);
  border: 1px solid var(--border-soft);
  border-radius: calc(var(--radius-card) - 4px);
  object-fit: cover;
  width: 100%;
}

.price-block {
  min-width: 140px;
}

.deal-show-deadline {
  color: var(--brand-green);
}

.about-game-card p {
  color: var(--text-muted);
  line-height: 1.75;
}

.site-navbar {
  backdrop-filter: blur(18px);
  background: color-mix(in srgb, var(--bg-main) 86%, transparent) !important;
  border-color: var(--border-soft) !important;
}

.site-logo {
  color: var(--text-main);
  letter-spacing: 0;
}

.site-logo-accent {
  color: var(--brand-green);
}

.site-navbar .nav-link {
  color: var(--text-muted);
  font-size: 0.92rem;
}

.site-navbar .nav-link:hover,
.site-navbar .nav-link:focus {
  color: var(--brand-green);
}

.site-navbar .btn-outline-secondary {
  border-color: var(--border-soft);
  color: var(--text-muted);
}

.site-navbar .btn-outline-secondary:hover {
  background: var(--surface-hover);
  color: var(--text-main);
}

.site-navbar .dropdown-item {
  color: var(--text-main);
}

.site-navbar .dropdown-item:hover {
  background: var(--surface-hover);
  color: var(--brand-green);
}

.deal-card,
.deal-card-cover {
  border-radius: var(--radius-card);
}

.deal-card {
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-top: 3px solid var(--platform-color, var(--border-soft));
  box-shadow: none !important;
  overflow: hidden;
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.deal-card:hover {
  border-color: color-mix(in srgb, var(--platform-color, var(--brand-green)) 45%, var(--border-soft));
  box-shadow: var(--shadow-soft) !important;
  transform: translateY(-3px);
}

.deal-card-cover {
  aspect-ratio: 16 / 9;
  background: var(--bg-elevated);
  display: block;
  overflow: hidden;
}

.deal-card-cover img {
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.deal-card-title {
  display: -webkit-box;
  font-size: 0.95rem;
  line-height: 1.2;
  min-height: 2.3rem;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.platform-badge {
  background: color-mix(in srgb, var(--platform-color, var(--brand-green)) 22%, var(--bg-elevated));
  border: 1px solid var(--border-soft);
  color: var(--text-main);
}

.platform-chip {
  align-items: center;
  background: color-mix(in srgb, var(--platform-color, var(--brand-green)) 72%, #000);
  border: 1px solid rgb(255 255 255 / 18%);
  border-radius: 999px;
  bottom: 0.55rem;
  box-shadow: 0 8px 22px rgb(0 0 0 / 28%);
  color: #fff;
  display: inline-flex;
  font-size: 0.72rem;
  font-weight: 800;
  height: 1.7rem;
  justify-content: center;
  left: 0.55rem;
  letter-spacing: 0;
  min-width: 1.7rem;
  padding: 0 0.5rem;
  position: absolute;
}

.fs-xxl {
  font-size: xx-large !important;
}

.align-super {
  vertical-align: super !important;
}

.deal-discount-badge {
  align-items: center;
  background: var(--deal-red) !important;
  color: #fff;
  display: inline-flex;
  font-size: 1.12rem;
  font-weight: 800;
  line-height: 1;
  min-height: 1.75rem;
  padding: 0.32rem 0.5rem;
  vertical-align: middle;
}

.deal-card-price {
  align-items: center !important;
  line-height: 1.15;
}

.deal-show-discount {
  font-size: 1.25rem;
  min-height: 2.15rem;
  padding-inline: 0.65rem;
}

.deal-price-current {
  color: var(--brand-green) !important;
}

.deal-card-deadline {
  color: var(--brand-green) !important;
  display: block;
  line-height: 1.2;
  text-align: center;
  width: 100%;
}

.deal-card-details-link {
  color: var(--text-muted);
  text-decoration: none;
}

.deal-card-details-link:hover {
  color: var(--brand-green);
  text-decoration: underline;
}

.surface-card,
.deal-media-card,
.hero-feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-card);
}

.deal-media-card {
  padding: 0.9rem;
}

.hero-feature-card {
  box-shadow: var(--shadow-soft);
  color: var(--text-main);
  overflow: hidden;
  transition: transform 160ms ease, border-color 160ms ease;
}

.hero-feature-card:hover {
  border-color: color-mix(in srgb, var(--brand-green) 45%, var(--border-soft));
  color: var(--text-main);
  transform: translateY(-3px);
}

.hero-feature-cover {
  aspect-ratio: 16 / 9;
  background: var(--bg-elevated);
  overflow: hidden;
}

.hero-feature-cover img {
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.hero-feature-content {
  padding: 1rem;
  position: relative;
}

.hero-feature-content .hero-platform-chip {
  bottom: auto;
  left: 1rem;
  position: absolute;
  top: -0.85rem;
}

.hero-price {
  color: var(--brand-green);
  font-size: 1.45rem;
  font-weight: 800;
}

.breadcrumb {
  --bs-breadcrumb-divider-color: var(--text-muted);
}

.breadcrumb a {
  color: var(--text-main);
  text-decoration: none;
}

.breadcrumb a:hover {
  color: var(--brand-green);
}

.breadcrumb-item.active,
.breadcrumb-item + .breadcrumb-item::before {
  color: var(--text-muted);
}

.deal-badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.low-price-badge {
  background: var(--brand-green);
  color: #07120D;
}

.price-drop-badge {
  background: var(--bg-elevated);
  border: 1px solid var(--border-soft);
  color: var(--text-main);
}

.deal-show-title {
  color: var(--text-main);
}

.deal-info-card dt,
.price-history-card dt {
  color: var(--text-muted);
}

.price-history-table {
  --bs-table-bg: transparent;
  --bs-table-color: var(--text-main);
  --bs-table-border-color: var(--border-soft);
  --bs-table-striped-bg: var(--bg-elevated);
  --bs-table-hover-bg: var(--bg-elevated);
  color: var(--text-main);
}

.price-history-table thead th {
  background: var(--bg-elevated);
  color: var(--text-main);
}

.price-history-table td,
.price-history-table th {
  border-color: var(--border-soft);
}

.category-filter {
  border-bottom: 1px solid var(--border-soft);
  padding-bottom: 0.9rem;
}

.category-filter-link {
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: 999px;
  color: var(--text-muted);
  font-size: 0.9rem;
  padding: 0.42rem 0.8rem;
  text-decoration: none;
}

.category-filter-link:hover {
  border-color: color-mix(in srgb, var(--brand-green) 42%, var(--border-soft));
  color: var(--brand-green);
}

.category-filter-link.active {
  background: var(--brand-green);
  border-color: var(--brand-green);
  color: #07120D;
  font-weight: 700;
}

.platform-nintendo { --platform-color: #E60012; }
.platform-playstation { --platform-color: #2E7CFF; }
.platform-xbox { --platform-color: #00D26A; }
.platform-steam { --platform-color: #365A7C; }
.platform-default { --platform-color: var(--border-soft); }

body.deals4all-theme .btn-primary,
body.deals4all-theme .btn-success {
  background: var(--brand-green);
  border-color: var(--brand-green);
  color: #07120D;
  font-weight: 700;
}

body.deals4all-theme .btn-primary:hover,
body.deals4all-theme .btn-success:hover {
  background: #20E981;
  border-color: #20E981;
  color: #07120D;
}

body.deals4all-theme .btn-outline-primary {
  border-color: var(--brand-green);
  color: var(--brand-green);
}

body.deals4all-theme .btn-outline-primary:hover {
  background: var(--brand-green);
  color: #07120D;
}

.pagination .page-link {
  background-color: var(--bg-card);
  border-color: var(--border-soft);
  color: var(--text-main);
  min-width: 2.35rem;
  text-align: center;
}

.pagination .page-item.active .page-link {
  background-color: var(--brand-green);
  border-color: var(--brand-green);
  color: #07120D;
}

.pagination .page-item.disabled .page-link {
  background-color: var(--bg-elevated);
  color: var(--text-muted);
}

.deals-grid {
  --bs-gutter-x: 0.9rem;
  --bs-gutter-y: 0.9rem;
}

@media (max-width: 575.98px) {
  .deal-card-title {
    font-size: 0.9rem;
  }

  .site-navbar .dropdown {
    margin-top: 0.35rem;
  }
}

@media (min-width: 1400px) {
  .deal-grid-item {
    flex: 0 0 auto;
    width: 20%;
  }
}

/* Mockup-aligned public layout */
body.deals4all-theme {
  background: var(--bg-main);
}

.site-header {
  background: color-mix(in srgb, var(--bg-card) 94%, var(--bg-main));
  border-bottom: 1px solid var(--border-soft);
  box-shadow: 0 10px 30px color-mix(in srgb, var(--bg-main) 18%, transparent);
}

.site-navbar {
  background: transparent !important;
  min-height: 4rem;
  padding-block: 0.65rem;
}

.site-logo {
  font-size: 1.5rem;
}

.site-search {
  align-items: center;
  background: var(--bg-elevated);
  border: 1px solid var(--border-soft);
  border-radius: 999px;
  display: flex;
  margin-left: clamp(1rem, 4vw, 4rem);
  max-width: 360px;
  min-width: 260px;
  overflow: hidden;
  width: 34vw;
}

.site-search .form-control {
  background: var(--bg-elevated) !important;
  border: 0 !important;
  box-shadow: none;
  color: var(--text-main);
  font-size: 0.9rem;
  min-height: 2.35rem;
  padding-left: 1rem;
}

.site-navbar .dropdown-item {
  --bs-dropdown-link-active-bg: transparent;
  --bs-dropdown-link-active-color: var(--text-main);
  color: var(--text-main) !important;
  font-size: 0.94rem;
  padding: 0.55rem 0.9rem;
}

.site-navbar .dropdown-item:hover,
.site-navbar .dropdown-item:focus {
  background: var(--surface-hover);
  color: var(--brand-green) !important;
}

.site-search-button {
  background: var(--bg-elevated) !important;
  border: 0 !important;
  box-shadow: none !important;
  color: var(--text-muted) !important;
  font-size: 1.2rem;
  height: 2.35rem;
  padding-inline: 0.9rem;
}

.site-search {
  background: var(--bg-elevated);
  border-color: var(--border-soft);
  padding-inline: 0.95rem 0.65rem;
}

.site-search:focus-within {
  border-color: color-mix(in srgb, var(--brand-green) 48%, var(--border-soft));
  box-shadow: 0 0 0 0.18rem rgb(0 210 106 / 12%);
}

.site-search .form-control {
  font-size: 0.84rem;
  min-height: 2.1rem;
  padding: 0;
}

.site-search .form-control::placeholder {
  color: var(--text-muted);
}

.site-search-button {
  align-items: center;
  background: var(--bg-elevated) !important;
  border: 0 !important;
  box-shadow: none !important;
  display: inline-flex;
  font-size: 0.95rem;
  height: 2rem;
  justify-content: center;
  outline: 0;
  padding: 0;
  width: 2rem;
}

.site-search-button:hover,
.site-search-button:focus {
  background: var(--bg-elevated) !important;
  color: var(--text-main) !important;
}

.site-navbar .btn-outline-secondary {
  --bs-btn-active-bg: transparent;
  --bs-btn-active-border-color: var(--border-soft);
  --bs-btn-active-color: var(--text-main);
  --bs-btn-hover-bg: var(--surface-hover);
  --bs-btn-hover-border-color: var(--border-soft);
  background: transparent;
  border-radius: 999px;
  min-height: 2.2rem;
  padding-inline: 0.8rem;
}

.site-navbar .btn-outline-secondary.show,
.site-navbar .btn-outline-secondary:active {
  background: transparent !important;
  border-color: var(--border-soft) !important;
  color: var(--text-main) !important;
}

.profile-dot {
  align-items: center;
  background: rgb(255 255 255 / 8%);
  border: 1px solid var(--border-soft);
  border-radius: 50%;
  color: var(--text-main);
  display: inline-flex;
  font-size: 0.75rem;
  height: 2.25rem;
  justify-content: center;
  text-decoration: none;
  width: 2.25rem;
}

.site-nav-row {
  border-top: 1px solid var(--border-soft);
}

.site-primary-nav {
  align-items: center;
  display: flex;
  gap: clamp(1rem, 3vw, 2.4rem);
  list-style: none;
  margin: 0;
  overflow-x: auto;
  padding: 0;
}

.site-primary-nav a,
.site-nav-button {
  background: transparent;
  border: 0;
  color: var(--text-muted);
  display: inline-flex;
  font-size: 0.9rem;
  font-weight: 700;
  padding: 0.85rem 0;
  position: relative;
  text-decoration: none;
  white-space: nowrap;
}

.site-primary-nav a.active,
.site-primary-nav a:hover,
.site-nav-button:hover {
  color: var(--text-main);
}

.site-primary-nav a.active::after {
  background: var(--brand-green);
  border-radius: 999px;
  bottom: 0;
  content: "";
  height: 3px;
  left: 0;
  position: absolute;
  width: 100%;
}

.page-hero {
  background: var(--bg-main);
}

.hero-showcase {
  align-items: center;
  background:
    linear-gradient(90deg, rgb(8 12 17 / 96%) 0%, rgb(8 12 17 / 80%) 38%, rgb(8 12 17 / 32%) 72%, rgb(8 12 17 / 80%) 100%),
    var(--hero-image),
    linear-gradient(135deg, #162431, #0a0f16);
  background-position: center;
  background-size: cover;
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  display: grid;
  min-height: clamp(250px, 30vw, 310px);
  overflow: hidden;
  padding: clamp(1.4rem, 4vw, 2.4rem);
  position: relative;
}

.hero-copy {
  max-width: 560px;
  position: relative;
  z-index: 1;
}

.hero-copy h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1.08;
  margin-bottom: 1rem;
}

.hero-copy p {
  color: var(--text-main);
  font-size: 1.05rem;
  font-weight: 500;
  line-height: 1.55;
  margin-bottom: 1.35rem;
  max-width: 440px;
}

.hero-price-panel {
  background: rgb(8 12 17 / 82%);
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  bottom: 2rem;
  box-shadow: 0 16px 38px rgb(0 0 0 / 28%);
  color: var(--text-main);
  padding: 0.75rem 1rem;
  position: absolute;
  right: clamp(1rem, 3vw, 2rem);
  z-index: 2;
}

.hero-panel-title {
  display: block;
  font-size: 0.92rem;
  font-weight: 800;
  margin-bottom: 0.35rem;
}

.hero-dots {
  bottom: 1.1rem;
  display: flex;
  gap: 0.55rem;
  left: 50%;
  position: absolute;
  transform: translateX(-50%);
}

.hero-dots span {
  background: rgb(255 255 255 / 22%);
  border-radius: 50%;
  height: 0.45rem;
  width: 0.45rem;
}

.hero-dots span.active {
  background: var(--brand-green);
}

.deal-card,
.deal-card-cover,
.price-history-card,
.about-game-card,
.deal-media-card {
  border-radius: 8px;
}

.deal-card {
  border-top-width: 1px;
}

.deal-card-title {
  font-size: 0.86rem;
  font-weight: 700;
  min-height: 2.05rem;
}

.deal-discount-badge {
  font-size: 0.86rem;
  min-height: 1.45rem;
  padding: 0.26rem 0.42rem;
}

.deal-price-current {
  font-size: 1.05rem !important;
}

.deal-card-deadline {
  display: block;
  font-weight: 800;
  text-align: center;
  width: 100%;
}

.deal-cover-large {
  aspect-ratio: 4 / 5;
  object-fit: contain;
}

.deal-gallery-thumbs {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.deal-show-title {
  font-size: clamp(1.7rem, 3vw, 2.15rem);
}

.deal-action-row .btn {
  min-width: 10rem;
}

@media (min-width: 1200px) {
  .deal-grid-item {
    flex: 0 0 auto;
    width: 20%;
  }
}

@media (max-width: 991.98px) {
  .site-search {
    margin-left: 0;
    max-width: none;
    min-width: 0;
    width: 100%;
  }

  .site-controls {
    align-items: flex-start !important;
    padding-top: 1rem;
  }
}

@media (max-width: 767.98px) {
  .hero-showcase {
    min-height: 360px;
  }

  .hero-price-panel {
    bottom: 3rem;
    left: 1rem;
    right: 1rem;
  }
}

/* Current homepage/header fixes */
.profile-dot,
.site-nav-row {
  display: none !important;
}

.hero-showcase {
  background: linear-gradient(135deg, #18212c, #0b1117 72%);
  gap: clamp(1rem, 4vw, 3rem);
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.72fr);
}

.hero-copy {
  max-width: 620px;
}

.hero-feature {
  align-self: stretch;
  border-radius: 8px;
  color: var(--text-main);
  display: grid;
  min-height: 230px;
  overflow: hidden;
  position: relative;
}

.hero-feature::before {
  background: linear-gradient(90deg, rgb(8 12 17 / 18%), rgb(8 12 17 / 82%));
  content: "";
  inset: 0;
  position: absolute;
  z-index: 1;
}

.hero-feature-image {
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.hero-price-panel {
  bottom: 1rem;
  right: 1rem;
}

.hero-deadline {
  color: var(--brand-green);
  display: block;
  font-size: 0.8rem;
  font-weight: 800;
  margin-top: 0.45rem;
}

@media (max-width: 767.98px) {
  .hero-showcase {
    grid-template-columns: 1fr;
  }
}

/* Page hero reverted to the last committed layout */
body.deals4all-theme {
  background:
    radial-gradient(circle at top left, rgb(0 210 106 / 12%), transparent 28rem),
    var(--bg-main);
}

.page-hero {
  background:
    linear-gradient(135deg, rgb(0 210 106 / 14%), transparent 42%),
    linear-gradient(180deg, var(--bg-elevated), var(--bg-main));
  border-bottom: 1px solid var(--border-soft);
}
