/*
Theme Name: Switch NSP
Theme URI: https://switch-nsp.com/
Author: Switch NSP Dev
Description: A modern, highly optimized video game ROM directory theme for Nintendo Switch emulators, inspired by switch-rom.today. Features a fast and responsive layout, custom game specifications grids, and responsive views.
Version: 1.0.0
License: GNU General Public License v2 or later
Text Domain: switch-nsp
*/

:root {
	--font-head: 'Plus Jakarta Sans', 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* ==========================================
   1. CORE GLOBAL STYLES & TYPOGRAPHY
   ========================================== */
body {
	font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	font-size: 15px;
	line-height: 1.6;
	background-color: #f8fafc;
	color: #1f2937;
	margin: 0;
	padding: 0;
}

a {
	color: #6366f1;
	text-decoration: none;
	transition: color 0.2s ease;
}

a:hover {
	color: #4f46e5;
}

* {
	box-sizing: border-box;
}

.container {
	width: 100%;
	max-width: 1200px;
	margin-right: auto;
	margin-left: auto;
	padding-right: 20px;
	padding-left: 20px;
}

.text-center {
	text-align: center;
}

.text-white {
	color: #ffffff;
}

.bg-dark {
	background-color: #0d0d0d;
}

.bg-brand {
	background-color: #6366f1;
}

/* ==========================================
   2. HEADER & NAVIGATION STYLES
   ========================================== */

.site-header {
	background-color: #0f172a;
	position: sticky;
	top: 0;
	z-index: 1000;
	border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}

.header-container {
	display: flex;
	align-items: center;
	gap: 24px;
	max-width: 1200px;
	margin: 0 auto;
	padding: 12px 20px;
}

.header-brand {
	flex-shrink: 0;
}

.site-logo {
	font-family: var(--font-head);
	font-size: 20px;
	font-weight: 800;
	letter-spacing: -0.02em;
	color: #ffffff;
	display: inline-flex;
	align-items: baseline;
	gap: 0.28em;
	line-height: 1.2;
}

.site-logo:hover {
	color: #ffffff;
}

.site-logo .logo-highlight {
	color: #6366f1;
}

.header-nav {
	display: flex;
	align-items: center;
	margin-right: auto;
}

.nav-menu-list {
	display: flex;
	list-style: none;
	margin: 0;
	padding: 0;
	gap: 6px;
	flex-wrap: nowrap;
}

.nav-menu-list li {
	position: relative;
	white-space: nowrap;
}

.nav-menu-list a {
	color: #94a3b8;
	font-weight: 500;
	font-size: 13px;
	line-height: 1.5;
	padding: 4px 13px;
	border-radius: 8px;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	transition: color 0.15s ease, background-color 0.15s ease;
}

.nav-menu-list a:hover,
.nav-item-has-dropdown:hover > a,
.nav-item-has-dropdown:focus-within > a {
	color: #ffffff;
	background-color: rgba(148, 163, 184, 0.14);
}

.nav-menu-list a:focus-visible,
.header-search-submit:focus-visible {
	outline: 2px solid #818cf8;
	outline-offset: 2px;
}

.nav-item-has-dropdown > a {
	cursor: pointer;
}

/* Hover bridge so the dropdown does not close while the mouse crosses the gap */
.nav-item-has-dropdown::after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	top: 100%;
	height: 12px;
}

.nav-caret {
	width: 0;
	height: 0;
	border-left: 4px solid transparent;
	border-right: 4px solid transparent;
	border-top: 4px solid currentColor;
	transition: transform 0.2s ease;
}

.nav-item-has-dropdown:hover .nav-caret,
.nav-item-has-dropdown:focus-within .nav-caret {
	transform: rotate(180deg);
}

.nav-dropdown-menu {
	position: absolute;
	top: calc(100% + 10px);
	left: 0;
	background-color: #ffffff;
	border: 0;
	border-radius: 10px;
	box-shadow: 0 12px 32px rgba(15, 23, 42, 0.28);
	list-style: none;
	margin: 0;
	padding: 8px;
	width: max-content;
	min-width: 190px;
	max-width: calc(100vw - 32px);
	/* One column only. Height follows the screen; extra categories scroll with the mouse wheel / touch (no visible scrollbar). */
	display: block;
	max-height: calc(100vh - 80px);
	overflow-y: auto;
	overscroll-behavior: contain;
	scrollbar-width: none;
	-ms-overflow-style: none;
	opacity: 0;
	visibility: hidden;
	transform: translateY(6px);
	transition: opacity 0.16s ease, transform 0.16s ease, visibility 0.16s ease;
	z-index: 1000;
}

.nav-dropdown-menu::-webkit-scrollbar {
	display: none;
}

.nav-item-has-dropdown:hover .nav-dropdown-menu,
.nav-item-has-dropdown:focus-within .nav-dropdown-menu {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
}

.nav-dropdown-menu a {
	display: block;
	padding: 7px 10px;
	border-radius: 6px;
	background: transparent;
	color: #1e293b;
	font-size: 14px;
	font-weight: 500;
	line-height: 1.5;
}

.nav-dropdown-menu a:hover,
.nav-dropdown-menu a:focus-visible {
	background-color: #f1f5f9;
	color: #4f46e5;
}

.header-search {
	flex-shrink: 0;
	width: 250px;
}

.search-form-header {
	margin: 0;
}

.search-input-wrapper {
	display: flex;
	background-color: #1e293b;
	border: 1px solid #334155;
	border-radius: 10px;
	overflow: hidden;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.search-input-wrapper:focus-within {
	border-color: #6366f1;
	box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.25);
}

.header-search-input {
	flex: 1;
	min-width: 0;
	background: transparent;
	border: 0;
	outline: 0;
	color: #e2e8f0;
	font-family: inherit;
	font-size: 13px;
	line-height: 1.5;
	padding: 5px 12px;
	-webkit-appearance: none;
	appearance: none;
}

.header-search-input::placeholder {
	color: #64748b;
}

.header-search-input::-webkit-search-cancel-button {
	display: none;
}

.header-search-submit {
	background-color: #6366f1;
	color: #ffffff;
	border: 0;
	padding: 0 12px;
	font-family: inherit;
	font-size: 13px;
	font-weight: 600;
	cursor: pointer;
	transition: background-color 0.15s ease;
}

.header-search-submit:hover {
	background-color: #4f46e5;
}

@media (max-width: 900px) {
	.header-container {
		flex-wrap: wrap;
		gap: 12px 16px;
		padding: 12px 16px;
	}
	.header-brand { order: 1; }
	.header-search { order: 2; flex: 1; width: auto; min-width: 180px; }
	.header-nav { order: 3; width: 100%; margin-right: 0; }
	.nav-menu-list { flex-wrap: wrap; }
}

/* ==========================================
   3. HERO SECTION
   ========================================== */

.hero-section {
	background: transparent;
	padding: 44px 0 38px;
	border-bottom: 0;
	text-align: center;
}

.hero-title {
	font-family: var(--font-head);
	font-size: 28px;
	font-weight: 700;
	color: #1e293b;
	margin: 0 0 14px 0;
	letter-spacing: -0.01em;
	line-height: 1.25;
}

.hero-subtitle {
	font-size: 15px;
	color: #64748b;
	max-width: 700px;
	margin: 0 auto;
	line-height: 1.75;
}

.hero-subtitle strong {
	color: #1e293b;
}

/* ==========================================
   4. ROM DIRECTORY & SECTION CARDS
   ========================================== */

.roms-section {
	margin-top: 0;
	margin-bottom: 32px;
}

/* Black section bars (Latest / Most Popular) */
.section-header-block {
	padding: 12px 20px;
	border-radius: 12px;
	margin-bottom: 18px;
	display: flex;
	justify-content: space-between;
	align-items: center;
	line-height: 1.4;
}

.section-title {
	font-family: var(--font-head);
	font-size: 16px;
	font-weight: 700;
	margin: 0;
	letter-spacing: 0;
	text-transform: none;
	line-height: 1.4;
}

.see-all-link {
	font-size: 13px;
	font-weight: 600;
	line-height: 1.4;
	color: #ffffff;
	text-decoration: none;
	transition: color 0.15s ease;
	display: inline-flex;
	align-items: center;
}

.see-all-link:hover {
	color: #a5b4fc;
}

/* Orange gradient bars (Emulators / FAQ) */
.section-header-block.bg-orange {
	background: linear-gradient(90deg, #ef4444 0%, #f97316 100%);
	color: #ffffff;
	justify-content: center;
	border-radius: 12px 12px 0 0;
	margin-bottom: 0;
	padding: 16px 20px;
}

.bg-orange .section-title {
	font-size: 17px;
	text-align: center;
}

/* Telegram join banner */
.telegram-banner {
	display: flex;
	align-items: center;
	gap: 16px;
	background: linear-gradient(90deg, #0284c7 0%, #00c2ff 100%);
	color: #ffffff;
	border-radius: 14px;
	padding: 22px 24px;
	margin: 0 0 32px 0;
	box-shadow: 0 10px 24px rgba(2, 132, 199, 0.28);
}

.telegram-banner-icon {
	flex: 0 0 52px;
	width: 52px;
	height: 52px;
	border-radius: 50%;
	background-color: rgba(255, 255, 255, 0.2);
	display: flex;
	align-items: center;
	justify-content: center;
	color: #ffffff;
}

.telegram-banner-text {
	flex: 1;
	min-width: 0;
}

.telegram-banner-title {
	font-family: var(--font-head);
	font-size: 17px;
	font-weight: 700;
	margin: 0 0 3px 0;
	color: #ffffff;
}

.telegram-banner-desc {
	margin: 0;
	font-size: 14px;
	line-height: 1.5;
	color: rgba(255, 255, 255, 0.92);
}

.telegram-banner-btn {
	flex-shrink: 0;
	background-color: #ffffff;
	color: #0284c7;
	font-weight: 700;
	font-size: 15px;
	padding: 12px 28px;
	border-radius: 9999px;
	transition: box-shadow 0.15s ease, color 0.15s ease;
}

.telegram-banner-btn:hover {
	color: #0369a1;
	box-shadow: 0 6px 16px rgba(2, 6, 23, 0.2);
}

@media (max-width: 640px) {
	.telegram-banner { flex-wrap: wrap; padding: 18px; }
	.telegram-banner-btn { width: 100%; text-align: center; }
}

/* Responsive Custom ROM Grids */
.rom-grid {
	display: grid;
	gap: 14px;
}

.grid-6-cols {
	grid-template-columns: repeat(2, 1fr);
}
@media (min-width: 640px) {
	.grid-6-cols { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 768px) {
	.grid-6-cols { grid-template-columns: repeat(4, 1fr); }
}
@media (min-width: 1024px) {
	.grid-6-cols { grid-template-columns: repeat(6, 1fr); }
}

/* Sidebar Listing Grid (All ROMs / Category / Search) */
.grid-sidebar-cols {
	grid-template-columns: repeat(2, 1fr);
}
@media (min-width: 480px) {
	.grid-sidebar-cols { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 900px) {
	.grid-sidebar-cols { grid-template-columns: repeat(4, 1fr); }
}
@media (min-width: 1200px) {
	.grid-sidebar-cols { grid-template-columns: repeat(6, 1fr); }
}

.grid-12-cols {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 14px;
}
@media (min-width: 640px) {
	.grid-12-cols { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 768px) {
	.grid-12-cols { grid-template-columns: repeat(4, 1fr); }
}
@media (min-width: 1024px) {
	.grid-12-cols { grid-template-columns: repeat(6, 1fr); }
}

/* ROM Cards */
.rom-card {
	background-color: #ffffff;
	border: 1px solid #e2e8f0;
	border-radius: 12px;
	overflow: hidden;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.rom-card:hover {
	border-color: #6366f1;
	box-shadow: 0 0 0 1px #6366f1, 0 10px 22px rgba(99, 102, 241, 0.14);
}

.card-link {
	display: flex;
	flex-direction: column;
	height: 100%;
	color: inherit;
}

.card-link:hover {
	color: inherit;
}

.card-image-wrapper {
	position: relative;
	aspect-ratio: 3 / 4;
	background: linear-gradient(135deg, #f1f5f9, #e2e8f0);
	width: 100%;
	overflow: hidden;
}

.card-thumbnail {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.card-placeholder-image {
	display: flex;
	align-items: center;
	justify-content: center;
	height: 100%;
	width: 100%;
	color: #94a3b8;
	font-size: 14px;
}

.card-info {
	padding: 12px 12px 14px;
	text-align: left;
}

.card-title {
	font-family: var(--font-head);
	font-size: 13px;
	font-weight: 600;
	color: #1e293b;
	margin: 0 0 6px 0;
	line-height: 1.35;
	overflow: hidden;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
}

.card-badge {
	display: block;
	background: none;
	color: #64748b;
	font-size: 12px;
	font-weight: 500;
	padding: 0;
	border-radius: 0;
}

.no-posts-found {
	background: #ffffff;
	border: 1px dashed #cbd5e1;
	border-radius: 8px;
	padding: 40px;
	text-align: center;
	color: #64748b;
}

/* ==========================================
   5. EMULATORS SECTION (2X2 Grid Block)
   ========================================== */

.emulators-section {
	margin-top: 0;
	margin-bottom: 32px;
}

.emulators-grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 0;
	background: #ffffff;
	border: 1px solid #e2e8f0;
	border-top: 0;
	border-radius: 0 0 12px 12px;
	overflow: hidden;
}

@media (min-width: 768px) {
	.emulators-grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

.emulator-box {
	background-color: #ffffff;
	border: 0;
	border-bottom: 1px solid #e2e8f0;
	border-radius: 0;
	padding: 24px 24px 26px;
	box-shadow: none;
}

.emulator-box:last-child {
	border-bottom: 0;
}

@media (min-width: 768px) {
	.emulator-box:nth-child(odd) { border-right: 1px solid #e2e8f0; }
	.emulator-box:nth-last-child(-n+2) { border-bottom: 0; }
}

.emu-icon-title {
	display: flex;
	align-items: center;
	margin-bottom: 10px;
}

.emu-icon-title h3 {
	font-family: var(--font-head);
	font-size: 17px;
	margin: 0;
	color: #6366f1;
	font-weight: 700;
}

.emu-logo,
.emu-meta {
	display: none;
}

.emu-desc {
	font-size: 14px;
	color: #64748b;
	margin: 0;
	line-height: 1.75;
}

/* ==========================================
   6. FAQS SECTION
   ========================================== */

.faqs-section {
	margin-top: 0;
	margin-bottom: 56px;
}

.faq-container {
	background-color: #ffffff;
	border: 1px solid #e2e8f0;
	border-top: 0;
	border-radius: 0 0 12px 12px;
	padding: 0;
	overflow: hidden;
}

.faq-row {
	display: grid;
	grid-template-columns: 1fr;
	gap: 0;
	border-bottom: 1px solid #e2e8f0;
	padding: 0;
	margin: 0;
}

.faq-row:last-child {
	border-bottom: 0;
}

.faq-item {
	display: flex;
	flex-direction: column;
	padding: 22px 24px;
}

.faq-item + .faq-item {
	border-top: 1px solid #e2e8f0;
}

@media (min-width: 768px) {
	.faq-row { grid-template-columns: repeat(2, 1fr); }
	.faq-item + .faq-item { border-top: 0; }
	.faq-row .faq-item:nth-child(odd) { border-right: 1px solid #e2e8f0; }
}

.faq-question {
	font-family: var(--font-head);
	font-size: 15px;
	font-weight: 700;
	color: #1e293b;
	margin: 0 0 8px 0;
}

.faq-answer {
	font-size: 14px;
	color: #64748b;
	margin: 0;
	line-height: 1.75;
}

/* ==========================================
   7. SINGLE ROM VIEW (Inner Layout)
   ========================================== */
.single-rom-page {
	padding-top: 30px;
	padding-bottom: 60px;
}

.rom-breadcrumbs {
	font-size: 14px;
	color: #64748b;
	margin-bottom: 20px;
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 6px;
}

.rom-breadcrumbs a {
	color: #64748b;
}

.rom-breadcrumbs a:hover {
	color: #6366f1;
}

.crumb-separator {
	color: #cbd5e1;
}

.crumb-current {
	color: #0f172a;
	font-weight: 500;
}

/* Information Container Flexbox */
.main-info-block {
	background-color: #ffffff;
	border: 1px solid #e2e8f0;
	border-radius: 8px;
	padding: 25px;
	display: flex;
	flex-direction: column;
	gap: 30px;
	margin-bottom: 40px;
}

@media (min-width: 768px) {
	.main-info-block {
		flex-direction: row;
	}
}

.info-left {
	flex: 0 0 240px;
	max-width: 240px;
	align-self: flex-start;
	width: 100%;
}

@media (max-width: 767px) {
	.info-left {
		max-width: 100%;
		display: flex;
		justify-content: center;
	}
}

.single-cover-image {
	width: 100%;
	max-width: 240px;
	height: auto;
	border-radius: 6px;
	box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
	border: 1px solid #e2e8f0;
}

.single-cover-placeholder {
	width: 240px;
	height: 330px;
	background-color: #f1f5f9;
	color: #94a3b8;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	border-radius: 6px;
	border: 1px solid #cbd5e1;
	font-size: 16px;
	text-align: center;
}

.info-right {
	flex: 1;
}

.title-row {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 15px;
	margin-bottom: 12px;
	flex-wrap: wrap;
}

.single-rom-title {
	font-size: 26px;
	font-weight: 700;
	color: #0f172a;
	margin: 0;
	line-height: 1.2;
}

.format-badge {
	display: inline-block;
	font-size: 12px;
	font-weight: 700;
	padding: 4px 12px;
	border-radius: 4px;
	letter-spacing: 0.05em;
}

.nsp-badge {
	background-color: #eff6ff;
	color: #1d4ed8;
	border: 1px solid #bfdbfe;
}

.xci-badge {
	background-color: #fef2f2;
	color: #dc2626;
	border: 1px solid #fecaca;
}

.rating-row {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-bottom: 20px;
}

.rating-row .stars {
	font-size: 16px;
}

.rating-row .rating-text {
	font-size: 13px;
	color: #64748b;
}

/* Interactive Star Rating Widget */
.romsnsp-stars {
	display: inline-flex;
	gap: 2px;
}

.romsnsp-star {
	font-size: 18px;
	line-height: 1;
	color: #d1d5db;
	cursor: pointer;
	transition: color 0.15s ease, transform 0.15s ease;
	user-select: none;
}

.romsnsp-star.is-filled {
	color: #f59e0b;
}

.romsnsp-rating-widget:not(.is-rated) .romsnsp-star:hover {
	transform: scale(1.15);
}

.romsnsp-rating-widget.is-rated .romsnsp-star {
	cursor: default;
}

.romsnsp-rating-widget .rating-text.romsnsp-thanks {
	color: #16a34a;
	font-weight: 600;
}

/* Specs Grid styling (2-column key/value layout) */
.spec-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	margin-bottom: 25px;
	border-top: 1px solid #f1f5f9;
}

.spec-cell {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 13px 14px;
	border-bottom: 1px solid #f1f5f9;
}

.spec-cell:nth-child(odd) {
	border-right: 1px solid #f1f5f9;
}

.spec-cell-full {
	grid-column: 1 / -1;
	border-right: none;
}

.spec-label {
	color: #64748b;
	font-weight: 500;
	font-size: 14px;
	flex-shrink: 0;
}

.spec-value {
	color: #1e293b;
	font-size: 14px;
	text-align: right;
}

.spec-value-strong {
	font-weight: 700;
	color: #0f172a;
}

.spec-value-link {
	font-weight: 600;
	color: #4f46e5;
}

.spec-value-link a {
	color: #4f46e5;
	text-decoration: none;
	transition: color 0.2s ease;
}

.spec-value-link a:hover {
	color: #6366f1;
	text-decoration: underline;
}

@media (max-width: 560px) {
	.spec-grid {
		grid-template-columns: 1fr;
	}
	.spec-cell:nth-child(odd) {
		border-right: none;
	}
}

.firmware-tag {
	background-color: #6366f1;
	color: #ffffff;
	font-size: 11px;
	font-weight: 600;
	padding: 2px 8px;
	border-radius: 4px;
}

.title-id-code {
	font-family: 'SFMono-Regular', Consolas, "Liberation Mono", Menlo, monospace;
	background-color: #f1f5f9;
	color: #334155;
	padding: 2px 6px;
	border-radius: 4px;
	font-size: 12px;
}

/* Green Download Button */
.download-button-wrapper {
	margin-top: 25px;
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
}

.btn-download-green {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background-color: #10b981;
	color: #ffffff;
	font-size: 16px;
	font-weight: 600;
	padding: 12px 32px;
	border-radius: 6px;
	border: none;
	cursor: pointer;
	transition: background-color 0.15s ease, transform 0.1s ease;
	box-shadow: 0 4px 12px rgba(16, 185, 129, 0.2);
}

.btn-download-green:hover {
	background-color: #059669;
	color: #ffffff;
	transform: translateY(-1px);
}

.btn-download-green:active {
	transform: translateY(1px);
}

.btn-download-disabled {
	display: inline-block;
	background-color: #cbd5e1;
	color: #64748b;
	font-size: 16px;
	font-weight: 600;
	padding: 12px 32px;
	border-radius: 6px;
	border: none;
	cursor: not-allowed;
}

/* Screenshots Block */
.screenshots-block {
	margin-bottom: 40px;
}

.block-title {
	font-size: 20px;
	font-weight: 600;
	color: #0f172a;
	margin: 0 0 20px 0;
	padding-bottom: 10px;
	border-bottom: 2px solid #6366f1;
	display: inline-block;
}

.screenshot-grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 16px;
}

@media (min-width: 640px) {
	.screenshot-grid {
		grid-template-columns: repeat(3, 1fr);
	}
}

.screenshot-item {
	position: relative;
	aspect-ratio: 16 / 9;
	background-color: #f1f5f9;
	border-radius: 10px;
	overflow: hidden;
	border: 1px solid #e2e8f0;
	box-shadow: 0 2px 6px rgba(15, 23, 42, 0.06);
	transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.3s ease, border-color 0.3s ease;
}

.screenshot-item:hover {
	transform: translateY(-4px);
	box-shadow: 0 12px 22px rgba(15, 23, 42, 0.16);
	border-color: #6366f1;
}

.screenshot-item::after {
	content: "";
	position: absolute;
	inset: 0;
	background: rgba(15, 23, 42, 0.15);
	opacity: 0;
	transition: opacity 0.25s ease;
	pointer-events: none;
}

.screenshot-item:hover::after {
	opacity: 1;
}

.game-screenshot {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.screenshot-item:hover .game-screenshot {
	transform: scale(1.06);
}

/* About Game Description Block */
.about-game-block {
	background-color: #ffffff;
	border: 1px solid #e2e8f0;
	border-radius: 8px;
	padding: 25px;
	margin-bottom: 40px;
}

.game-description-content {
	font-size: 15px;
	line-height: 1.7;
	color: #334155;
}

.game-description-content p {
	margin-top: 0;
	margin-bottom: 16px;
}

.game-description-content p:last-child {
	margin-bottom: 0;
}

/* Comments Template Area */
.comments-block-wrapper {
	background-color: #ffffff;
	border: 1px solid #e2e8f0;
	border-radius: 8px;
	padding: 25px;
}

/* Comment list (existing comments) */
.comments-count-title {
	font-size: 18px;
	font-weight: 700;
	color: #0f172a;
	margin: 0 0 20px 0;
}
.romsnsp-comment-list {
	list-style: none;
	margin: 0 0 10px 0;
	padding: 0;
}
.romsnsp-comment-list .comment,
.romsnsp-comment-list .pingback,
.romsnsp-comment-list .trackback {
	list-style: none;
}
.romsnsp-comment-list ol.children {
	list-style: none;
	margin-left: 28px;
	padding-left: 16px;
	border-left: 2px solid #f1f5f9;
}
.romsnsp-comment-list .comment-body {
	display: flex;
	gap: 14px;
	padding: 18px 0;
	border-bottom: 1px solid #f1f5f9;
}
.romsnsp-comment-list .comment-author .avatar {
	border-radius: 50%;
	flex-shrink: 0;
}
.romsnsp-comment-list .comment-author .fn {
	font-weight: 700;
	font-style: normal;
	color: #0f172a;
	font-size: 14px;
}
.romsnsp-comment-list .comment-metadata {
	font-size: 11px;
	color: #94a3b8;
	margin-bottom: 6px;
}
.romsnsp-comment-list .comment-metadata a {
	color: #94a3b8;
	text-decoration: none;
}
.romsnsp-comment-list .comment-content p {
	font-size: 14px;
	color: #334155;
	line-height: 1.7;
	margin: 0 0 8px 0;
}
.romsnsp-comment-list .reply a {
	display: inline-block;
	font-size: 12px;
	font-weight: 600;
	color: #6366f1;
	text-decoration: none;
	border: 1px solid #fecdd3;
	padding: 4px 12px;
	border-radius: 6px;
	transition: background-color 0.2s ease, color 0.2s ease;
}
.romsnsp-comment-list .reply a:hover {
	background-color: #6366f1;
	color: #ffffff;
}
.romsnsp-comments-closed {
	font-size: 14px;
	color: #64748b;
}

/* Leave a Reply form */
.romsnsp-reply-title {
	font-size: 20px;
	font-weight: 700;
	color: #0f172a;
	margin: 0 0 8px 0;
}
.romsnsp-comment-notes {
	font-size: 13px;
	color: #64748b;
	margin: 0 0 18px 0;
}
.romsnsp-comment-notes .required {
	color: #6366f1;
}
.romsnsp-comment-form {
	margin: 0;
}
.romsnsp-comment-field-row {
	margin: 0 0 16px 0;
}
.romsnsp-comment-field-row textarea {
	width: 100%;
	min-height: 140px;
	padding: 14px 16px;
	font-size: 14px;
	font-family: inherit;
	color: #1e293b;
	background-color: #ffffff;
	border: 1px solid #e2e8f0;
	border-radius: 8px;
	resize: vertical;
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
	box-sizing: border-box;
}
.romsnsp-comment-field-row textarea:focus {
	outline: none;
	border-color: #6366f1;
	box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}
.romsnsp-comment-form .comment-form-fields-wrap,
.romsnsp-comment-form {
	display: block;
}
.romsnsp-field-third {
	display: inline-block;
	width: calc(33.333% - 8px);
	vertical-align: top;
	margin: 0 12px 16px 0;
	box-sizing: border-box;
}
.romsnsp-field-third:last-of-type {
	margin-right: 0;
}
.romsnsp-field-third input {
	width: 100%;
	padding: 12px 14px;
	font-size: 14px;
	font-family: inherit;
	color: #1e293b;
	background-color: #ffffff;
	border: 1px solid #e2e8f0;
	border-radius: 8px;
	box-sizing: border-box;
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.romsnsp-field-third input:focus {
	outline: none;
	border-color: #6366f1;
	box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}
.romsnsp-cookies-consent {
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 0 0 18px 0;
	clear: both;
}
.romsnsp-cookies-consent label {
	font-size: 12px;
	color: #64748b;
}
.romsnsp-submit-btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 13px 28px;
	font-size: 14px;
	font-weight: 700;
	color: #ffffff;
	background-color: #0f172a;
	border: none;
	border-radius: 8px;
	cursor: pointer;
	transition: background-color 0.2s ease, transform 0.2s ease;
}
.romsnsp-submit-btn:hover {
	background-color: #6366f1;
	transform: translateY(-2px);
}

@media (max-width: 640px) {
	.romsnsp-field-third {
		width: 100%;
		margin-right: 0;
	}
}

/* ==========================================
   8. FOOTER STYLES
   ========================================== */

.site-footer {
	background-color: #1a1a2e;
	color: #8892a4;
	padding-top: 42px;
	border-top: 0;
}

.footer-container {
	display: grid;
	grid-template-columns: 1fr;
	gap: 36px;
	max-width: 1200px;
	margin: 0 auto;
	padding: 0 20px 50px 20px;
}

@media (min-width: 768px) {
	.footer-container {
		grid-template-columns: 2fr 1fr 1fr;
		gap: 48px;
	}
}

.brand-desc-col {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
}

.footer-brand-logo {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	color: #ffffff;
	margin: 0 0 14px 0;
}

.footer-brand-logo:hover {
	color: #ffffff;
}

.footer-console-icon {
	flex-shrink: 0;
}

.footer-brand-text {
	font-family: var(--font-head);
	font-size: 22.5px;
	font-weight: 700;
	letter-spacing: -0.01em;
	line-height: 1.2;
}

.footer-brand-text .logo-highlight {
	color: #6366f1;
}

.footer-brand-description {
	font-size: 13px;
	line-height: 1.6;
	color: #8892a4;
	margin: 0 0 16px 0;
	max-width: 360px;
}

.footer-social-wrapper {
	display: flex;
	gap: 8px;
}

.social-circle-icon {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 30px;
	height: 30px;
	border-radius: 50%;
	background-color: #2c2c3e;
	color: #8892a4;
	transition: background-color 0.15s ease, color 0.15s ease;
}

.social-circle-icon svg {
	width: 14px;
	height: 14px;
}

.social-circle-icon:hover {
	background-color: #6366f1;
	color: #ffffff;
}

.footer-col-title {
	font-family: var(--font-head);
	font-size: 13px;
	font-weight: 700;
	line-height: 1.5;
	color: #ffffff;
	margin: 0 0 20px 0;
	text-transform: none;
	letter-spacing: 0;
	padding: 0;
}

.footer-col-title::after {
	display: none;
}

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

.footer-menu-links a {
	display: block;
	color: #8892a4;
	font-size: 13px;
	line-height: 1.5;
	transition: color 0.15s ease;
}

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

/* Bottom Strip */
.footer-copyright-strip {
	background-color: #12121f;
	border-top: 0;
	padding: 13px 0;
}

.copyright-text {
	font-size: 13px;
	line-height: 1.5;
	color: #5a6078;
	margin: 0;
}

/* ==========================================
   9. ARCHIVE & CATEGORIES SIDEBAR LAYOUT
   ========================================== */
.archive-rom-page {
	background-color: #f8fafc;
	padding: 30px 0;
}

.archive-header-row {
	text-align: center;
	margin-bottom: 40px;
	padding: 0 20px;
}

.archive-title {
	font-size: 32px;
	font-weight: 800;
	color: #0f172a;
	margin: 0 0 10px 0;
	letter-spacing: -0.02em;
}

.archive-subtitle {
	color: #64748b;
	font-size: 15px;
	max-width: 650px;
	margin: 0 auto;
	line-height: 1.6;
}

.archive-flex-container {
	display: flex;
	flex-direction: column;
	gap: 30px;
	max-width: 1200px;
	margin: 0 auto;
	padding: 0 20px;
}

@media (min-width: 1024px) {
	.archive-flex-container {
		flex-direction: row;
		align-items: flex-start;
	}
}

.archive-sidebar {
	width: 100%;
}

@media (min-width: 1024px) {
	.archive-sidebar {
		width: 260px;
		flex-shrink: 0;
		position: sticky;
		top: 100px;
	}
}

.categories-sidebar-box {
	background: #ffffff;
	border: 1px solid #e2e8f0;
	border-radius: 12px;
	padding: 20px;
	box-shadow: 0 1px 3px rgba(0,0,0,0.02);
}

.sidebar-heading {
	font-size: 13px;
	font-weight: 700;
	color: #1e293b;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	margin: 0 0 15px 0;
	border-bottom: 1px solid #f1f5f9;
	padding-bottom: 10px;
	display: flex;
	align-items: center;
	gap: 8px;
}

.sidebar-categories-list {
	list-style: none;
	padding: 0;
	margin: 0;
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.sidebar-cat-link {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 10px 14px;
	border-radius: 8px;
	font-size: 13px;
	font-weight: 600;
	text-decoration: none;
	color: #4b5563;
	border: 1px solid transparent;
	transition: all 0.2s ease;
}

.sidebar-cat-link:hover {
	background-color: #f8fafc;
	color: #0f172a;
}

.sidebar-cat-link.active-cat {
	border-color: #ddd6fe;
	background-color: #f5f3ff;
	color: #7c3aed;
}

.cat-counter {
	font-size: 10px;
	background-color: #f1f5f9;
	color: #94a3b8;
	padding: 2px 6px;
	border-radius: 4px;
	font-family: monospace;
	font-weight: 600;
	transition: all 0.2s ease;
}

.sidebar-cat-link.active-cat .cat-counter {
	background-color: #ddd6fe;
	color: #6d28d9;
}

.archive-main-content {
	flex: 1;
	width: 100%;
}

.archive-inner-white-box {
	background: #ffffff;
	border: 1px solid #e2e8f0;
	border-radius: 12px;
	padding: 24px;
	box-shadow: 0 1px 3px rgba(0,0,0,0.02);
}

.archive-list-meta-bar {
	display: flex;
	justify-content: space-between;
	align-items: center;
	border-bottom: 1px solid #f1f5f9;
	padding-bottom: 15px;
	margin-bottom: 20px;
}

.archive-list-heading {
	font-size: 12px;
	font-weight: 700;
	color: #64748b;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	margin: 0;
}

.results-found-label {
	font-size: 11px;
	color: #94a3b8;
	font-weight: 600;
}

.switch-tag-badge {
	position: absolute;
	top: 10px;
	left: 10px;
	background: linear-gradient(135deg, #ff6b00, #e60012);
	color: white;
	font-size: 8px;
	font-weight: 900;
	padding: 3px 7px;
	border-radius: 5px;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	z-index: 10;
	box-shadow: 0 3px 8px rgba(230, 0, 18, 0.35);
}

.archive-pagination {
	margin-top: 45px;
	display: flex;
	justify-content: center;
	gap: 6px;
	flex-wrap: wrap;
}

.archive-pagination a, .archive-pagination span {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 36px;
	height: 36px;
	padding: 0 12px;
	border-radius: 6px;
	border: 1px solid #e2e8f0;
	font-size: 13px;
	font-weight: 600;
	text-decoration: none;
	color: #4b5563;
	background-color: #ffffff;
	transition: all 0.2s ease;
}

.archive-pagination a:hover {
	background-color: #f8fafc;
	border-color: #cbd5e1;
	color: #0f172a;
}

.archive-pagination .current {
	background-color: #6366f1;
	border-color: #6366f1;
	color: #ffffff;
}

/* 4-Columns Grid */
.grid-4-cols {
	display: grid !important;
	grid-template-columns: repeat(2, 1fr) !important;
	gap: 20px !important;
}
@media (min-width: 640px) {
	.grid-4-cols { grid-template-columns: repeat(2, 1fr) !important; }
}
@media (min-width: 768px) {
	.grid-4-cols { grid-template-columns: repeat(3, 1fr) !important; }
}
@media (min-width: 1024px) {
	.grid-4-cols { grid-template-columns: repeat(4, 1fr) !important; }
}

/* General Widget list style overrides for category sidebars */
.widget_categories ul, .widget_archive ul, .categories-sidebar-box ul, .sidebar-categories-list {
	list-style: none !important;
	padding: 0 !important;
	margin: 0 !important;
	display: flex !important;
	flex-direction: column !important;
	gap: 6px !important;
}

.widget_categories li, .widget_archive li, .sidebar-categories-list li {
	margin: 0 !important;
	padding: 0 !important;
	list-style-type: none !important;
}

.widget_categories a, .widget_archive a, .sidebar-cat-link {
	display: flex !important;
	justify-content: space-between !important;
	align-items: center !important;
	padding: 10px 14px !important;
	border-radius: 8px !important;
	font-size: 13px !important;
	font-weight: 600 !important;
	text-decoration: none !important;
	color: #4b5563 !important;
	border: 1px solid transparent !important;
	background-color: #ffffff !important;
	transition: all 0.2s ease !important;
}

.widget_categories a:hover, .widget_archive a:hover, .sidebar-cat-link:hover {
	background-color: #f8fafc !important;
	color: #0f172a !important;
}

/* ==========================================
   10. ROM LISTING PAGE ("See all" / "View All")
   ========================================== */
.rom-listing-page {
	padding: 24px 0 72px;
}

.rom-listing-page .roms-section {
	margin-bottom: 0;
}

.rom-pagination {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 6px;
	margin-top: 34px;
}

.rom-pagination .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 40px;
	height: 40px;
	padding: 0 12px;
	background-color: #ffffff;
	border-radius: 10px;
	box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
	color: #475569;
	font-size: 14px;
	font-weight: 500;
	line-height: 1;
	transition: background-color 0.15s ease, color 0.15s ease;
}

.rom-pagination a.page-numbers:hover {
	background-color: #eef2ff;
	color: #4f46e5;
}

.rom-pagination a.page-numbers:focus-visible {
	outline: 2px solid #818cf8;
	outline-offset: 2px;
}

.rom-pagination .page-numbers.current {
	background-color: #6366f1;
	color: #ffffff;
	font-weight: 700;
	box-shadow: 0 4px 10px rgba(99, 102, 241, 0.35);
}

@media (max-width: 480px) {
	.rom-pagination .page-numbers { min-width: 36px; height: 36px; padding: 0 8px; }
}

/* ==========================================
   11. SINGLE ROM PAGE (post layout)
   ========================================== */
.single-rom-page {
	padding-top: 24px;
	padding-bottom: 72px;
}

.rom-breadcrumbs {
	font-size: 14px;
	color: #64748b;
	margin-bottom: 20px;
}

.rom-breadcrumbs a {
	color: #64748b;
}

.rom-breadcrumbs a:hover {
	color: #6366f1;
}

.crumb-separator {
	color: #94a3b8;
	margin: 0 6px;
}

.crumb-current {
	color: #64748b;
	font-weight: 400;
}

/* All post cards share one look */
.main-info-block,
.screenshots-block,
.about-game-block,
.related-games-block,
.comments-block-wrapper {
	background-color: #ffffff;
	border: 1px solid #e2e8f0;
	border-radius: 12px;
	padding: 24px;
	margin: 0 0 24px 0;
}

.comments-block-wrapper {
	margin-bottom: 0;
}

.single-rom-page .telegram-banner {
	margin-bottom: 24px;
}

.block-title {
	display: block;
	font-family: var(--font-head);
	font-size: 18px;
	font-weight: 700;
	color: #1e293b;
	margin: 0 0 18px 0;
	padding: 0 0 14px 0;
	border-bottom: 1px solid #e2e8f0;
}

/* Main info card: cover on the left, details on the right */
.main-info-block {
	display: flex;
	flex-direction: column;
	gap: 28px;
}

@media (min-width: 768px) {
	.main-info-block {
		flex-direction: row;
		align-items: stretch;
	}
}

.info-left {
	flex: 0 0 180px;
	max-width: 180px;
	width: 100%;
	align-self: stretch;
	display: block;
	background-color: #f1f5f9;
	border-radius: 12px;
	overflow: hidden;
}

@media (max-width: 767px) {
	.info-left {
		flex: 0 0 auto;
		align-self: center;
		margin: 0 auto;
	}
}

.single-cover-image {
	display: block;
	width: 100%;
	max-width: none;
	height: auto;
	border: 0;
	border-radius: 0;
	box-shadow: none;
}

.single-cover-placeholder {
	width: 100%;
	height: 270px;
	border: 0;
	border-radius: 0;
}

.info-right {
	flex: 1;
	min-width: 0;
}

/* Title with the format badge underneath */
.title-row {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	justify-content: flex-start;
	gap: 10px;
	margin: 2px 0 12px 0;
}

.single-rom-title {
	font-family: var(--font-head);
	font-size: 24px;
	font-weight: 700;
	color: #1e293b;
	line-height: 1.25;
	letter-spacing: -0.01em;
	margin: 0;
}

.format-badge {
	display: inline-block;
	padding: 3px 12px;
	border-radius: 9999px;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.02em;
	line-height: 1.5;
	background-color: #eef2ff;
	color: #6366f1;
	border: 0;
}

.nsp-badge {
	background-color: #eef2ff;
	color: #6366f1;
	border: 0;
}

.xci-badge {
	background-color: #fef2f2;
	color: #dc2626;
	border: 0;
}

/* Rating */
.rating-row {
	display: flex;
	align-items: center;
	gap: 10px;
	margin: 0 0 18px 0;
}

.romsnsp-stars {
	gap: 2px;
}

.romsnsp-star {
	font-size: 20px;
	color: #d1d5db;
}

.rating-row .rating-text {
	font-size: 14px;
	color: #64748b;
}

.rating-row .rating-text strong {
	font-weight: 600;
	color: #475569;
}

.rating-votes {
	font-size: 13px;
	color: #94a3b8;
}

/* Specs: label on the left, bold value on the right */
.spec-grid {
	grid-template-columns: 1fr 1fr;
	column-gap: 13px;
	border-top: 1px solid #e2e8f0;
	margin-bottom: 20px;
}

.spec-cell {
	padding: 8px 0;
	border-bottom: 1px solid #edf0f4;
	border-right: 0;
}

.spec-cell:nth-child(odd) {
	border-right: 0;
}

.spec-label {
	font-size: 14px;
	font-weight: 400;
	color: #64748b;
}

.spec-value {
	font-size: 14px;
}

.spec-value-strong {
	font-weight: 700;
	color: #1e293b;
}

.spec-value-link,
.spec-value-link a {
	font-weight: 600;
	color: #6366f1;
}

.spec-value-link a:hover {
	color: #4f46e5;
}

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

/* Download buttons */
.download-button-wrapper {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin-top: 20px;
}

.btn-download-green,
.btn-download-disabled {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	height: 46px;
	padding: 0 28px;
	border: 0;
	border-radius: 8px;
	font-family: var(--font-head);
	font-size: 15px;
	font-weight: 700;
	line-height: 1;
	text-decoration: none;
	box-shadow: none;
}

.btn-download-green {
	background-color: #10b981;
	color: #ffffff;
	cursor: pointer;
}

.btn-download-green:hover {
	background-color: #059669;
	color: #ffffff;
	transform: none;
}

.btn-download-green:active {
	transform: translateY(1px);
}

.btn-download-green:focus-visible {
	outline: 2px solid #6ee7b7;
	outline-offset: 2px;
}

.btn-download-disabled {
	background-color: #cbd5e1;
	color: #64748b;
	cursor: not-allowed;
}

/* Screenshots: small 16:9 thumbnails */
.screenshot-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, 224px);
	gap: 14px;
}

@media (max-width: 560px) {
	.screenshot-grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

.screenshot-item {
	aspect-ratio: 16 / 9;
	background-color: #f1f5f9;
	border: 0;
	border-radius: 8px;
	box-shadow: none;
}

.screenshot-item:hover {
	transform: none;
	box-shadow: none;
	border-color: transparent;
}

.screenshot-item:hover .game-screenshot {
	transform: scale(1.04);
}

/* About This Game */
.game-description-content {
	font-size: 15px;
	line-height: 1.75;
	color: #475569;
}

/* Related Games: horizontal row, scrolls left / right */
.related-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding-bottom: 12px;
	margin-bottom: 18px;
	border-bottom: 1px solid #e2e8f0;
}

.related-head .block-title {
	margin: 0;
	padding: 0;
	border: 0;
}

.related-nav {
	display: flex;
	gap: 8px;
}

.related-nav-btn {
	width: 32px;
	height: 32px;
	border: 0;
	border-radius: 50%;
	background-color: #f1f5f9;
	color: #475569;
	font-size: 13px;
	line-height: 1;
	cursor: pointer;
	transition: background-color 0.15s ease, color 0.15s ease;
}

.related-nav-btn:hover {
	background-color: #6366f1;
	color: #ffffff;
}

.related-nav-btn:focus-visible {
	outline: 2px solid #818cf8;
	outline-offset: 2px;
}

@media (hover: none) {
	.related-nav {
		display: none;
	}
}

.related-games-scroll-container {
	display: flex;
	gap: 14px;
	overflow-x: auto;
	overflow-y: hidden;
	padding-bottom: 14px;
	scrollbar-width: thin;
	scrollbar-color: #94a3b8 #f1f5f9;
	-webkit-overflow-scrolling: touch;
}

.related-games-scroll-container::-webkit-scrollbar {
	height: 8px;
}

.related-games-scroll-container::-webkit-scrollbar-track {
	background: #f1f5f9;
	border-radius: 8px;
}

.related-games-scroll-container::-webkit-scrollbar-thumb {
	background: #94a3b8;
	border-radius: 8px;
}

.related-game-card {
	flex: 0 0 140px;
	width: 140px;
}

.related-card-link {
	display: block;
	color: inherit;
}

.related-card-image-wrapper {
	aspect-ratio: 3 / 4;
	background-color: #f1f5f9;
	border-radius: 10px;
	overflow: hidden;
	margin-bottom: 8px;
}

.related-card-thumbnail {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.related-card-placeholder {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	font-size: 24px;
}

.related-card-title {
	font-family: var(--font-head);
	font-size: 13px;
	font-weight: 600;
	color: #1e293b;
	line-height: 1.35;
	margin: 0;
	overflow: hidden;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	transition: color 0.15s ease;
}

.related-card-link:hover .related-card-title {
	color: #6366f1;
}

/* Comments: Leave a Reply */
.romsnsp-reply-title {
	font-family: var(--font-head);
}

.romsnsp-comment-form {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 0 12px;
}

.romsnsp-comment-form > * {
	grid-column: 1 / -1;
}

.romsnsp-comment-form > .romsnsp-field-third {
	grid-column: auto;
	display: block;
	width: auto;
	margin: 0 0 16px 0;
}

@media (max-width: 640px) {
	.romsnsp-comment-form > .romsnsp-field-third {
		grid-column: 1 / -1;
	}
}

.romsnsp-comment-field-row textarea,
.romsnsp-field-third input {
	border-radius: 4px;
}

.romsnsp-submit-btn {
	font-family: var(--font-head);
	background-color: #0d0d0d;
	border-radius: 4px;
}


/* ==========================================
   12. CATEGORY, TAG & SEARCH PAGES
   ========================================== */
.rom-archive-page {
	padding: 40px 0 72px;
}

.rom-archive-head {
	text-align: center;
	margin-bottom: 44px;
}

.rom-archive-title {
	font-family: var(--font-head);
	font-size: 24px;
	font-weight: 700;
	color: #1e293b;
	line-height: 1.25;
	letter-spacing: -0.01em;
	margin: 0 0 14px 0;
}

.rom-archive-title .search-term {
	color: #6366f1;
}

.rom-archive-desc {
	max-width: 680px;
	margin: 0 auto;
	font-size: 15px;
	line-height: 1.75;
	color: #64748b;
}

.rom-archive-desc p {
	margin: 0;
}

/* Search results: just the title and the grid */
.rom-search-page {
	padding-top: 32px;
}

.rom-search-page .rom-archive-head {
	margin-bottom: 30px;
}

.rom-search-page .rom-archive-title {
	margin-bottom: 0;
}

/* Category page: list on the left, ROMs on the right */
.rom-archive-layout {
	display: flex;
	flex-direction: column;
	gap: 28px;
}

@media (min-width: 1024px) {
	.rom-archive-layout {
		flex-direction: row;
		align-items: flex-start;
	}
}

.rom-archive-main {
	flex: 1;
	min-width: 0;
	width: 100%;
}

.grid-archive-cols {
	grid-template-columns: repeat(2, 1fr);
}

@media (min-width: 640px) {
	.grid-archive-cols { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 768px) {
	.grid-archive-cols { grid-template-columns: repeat(4, 1fr); }
}

@media (min-width: 1200px) {
	.grid-archive-cols { grid-template-columns: repeat(6, 1fr); }
}

.cat-sidebar {
	width: 100%;
}

@media (min-width: 1024px) {
	.cat-sidebar {
		flex: 0 0 220px;
		width: 220px;
	}
}

.cat-sidebar-title {
	font-family: var(--font-head);
	font-size: 16px;
	font-weight: 700;
	color: #1e293b;
	margin: 0 0 12px 0;
	padding: 0 0 12px 0;
	border-bottom: 1px solid #e2e8f0;
}

.cat-sidebar-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.cat-sidebar-list li {
	margin: 0;
	padding: 0;
}

.cat-sidebar-link {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	padding: 7px 10px;
	border-radius: 8px;
	font-size: 13px;
	font-weight: 500;
	line-height: 1.5;
	color: #64748b;
	transition: background-color 0.15s ease, color 0.15s ease;
}

.cat-sidebar-link:hover {
	background-color: #eef0f6;
	color: #1e293b;
}

.cat-sidebar-count {
	font-size: 12px;
	color: #94a3b8;
}

.cat-sidebar-link.is-active {
	background-color: #e4e6fc;
	color: #6366f1;
	font-weight: 700;
}

.cat-sidebar-link.is-active .cat-sidebar-count {
	background-color: #ffffff;
	color: #64748b;
	font-weight: 600;
	padding: 1px 9px;
	border-radius: 9999px;
}

/* Small screens: categories become wrapping chips above the grid */
@media (max-width: 1023px) {
	.cat-sidebar-list {
		flex-direction: row;
		flex-wrap: wrap;
		gap: 6px;
	}
	.cat-sidebar-link {
		background-color: #ffffff;
		border: 1px solid #e2e8f0;
		padding: 5px 12px;
	}
	.cat-sidebar-link.is-active {
		border-color: #c7caf8;
	}
}

/* Logged-in toolbar: keep the sticky header below the WordPress admin bar */
body.admin-bar .site-header {
	top: 32px;
}

@media (max-width: 782px) {
	body.admin-bar .site-header { top: 46px; }
}

@media (max-width: 600px) {
	body.admin-bar .site-header { top: 0; }
}
