/*
Theme Name: SwitchROMs - Nintendo Switch ROMs Theme
Theme URI: https://switchroms.org
Author: SwitchROMs Team
Author URI: https://switchroms.org
Description: High-performance, SEO-optimized Nintendo Switch ROMs and Emulation WordPress theme with Discord blurple (#5865F2) branding, large game box art, green high-speed download buttons (DataNodes & Update), up to 5 custom field screenshots, game specs table, and emulator guides.
Version: 1.1.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: switchroms
Tags: games, entertainment, blog, custom-background, custom-menu, featured-images, responsive-layout, theme-options
*/

/* Reset & Variables */
:root {
  --color-discord: #5865F2;
  --color-discord-hover: #4752C4;
  --color-green-btn: #00A651;
  --color-green-hover: #008F45;
  --color-red-badge: #E60012;
  --color-dark-bg: #0E131F;
  --color-card-bg: #1B2333;
}

*, *::before, *::after {
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background-color: #F8FAFC;
  color: #0F172A;
  margin: 0;
  padding: 0;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a {
  color: #5865F2;
  text-decoration: none;
  transition: color 0.15s ease;
  cursor: pointer;
}

button {
  cursor: pointer;
}

a:hover {
  color: #4752C4;
}

/* Layout container */
.container-max {
  max-width: 1160px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 16px;
  padding-right: 16px;
}

/* Header */
.site-header {
  background-color: #0E131F;
  color: #FFFFFF;
  border-bottom: 1px solid #1E293B;
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.site-header-inner {
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand-logo {
  font-size: 22px;
  font-weight: 900;
  letter-spacing: -0.5px;
  color: #FFFFFF;
  text-decoration: none;
}

.brand-logo span {
  color: #5865F2;
}

.search-form-wrap {
  display: flex;
  align-items: center;
  max-width: 380px;
  width: 100%;
}

.search-input {
  width: 100%;
  padding: 8px 14px;
  background-color: #1B2333;
  border: 1px solid #334155;
  color: #FFFFFF;
  font-size: 13px;
  border-top-left-radius: 6px;
  border-bottom-left-radius: 6px;
  outline: none;
}

.search-input:focus {
  border-color: #5865F2;
}

.search-submit-btn {
  background-color: #5865F2;
  color: #FFFFFF;
  border: none;
  padding: 8px 18px;
  font-size: 13px;
  font-weight: 600;
  border-top-right-radius: 6px;
  border-bottom-right-radius: 6px;
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.search-submit-btn:hover {
  background-color: #4752C4;
}

/* Card Grids */
.section-box {
  margin-bottom: 24px;
}

.section-top-bar {
  background-color: #111827;
  color: #FFFFFF;
  padding: 10px 16px;
  border-top-left-radius: 8px;
  border-top-right-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 14px;
  font-weight: 700;
}

.section-top-bar a {
  color: #94A3B8;
  font-size: 12px;
  font-weight: 600;
}

.section-top-bar a:hover {
  color: #5865F2;
}

.cards-container {
  background-color: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-top: none;
  border-bottom-left-radius: 8px;
  border-bottom-right-radius: 8px;
  padding: 16px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.game-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 14px;
}

@media (max-width: 1024px) {
  .game-grid { grid-template-columns: repeat(4, 1fr); }
}

@media (max-width: 768px) {
  .game-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 480px) {
  .game-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
}

/* Game Card - ONLY outer border line changes color to #5865F2, static image (baqi imges na hilly) */
.rom-card {
  display: flex;
  flex-direction: column;
  background-color: #FFFFFF;
  border-radius: 12px;
  padding: 8px;
  text-decoration: none;
  border: 2px solid #E2E8F0;
  transition: border-color 0.15s ease;
  position: relative;
}

.rom-card:hover {
  border-color: #5865F2;
  /* Completely static: No translateY, no transform, no shake */
}

.rom-card-img-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 4;
  border-radius: 8px;
  overflow: hidden;
  background-color: #1E293B;
}

.rom-card-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  /* Static image: No zoom, no scale on hover */
}

.switch-badge {
  position: absolute;
  top: 6px;
  left: 6px;
  z-index: 10;
  background-color: #E60012;
  color: #FFFFFF;
  font-size: 9px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 3px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  box-shadow: 0 2px 4px rgba(0,0,0,0.25);
}

.rom-card-title {
  margin-top: 8px;
  font-size: 13px;
  font-weight: 600;
  color: #0F172A;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.rom-card:hover .rom-card-title {
  color: #5865F2;
}

.rom-card-meta {
  margin-top: 4px;
  font-size: 11px;
  color: #64748B;
  display: flex;
  align-items: center;
  gap: 6px;
}

.rom-card-meta .format {
  font-weight: 700;
  color: #334155;
  text-transform: uppercase;
}

/* Single Game Detail View (Matching Image 2) */
.game-detail-card {
  background-color: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
  margin-bottom: 24px;
}

.game-detail-layout {
  display: grid;
  grid-template-columns: 290px 1fr;
  gap: 28px;
  align-items: start;
}

@media (max-width: 768px) {
  .game-detail-layout {
    grid-template-columns: 1fr;
  }
}

/* Taller and narrower box art cover matching Nintendo Switch game case */
.boxart-container {
  width: 100%;
  max-width: 235px;
  margin: 0 auto;
  aspect-ratio: 1 / 1.55;
  border-radius: 12px;
  overflow: hidden;
  background-color: #F1F5F9;
  border: 1px solid #CBD5E1;
  position: relative;
  display: flex;
  flex-direction: column;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.boxart-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Detail Right column */
.game-detail-info {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.game-detail-title {
  font-size: 26px;
  font-weight: 800;
  color: #0F172A;
  margin: 0 0 6px 0;
  line-height: 1.25;
}

.format-pill {
  display: inline-block;
  background-color: #EDE9FE;
  color: #5865F2;
  font-size: 12px;
  font-weight: 700;
  padding: 2px 10px;
  border-radius: 9999px;
}

.rating-stars {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  color: #F59E0B;
  font-size: 13px;
}

.rating-text {
  font-size: 12px;
  color: #64748B;
  margin-left: 6px;
  font-weight: 500;
}

/* Specs Table (2 columns as in Image 2) */
.specs-table {
  border: 1px solid #E2E8F0;
  border-radius: 8px;
  overflow: hidden;
  font-size: 13px;
}

.specs-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

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

.specs-col {
  display: flex;
  flex-direction: column;
}

.specs-col:first-child {
  border-right: 1px solid #E2E8F0;
}

@media (max-width: 640px) {
  .specs-col:first-child {
    border-right: none;
    border-bottom: 1px solid #E2E8F0;
  }
}

.specs-row {
  display: flex;
  align-items: center;
  padding: 10px 14px;
  border-bottom: 1px solid #E2E8F0;
}

.specs-row:last-child {
  border-bottom: none;
}

.specs-label {
  width: 90px;
  color: #64748B;
  font-weight: 500;
  flex-shrink: 0;
}

.specs-val {
  color: #0F172A;
  font-weight: 600;
  flex: 1;
}

.specs-val.accent {
  color: #5865F2;
}

.specs-val.mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

/* Green Download Buttons (Image 2 exact style) */
.download-buttons-wrap {
  display: flex;
  gap: 12px;
  padding-top: 6px;
}

@media (max-width: 640px) {
  .download-buttons-wrap {
    flex-direction: column;
  }
}

.btn-download-green {
  flex: 1;
  background-color: #00A651;
  color: #FFFFFF !important;
  font-weight: 700;
  font-size: 15px;
  padding: 13px 20px;
  border-radius: 8px;
  text-align: center;
  text-decoration: none !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.1);
  transition: background-color 0.15s ease, transform 0.1s ease;
  cursor: pointer;
  border: none;
}

.btn-download-green:hover {
  background-color: #008F45;
  color: #FFFFFF !important;
}

.btn-download-green:active {
  transform: scale(0.99);
}

/* Screenshots Gallery */
.screenshots-box {
  background-color: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 24px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.screenshots-title {
  font-size: 14px;
  font-weight: 700;
  color: #0F172A;
  padding-bottom: 10px;
  border-bottom: 1px solid #F1F5F9;
  margin: 0 0 16px 0;
}

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

.screenshot-item {
  aspect-ratio: 16 / 9;
  border-radius: 8px;
  overflow: hidden;
  background-color: #0F172A;
  border: 2px solid transparent;
  cursor: pointer;
  position: relative;
  transition: border-color 0.15s ease;
}

.screenshot-item:hover {
  border-color: #5865F2;
}

.screenshot-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Orange Emulator & FAQ Sections */
.orange-section {
  border: 1px solid #E2E8F0;
  border-radius: 12px;
  background-color: #FFFFFF;
  overflow: hidden;
  margin-bottom: 24px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.orange-bar {
  background-color: #EA580C;
  color: #FFFFFF;
  font-weight: 700;
  font-size: 14px;
  text-align: center;
  padding: 10px 16px;
}

.orange-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  font-size: 13px;
}

@media (max-width: 768px) {
  .orange-grid { grid-template-columns: 1fr; }
}

.orange-cell {
  padding: 20px;
}

.orange-cell:first-child {
  border-right: 1px solid #E2E8F0;
}

@media (max-width: 768px) {
  .orange-cell:first-child {
    border-right: none;
    border-bottom: 1px solid #E2E8F0;
  }
}

/* Footer */
.site-footer {
  background-color: #0E131F;
  color: #94A3B8;
  border-top: 1px solid #1E293B;
  padding-top: 48px;
  padding-bottom: 32px;
  font-size: 13px;
  margin-top: 48px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 32px;
  padding-bottom: 32px;
  border-bottom: 1px solid #1E293B;
}

@media (max-width: 768px) {
  .footer-grid { grid-template-columns: 1fr; }
}

.footer-heading {
  color: #FFFFFF;
  font-weight: 700;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 14px;
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-links a {
  color: #94A3B8;
  text-decoration: none;
}

.footer-links a:hover {
  color: #FFFFFF;
}
