/* TGP Game Hub – Archive Styles */
:root {
  --tgp-accent: #ff8a00;
  --tgp-border: rgba(140, 145, 160, .35);
  --tgp-card: rgba(255, 255, 255, .04);
  --tgp-card-strong: rgba(255, 255, 255, .06);
  --tgp-hero-overlay: rgba(16, 16, 27, .7);
  /* 70% overlay */
}

.tgp-gh-wrap {
  padding-left: 16px;
  padding-right: 16px;
  margin-left: auto;
  margin-right: auto
}

@media (min-width:1280px) {
  .tgp-gh-wrap {
    padding-left: 172px;
    padding-right: 172px
  }
}

/* HERO */
.tgp-archive-hero {
  position: relative;
  background-size: cover;
  background-position: center;
  min-height: 220px;
}

.tgp-archive-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--tgp-hero-overlay);
}

.tgp-archive-hero .inner {
  position: relative;
  color: #fff;
  padding: 36px 0 28px;
  text-shadow: 0 2px 10px rgba(0, 0, 0, .4);
}

.tgp-archive-title {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 6px
}

.tgp-archive-sub {
  font-size: 1.05rem;
  opacity: .9;
  margin: 0
}

/* Toolbar */
.tgp-archive-toolbar {
  background: var(--tgp-card);
  border: 1px solid var(--tgp-border);
  border-radius: 12px;
  margin-top: -22px;
  padding: 16px
}

.tgp-toolbar-row {
  display: grid;
  grid-template-columns: 1fr 240px;
  gap: 12px
}

@media (max-width:720px) {
  .tgp-toolbar-row {
    grid-template-columns: 1fr
  }
}

.tgp-toolbar-row .field {
  display: flex;
  gap: 8px;
  align-items: center
}

.tgp-toolbar-row input[type="search"],
.tgp-toolbar-row select {
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--tgp-border);
  background: rgba(255, 255, 255, .06);
  color: #fff;
}

.tgp-toolbar-row button {
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid var(--tgp-border);
  background: var(--tgp-card-strong);
  color: #fff;
  cursor: pointer;
}

/* A-Z filter */
.tgp-az {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px
}

.tgp-az a,
.tgp-az span {
  display: inline-block;
  padding: 6px 10px;
  border-radius: 10px;
  border: 1px solid var(--tgp-border);
  background: rgba(255, 255, 255, .04);
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  font-size: .92rem;
}

.tgp-az .active {
  background: var(--tgp-accent);
  color: #000;
  border-color: transparent
}

/* Grid */
.tgp-archive-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 22px;
  margin-top: 22px
}

@media (max-width:1200px) {
  .tgp-archive-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr))
  }
}

@media (max-width:900px) {
  .tgp-archive-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr))
  }
}

@media (max-width:640px) {
  .tgp-archive-grid {
    grid-template-columns: 1fr
  }
}

.tgp-game-card {
  background: var(--tgp-card);
  border: 1px solid var(--tgp-border);
  border-radius: 12px;
  overflow: hidden;
  transition: transform .1s ease, box-shadow .15s ease
}

.tgp-game-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, .22)
}

.tgp-game-thumb {
  display: block;
  line-height: 0;
  background: #111
}

.tgp-game-thumb img {
  display: block;
  width: 100%;
  height: auto
}

.tgp-game-title {
  display: block;
  padding: 12px 14px;
  font-weight: 800;
  font-size: 1.05rem;
  color: #fff;
  text-decoration: none
}

/* Pagination */
.tgp-archive-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin: 24px 0 8px
}

.tgp-archive-pagination a,
.tgp-archive-pagination span {
  padding: 6px 10px;
  border-radius: 10px;
  border: 1px solid var(--tgp-border);
  background: rgba(255, 255, 255, .04);
  color: #fff;
  text-decoration: none
}

.tgp-archive-pagination .current {
  background: var(--tgp-accent);
  color: #000;
  border-color: transparent
}


/* Wrap paddings also within hero */
.tgp-archive-hero .tgp-gh-wrap {
  padding-left: 16px;
  padding-right: 16px;
  margin-left: auto;
  margin-right: auto
}

@media (min-width:1280px) {
  .tgp-archive-hero .tgp-gh-wrap {
    padding-left: 172px;
    padding-right: 172px
  }
}

/* Slightly smaller tiles */
.tgp-archive-grid {
  gap: 18px
}

.tgp-game-title {
  font-size: 1rem;
  padding: 10px 12px
}

.tgp-game-card {
  border-radius: 10px
}

/* v1.2.0 updates */
.tgp-archive-toolbar {
  position: relative;
  z-index: 5;
  backdrop-filter: saturate(140%) blur(12px);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, .25);
}

/* Buttons + selects hover states */
.tgp-toolbar-row button,
.tgp-archive-pagination a,
.tgp-archive-pagination span,
.tgp-az a,
.tgp-az .active {
  transition: transform .08s ease, box-shadow .15s ease, border-color .15s ease, background-color .15s ease, color .15s ease;
}

.tgp-toolbar-row button:hover,
.tgp-archive-pagination a:hover,
.tgp-az a:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, .22);
}

.tgp-toolbar-row select:hover {
  border-color: rgba(255, 255, 255, .45);
}

/* Select caret */
.tgp-toolbar-row .field.select {
  position: relative;
}

.tgp-toolbar-row .field.select::after {
  content: "";
  position: absolute;
  right: 12px;
  top: 50%;
  margin-top: -3px;
  width: 10px;
  height: 6px;
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="10" height="6" viewBox="0 0 10 6" fill="none"><path d="M1 1l4 4 4-4" stroke="white" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/></svg>');
  background-size: contain;
  background-repeat: no-repeat;
  pointer-events: none;
  opacity: .9;
}

.tgp-toolbar-row select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  padding-right: 36px;
}

/* Smaller cards and tighter grid */
@media (min-width:1400px) {
  .tgp-archive-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr))
  }
}

.tgp-archive-grid {
  gap: 16px
}

.tgp-game-title {
  font-size: .95rem;
  padding: 9px 11px
}

.tgp-game-card {
  border-radius: 10px
}

.tgp-empty {
  padding: 18px 0;
}

/* v1.2.1: smaller tiles on mobile */
@media (max-width:640px) {
  .tgp-archive-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px
  }
}

@media (max-width:420px) {
  .tgp-archive-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width:640px) {
  .tgp-game-title {
    font-size: .85rem;
    padding: 8px 10px
  }
}

/* v1.2.3: fixed image aspect and object-fit */
.tgp-game-thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: #111;
}

.tgp-game-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

/* Force 2 columns on mobile */
@media (max-width: 720px) {
  .tgp-archive-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 12px !important;
  }

  .tgp-game-title {
    font-size: .82rem !important;
    padding: 7px 9px !important;
  }
}

@media (max-width: 380px) {
  .tgp-archive-grid {
    grid-template-columns: 1fr !important;
  }
}


/* Platforms archive */
/* Platforms archive */
.tgp-platform-archive .tgp-gh-wrap {
  padding-left: 16px;
  padding-right: 16px;
  margin-left: auto;
  margin-right: auto;
}

@media (min-width:1280px) {
  .tgp-platform-archive .tgp-gh-wrap {
    padding-left: 172px;
    padding-right: 172px;
  }
}

.tgp-platform-archive .tgp-archive-hero {
  position: relative;
}

/* Space between hero and platform list */
.tgp-platform-archive .tgp-platform-list-section {
  margin-top: 2.5rem;
}

.tgp-platform-archive .tgp-platform-list {
  list-style: disc !important;
  list-style-position: outside;
  padding-left: 1.5rem;
  margin: 1.5rem 0 2.5rem;
}

.tgp-platform-archive .tgp-platform-list li {
  margin-bottom: 0.5rem;
}

.tgp-platform-archive .tgp-platform-list a {
  text-decoration: none;
  font-weight: 500;
}

.tgp-platform-archive .tgp-platform-list a:hover {
  text-decoration: underline;
  color: var(--tgp-accent) !important;
  font-weight: 600 !important;
}

/* Platforms pagination */
.tgp-platform-pagination {
  margin-top: 2.5rem;
}

.tgp-platform-pagination .nav-links {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.tgp-platform-pagination .page-count {
  font-size: 0.85rem;
  opacity: .8;
}

.tgp-platform-pagination .page-buttons {
  display: flex;
  gap: 0.75rem;
}

.tgp-platform-pagination .page-numbers {
  display: inline-block;
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  border: 1px solid var(--tgp-accent) !important;
  background: rgba(255, 138, 0, 0.12) !important;
  color: #fff !important;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: .05em;
  text-decoration: none;
  font-weight: 600;
}

.tgp-platform-pagination .page-numbers:hover {
  background: var(--tgp-accent) !important;
  color: #000 !important;
}

/* Calendar Page Styles */
.tgp-games-calendar .tgp-calendar-controls {
  margin: 2rem 0 1.5rem;
}

.tgp-calendar-selector {
  position: relative;
  width: 100%;
}

.tgp-calendar-display {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: var(--tgp-card);
  border: 1px solid var(--tgp-border);
  border-radius: 12px;
  color: #fff;
  font-size: 1.05rem;
  font-weight: 600;
  cursor: pointer;
  transition: all .15s ease;
}

.tgp-calendar-display:hover {
  background: var(--tgp-card-strong);
  border-color: rgba(255, 255, 255, .45);
}

.tgp-dropdown-arrow {
  transition: transform .2s ease;
}

.tgp-calendar-display[aria-expanded="true"] .tgp-dropdown-arrow {
  transform: rotate(180deg);
}

.tgp-calendar-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  background: var(--tgp-card-strong);
  border: 1px solid var(--tgp-border);
  border-radius: 12px;
  padding: 16px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all .2s ease;
  z-index: 100;
  backdrop-filter: saturate(140%) blur(12px);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, .35);
}

.tgp-calendar-dropdown.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.tgp-year-selector {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--tgp-border);
}

.tgp-current-year {
  font-size: 1.15rem;
  font-weight: 700;
  color: #fff;
}

.tgp-year-nav {
  background: rgba(255, 255, 255, .06);
  border: 1px solid var(--tgp-border);
  border-radius: 8px;
  padding: 6px 10px;
  color: #fff;
  cursor: pointer;
  transition: all .15s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.tgp-year-nav:hover {
  background: var(--tgp-accent);
  color: #000;
  border-color: transparent;
  transform: translateY(-1px);
}

.tgp-month-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.tgp-month-btn {
  padding: 10px;
  text-align: center;
  background: rgba(255, 255, 255, .04);
  border: 1px solid var(--tgp-border);
  border-radius: 8px;
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  font-size: .9rem;
  transition: all .15s ease;
}

.tgp-month-btn:hover {
  background: rgba(255, 255, 255, .08);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, .2);
}

.tgp-month-btn.active {
  background: var(--tgp-accent);
  color: #000;
  border-color: transparent;
}

/* Calendar Grid */
.tgp-calendar-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 18px;
  margin: 2rem 0;
}

@media (max-width:1200px) {
  .tgp-calendar-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width:900px) {
  .tgp-calendar-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
  }
}

@media (max-width:640px) {
  .tgp-calendar-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
  }
}

.tgp-calendar-card {
  background: var(--tgp-card);
  border: 1px solid var(--tgp-border);
  border-radius: 10px;
  overflow: hidden;
  transition: transform .1s ease, box-shadow .15s ease;
}

.tgp-calendar-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, .22);
}

.tgp-calendar-thumb {
  display: block;
  position: relative;
  width: 100%;
  aspect-ratio: 2/3;
  overflow: hidden;
  background: #111;
  line-height: 0;
}

.tgp-calendar-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.tgp-calendar-info {
  padding: 10px 12px;
}

.tgp-calendar-title {
  margin: 0 0 4px;
  font-size: .9rem;
  font-weight: 700;
  line-height: 1.3;
}

.tgp-calendar-title a {
  color: #fff;
  text-decoration: none;
  transition: color .15s ease;
}

.tgp-calendar-title a:hover {
  color: var(--tgp-accent);
}

.tgp-calendar-date {
  display: block;
  font-size: .75rem;
  color: rgba(255, 255, 255, .7);
  font-weight: 500;
}

/* Calendar Pagination */
.tgp-calendar-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin: 24px 0;
}

.tgp-calendar-pagination a,
.tgp-calendar-pagination span {
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid var(--tgp-border);
  background: rgba(255, 255, 255, .04);
  color: #fff;
  text-decoration: none;
  font-size: .9rem;
  transition: all .15s ease;
}

.tgp-calendar-pagination a:hover {
  background: rgba(255, 255, 255, .08);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, .2);
}

.tgp-calendar-pagination .current {
  background: var(--tgp-accent);
  color: #000;
  border-color: transparent;
  font-weight: 700;
}

/* Mobile optimizations */
@media (max-width:640px) {
  .tgp-calendar-title {
    font-size: .82rem;
  }

  .tgp-calendar-date {
    font-size: .7rem;
  }

  .tgp-calendar-info {
    padding: 8px 10px;
  }
}