/*
Theme Name: Switch ROM
Theme URI: https://switchrom.example.com
Author: Switch ROM Community
Author URI: https://switchrom.example.com
Description: Fast, lightweight, and modern Nintendo Switch ROMs download theme for WordPress with 8-column grid, game specs tables, dual download buttons, and screenshots gallery.
Version: 1.0.0
License: GNU General Public License v2 or later
Text Domain: switch-rom
*/

/* Reset & Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
  background-color: #f8fafc;
  color: #1e293b;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a {
  text-decoration: none;
  color: inherit;
}

/* Container */
.sr-container {
  max-width: 1380px;
  margin: 0 auto;
  padding: 0 16px;
}

/* Header */
.sr-header {
  background: #ffffff;
  border-bottom: 1px solid #e2e8f0;
  position: sticky;
  top: 0;
  z-index: 50;
}
.sr-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  gap: 16px;
}
.sr-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  transition: all 0.3s ease;
}
.sr-logo:hover .sr-logo-svg {
  transform: scale(1.05);
}
.sr-logo-text {
  font-size: 20px;
  font-weight: 900;
  color: #0f172a;
  text-transform: uppercase;
  letter-spacing: -0.5px;
  transition: all 0.3s ease;
}
.sr-logo:hover .sr-logo-text {
  background: linear-gradient(90deg, #7928CA 0%, #c026d3 50%, #ff0080 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.sr-logo-highlight {
  color: #d946ef;
}
.sr-logo-sub {
  display: block;
  font-size: 10px;
  color: #64748b;
  font-weight: 600;
  letter-spacing: 1px;
}

/* Search bar */
.sr-search-form {
  position: relative;
  width: 100%;
  max-width: 440px;
}
.sr-search-input {
  width: 100%;
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  padding: 9px 14px 9px 38px;
  font-size: 13px;
  color: #0f172a;
  outline: none;
  transition: all 0.2s;
}
.sr-search-input:focus {
  background: #ffffff;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37,99,235,0.15);
}
.sr-search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #64748b;
  pointer-events: none;
}

/* Banner */
.sr-banner {
  background: #0f172a;
  color: #ffffff;
  border-radius: 16px;
  padding: 14px 20px;
  margin: 20px 0 16px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  position: relative;
  overflow: hidden;
  border: 1px solid #1e293b;
}
.sr-banner::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #7928CA 0%, #c026d3 50%, #ff0080 100%);
}
.sr-banner-title {
  font-size: 14px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.sr-banner-categories {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.sr-cat-pill {
  background: #1e293b;
  color: #e2e8f0;
  padding: 7px 16px;
  border-radius: 9999px;
  font-size: 12px;
  font-weight: 800;
  transition: all 0.2s ease;
  white-space: nowrap;
  display: inline-block;
  text-decoration: none;
}
.sr-cat-pill:hover,
.sr-cat-pill.sr-cat-active {
  background: linear-gradient(90deg, #7928CA 0%, #c026d3 50%, #ff0080 100%);
  color: #ffffff;
  box-shadow: 0 0 16px rgba(217,70,239,0.5);
  transform: translateY(-1px) scale(1.04);
}

/* Pagination - Clean Next / Previous Buttons */
.sr-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 14px;
  margin: 36px 0;
}
.sr-pagination a,
.sr-page-prev a,
.sr-page-next a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 24px;
  border-radius: 9999px;
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
  transition: all 0.2s;
}
.sr-page-prev a {
  background: #ffffff;
  color: #334155;
  border: 1px solid #cbd5e1;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
.sr-page-prev a:hover {
  background: #f1f5f9;
  color: #0f172a;
  border-color: #94a3b8;
}
.sr-page-next a {
  background: linear-gradient(90deg, #7928CA 0%, #c026d3 50%, #ff0080 100%);
  color: #ffffff;
  border: none;
  box-shadow: 0 4px 15px rgba(217,70,239,0.4);
}
.sr-page-next a:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(217,70,239,0.55);
}

/* 8-Column ROMs Grid */
.sr-grid-8 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 30px;
}
@media (min-width: 500px) {
  .sr-grid-8 { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 768px) {
  .sr-grid-8 { grid-template-columns: repeat(4, 1fr); gap: 14px; }
}
@media (min-width: 1024px) {
  .sr-grid-8 { grid-template-columns: repeat(6, 1fr); gap: 14px; }
}
@media (min-width: 1280px) {
  .sr-grid-8 { grid-template-columns: repeat(8, 1fr); gap: 14px; }
}

/* ROM Card */
.sr-card {
  background: #ffffff;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all 0.25s ease;
  position: relative;
  text-decoration: none;
}
.sr-card:hover {
  border-color: transparent;
  outline: none;
  box-shadow: 0 0 0 3px #d946ef, 0 8px 24px -2px rgba(217,70,239,0.35);
  transform: translateY(-3px);
}
.sr-card-thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 2/3;
  background: #e2e8f0;
  overflow: hidden;
}
.sr-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}
.sr-card:hover .sr-card-thumb img {
  transform: scale(1.05);
}
.sr-card-badge {
  position: absolute;
  top: 6px;
  left: 6px;
  background: rgba(15,23,42,0.85);
  color: #ffffff;
  font-size: 9px;
  font-weight: 800;
  padding: 2px 5px;
  border-radius: 4px;
  text-transform: uppercase;
}
.sr-card-size {
  position: absolute;
  bottom: 6px;
  right: 6px;
  background: rgba(15,23,42,0.85);
  color: #10b981;
  font-size: 9px;
  font-weight: 700;
  padding: 2px 5px;
  border-radius: 4px;
  font-family: monospace;
}
.sr-card-body {
  padding: 8px 10px;
  background: #ffffff;
}
.sr-card-title {
  font-size: 11.5px;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  height: 31px;
}
.sr-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 6px;
  font-size: 10px;
  color: #64748b;
}

/* Detail Article Styles */
.sr-breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 12px;
  color: #64748b;
  padding: 12px 0;
  border-bottom: 1px solid #e2e8f0;
  margin-bottom: 20px;
}
.sr-breadcrumb a {
  color: #64748b;
}
.sr-breadcrumb a:hover {
  color: #2563eb;
}
.sr-detail-box {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 24px;
  margin-bottom: 24px;
}
.sr-detail-top {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}
@media (min-width: 900px) {
  .sr-detail-top {
    grid-template-columns: 300px 1fr;
  }
}
.sr-cover-wrap {
  width: 100%;
  max-width: 300px;
  margin: 0 auto;
  aspect-ratio: 2/3;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #e2e8f0;
}
.sr-cover-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Specs Table */
.sr-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  overflow: hidden;
  background: #ffffff;
}
.sr-table td {
  padding: 9px 14px;
  border-bottom: 1px solid #f1f5f9;
}
.sr-table td:first-child {
  font-weight: 600;
  color: #64748b;
  width: 35%;
  background: #fbfcfe;
}
.sr-table td:last-child {
  color: #0f172a;
  font-weight: 500;
}

/* Download Buttons under Table */
.sr-dl-container {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid #e2e8f0;
}
.sr-dl-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-top: 10px;
}
@media (min-width: 600px) {
  .sr-dl-grid {
    grid-template-columns: 1fr 1fr;
  }
}
.sr-dl-btn-1 {
  background: linear-gradient(135deg, #7928CA 0%, #c026d3 50%, #ff0080 100%);
  color: #ffffff;
  padding: 15px 20px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 800;
  transition: all 0.25s ease;
  border: none;
  box-shadow: 0 4px 16px rgba(217,70,239,0.35);
}
.sr-dl-btn-1:hover {
  filter: brightness(1.1);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(217,70,239,0.5);
}
.sr-dl-btn-2 {
  background: #0f172a;
  color: #ffffff;
  padding: 15px 20px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 800;
  transition: all 0.25s ease;
  border: 1px solid #1e293b;
}
.sr-dl-btn-2:hover {
  background: linear-gradient(135deg, #7928CA 0%, #c026d3 50%, #ff0080 100%);
  border-color: transparent;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(217,70,239,0.45);
}

/* Screenshots 5 in 1 Line */
.sr-shots-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-top: 12px;
}
@media (min-width: 640px) {
  .sr-shots-grid {
    grid-template-columns: repeat(5, 1fr);
  }
}
.sr-shot-item {
  aspect-ratio: 16/9;
  border-radius: 12px;
  overflow: hidden;
  border: 3px solid transparent;
  transition: all 0.25s ease;
  background: #0f172a;
  cursor: pointer;
}
.sr-shot-item:hover {
  border-color: #d946ef;
  transform: scale(1.04);
  box-shadow: 0 0 20px rgba(217,70,239,0.5);
}
.sr-shot-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Section Titles */
.sr-sec-title {
  font-size: 16px;
  font-weight: 800;
  color: #0f172a;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
}
.sr-sec-title::before {
  content: "";
  display: inline-block;
  width: 5px;
  height: 18px;
  background: linear-gradient(to bottom, #7928CA, #ff0080);
  border-radius: 4px;
}

/* Footer */
.sr-footer {
  background: #020617;
  color: #94a3b8;
  margin-top: 40px;
  font-size: 13px;
  position: relative;
  border-top: 1px solid #1e293b;
  padding-bottom: 24px;
}
.sr-footer-top-bar {
  height: 4px;
  width: 100%;
  background: linear-gradient(90deg, #7928CA 0%, #c026d3 50%, #ff0080 100%);
  margin-bottom: 36px;
}
.sr-social-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: #0f172a;
  border: 1px solid #1e293b;
  border-radius: 9999px;
  color: #cbd5e1;
  font-size: 11px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s ease;
}
.sr-social-pill:hover {
  background: linear-gradient(90deg, #7928CA, #ff0080);
  border-color: transparent;
  color: #ffffff;
  transform: translateY(-1px);
}
.sr-footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 30px;
}
@media (min-width: 768px) {
  .sr-footer-grid {
    grid-template-columns: 2fr 1fr 1.5fr;
  }
}
.sr-footer h4 {
  color: #ffffff;
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 14px;
}
.sr-footer-links {
  list-style: none;
  padding: 0;
}
.sr-footer-links li {
  margin-bottom: 8px;
}
.sr-footer-links a {
  color: #94a3b8;
  transition: color 0.2s;
}
.sr-footer-links a:hover {
  color: #d946ef;
}
.sr-footer-bottom {
  margin-top: 30px;
  padding-top: 18px;
  border-top: 1px solid #1e293b;
  text-align: center;
  font-size: 12px;
  color: #64748b;
}
