/* ============================
   Base / Reset
   ============================ */
:root {
    --grh-header-bg: #f4f4f5;
    --grh-header-text: #1c1e21;
    --grh-header-border: #e6e6ea;
    --grh-accent: #ff4d6d;
    --grh-accent-2: #2563eb;
    --grh-dark: #10141f;
    --grh-bg: #f7f7f8;
    --grh-card-bg: #ffffff;
    --grh-border: #e6e6ea;
    --grh-text: #1c1e21;
    --grh-text-muted: #6b7280;
    --grh-radius: 10px;
    --grh-max-width: 1200px;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background: var(--grh-bg);
    color: var(--grh-text);
    line-height: 1.55;
}

a { color: var(--grh-accent-2); text-decoration: none; }
a:hover { text-decoration: underline; }

img { max-width: 100%; display: block; }

.grh-container {
    max-width: var(--grh-max-width);
    margin: 0 auto;
    padding: 0 20px;
}

/* ============================
   Header
   ============================ */
.grh-header {
    background: var(--grh-header-bg);
    color: var(--grh-header-text);
    border-bottom: 1px solid var(--grh-header-border);
    padding: 14px 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.grh-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
}

.grh-logo {
    font-size: 1.3rem;
    font-weight: 800;
    letter-spacing: 0.3px;
    color: var(--grh-text);
}
.grh-logo:hover { text-decoration: none; opacity: 0.75; }

.grh-header-right {
    display: flex;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
}

.grh-primary-nav ul {
    list-style: none;
    display: flex;
    gap: 22px;
    margin: 0;
    padding: 0;
}

.grh-primary-nav a {
    color: #45484f;
    font-weight: 600;
    font-size: 0.95rem;
}
.grh-primary-nav a:hover { color: var(--grh-text); text-decoration: none; }

.grh-primary-nav .grh-switch-roms a {
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.grh-switch-roms-icon {
    flex-shrink: 0;
}

.grh-search-form {
    display: flex;
    align-items: center;
    background: #fff;
    border: 1px solid var(--grh-border);
    border-radius: 999px;
    padding: 6px 14px;
    min-width: 220px;
}
.grh-search-form input[type="search"] {
    background: transparent;
    border: none;
    outline: none;
    color: var(--grh-text);
    width: 100%;
    font-size: 0.9rem;
}
.grh-search-form input::placeholder { color: #9a9ea8; }
.grh-search-form button {
    background: none;
    border: none;
    color: #9a9ea8;
    cursor: pointer;
    display: flex;
}

/* Breadcrumb */
.grh-breadcrumb {
    font-size: 0.85rem;
    color: var(--grh-text-muted);
    margin: 18px 0 6px;
}
.grh-breadcrumb a { color: var(--grh-accent-2); }

/* ============================
   Section headings
   ============================ */
.grh-section {
    padding: 30px 0;
}
.grh-section-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 16px;
}
.grh-section-head h2 {
    font-size: 1.3rem;
    margin: 0;
}
.grh-section-head a.grh-see-all {
    font-size: 0.9rem;
    font-weight: 600;
}

/* ============================
   Card grid
   ============================ */
.grh-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
}
@media (min-width: 720px) {
    .grh-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 980px) {
    .grh-grid.grh-grid-wide { grid-template-columns: repeat(4, 1fr); }
}

.grh-card {
    background: var(--grh-card-bg);
    border: 1px solid var(--grh-border);
    border-radius: var(--grh-radius);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.15s ease, transform 0.15s ease;
}
.grh-card:hover {
    box-shadow: 0 8px 22px rgba(0,0,0,0.08);
    transform: translateY(-2px);
}
.grh-card-thumb {
    aspect-ratio: 3 / 4;
    background: #eee;
    overflow: hidden;
    position: relative;
}
.grh-card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.grh-card-date {
    position: absolute;
    top: 8px;
    left: 8px;
    background: rgba(16,20,31,0.75);
    color: #fff;
    font-size: 0.72rem;
    padding: 3px 8px;
    border-radius: 4px;
}
.grh-card-body {
    padding: 12px 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
}
.grh-card-title {
    font-size: 1rem;
    font-weight: 700;
    margin: 0;
    line-height: 1.3;
}
.grh-card-title a { color: var(--grh-text); }
.grh-card-title a:hover { color: var(--grh-accent-2); text-decoration: none; }
.grh-card-excerpt {
    font-size: 0.85rem;
    color: var(--grh-text-muted);
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.grh-card-meta {
    font-size: 0.78rem;
    color: var(--grh-text-muted);
    display: flex;
    gap: 10px;
    margin-top: auto;
}
.grh-badge {
    display: inline-block;
    background: #fff3e0;
    color: #b45309;
    font-size: 0.68rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

/* ============================
   Star ratings
   ============================ */
.grh-rating {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    color: var(--grh-text-muted);
}
.grh-stars-fill {
    display: inline-flex;
    gap: 1px;
    font-size: 1rem;
}
.grh-star-pick {
    position: relative;
    display: inline-block;
    line-height: 1;
}
.grh-star-bg { color: #d8dae0; }
.grh-star-fg {
    position: absolute;
    top: 0;
    left: 0;
    overflow: hidden;
    white-space: nowrap;
    color: #f5a623;
}

/* ============================
   Single article layout
   ============================ */
.grh-article-head {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    flex-wrap: wrap;
    padding: 10px 0 20px;
    border-bottom: 1px solid var(--grh-border);
}
.grh-article-thumb {
    width: 130px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
    border: 1px solid var(--grh-border);
}
.grh-article-head-info h1 {
    font-size: 1.5rem;
    margin: 0 0 8px;
}
.grh-article-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}
.grh-tag {
    background: #eef1ff;
    color: #3348c7;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 999px;
}

.grh-info-box {
    background: var(--grh-card-bg);
    border: 1px solid var(--grh-border);
    border-radius: var(--grh-radius);
    padding: 16px 18px;
    margin: 22px 0;
}
.grh-info-box h3 {
    margin: 0 0 12px;
    font-size: 1rem;
}
.grh-info-table {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px 24px;
    font-size: 0.9rem;
}
@media (min-width: 620px) {
    .grh-info-table { grid-template-columns: 1fr 1fr; }
}
.grh-info-table dt {
    color: var(--grh-text-muted);
    font-weight: 600;
    display: inline;
}
.grh-info-table dd {
    display: inline;
    margin: 0 0 0 4px;
}
.grh-info-row { margin: 0; }

/* Official link button + How-to-get-it box */
.grh-availability-box p { margin-top: 0; }
.grh-official-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--grh-dark);
    color: #fff;
    font-weight: 700;
    font-size: 0.9rem;
    padding: 10px 20px;
    border-radius: 999px;
    margin-top: 10px;
}
.grh-official-btn:hover { opacity: 0.9; text-decoration: none; color: #fff; }

.grh-affiliate-disclosure {
    font-size: 0.78rem;
    color: var(--grh-text-muted);
    margin: 8px 0 0;
}

.grh-howto-box .grh-howto-steps {
    margin: 6px 0 10px;
    padding-left: 20px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.grh-howto-box .grh-howto-steps li {
    font-size: 0.92rem;
    line-height: 1.5;
}
.grh-howto-note {
    font-size: 0.82rem;
    color: var(--grh-text-muted);
    margin: 0;
}

/* Report a problem box */
.grh-report-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
    background: var(--grh-card-bg);
    border: 1px solid var(--grh-border);
    border-radius: var(--grh-radius);
    padding: 16px 18px;
    margin: 22px 0;
}
.grh-report-box span {
    font-size: 0.92rem;
    color: var(--grh-text);
}
.grh-report-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #c81e3a;
    color: #fff;
    font-weight: 700;
    font-size: 0.85rem;
    padding: 9px 18px;
    border-radius: 999px;
    white-space: nowrap;
}
.grh-report-btn:hover { opacity: 0.9; text-decoration: none; color: #fff; }

/* Screenshot gallery */
.grh-gallery-box {
    background: var(--grh-card-bg);
    border: 1px solid var(--grh-border);
    border-radius: var(--grh-radius);
    padding: 16px 18px;
    margin: 22px 0;
}
.grh-gallery-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-top: 10px;
}
@media (min-width: 620px) {
    .grh-gallery-grid { grid-template-columns: repeat(4, 1fr); }
}
.grh-gallery-grid a {
    display: block;
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid var(--grh-border);
}
.grh-gallery-grid img {
    aspect-ratio: 16/10;
    object-fit: cover;
    width: 100%;
}

.grh-article-body {
    font-size: 1rem;
    padding: 10px 0 20px;
}
.grh-article-body h2, .grh-article-body h3 { margin-top: 1.6em; }
.grh-article-body img { border-radius: 8px; margin: 12px 0; }

.grh-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
    padding: 20px 0 50px;
}
@media (min-width: 940px) {
    .grh-layout { grid-template-columns: 2.2fr 1fr; }
}

/* Single post pages: full-width content, no sidebar */
.grh-single-full {
    max-width: 820px;
    margin: 0 auto;
    padding: 20px 0 50px;
}

/* ============================
   Sidebar
   ============================ */
.grh-sidebar-box {
    background: var(--grh-card-bg);
    border: 1px solid var(--grh-border);
    border-radius: var(--grh-radius);
    padding: 16px 18px;
    margin-bottom: 22px;
}
.grh-sidebar-box h3 {
    margin: 0 0 12px;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--grh-text-muted);
}
.grh-sidebar-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.grh-sidebar-list li {
    display: flex;
    align-items: center;
    gap: 10px;
}
.grh-sidebar-thumb {
    width: 44px;
    height: 44px;
    border-radius: 6px;
    overflow: hidden;
    flex-shrink: 0;
    background: #eee;
}
.grh-sidebar-thumb img { width: 100%; height: 100%; object-fit: cover; }
.grh-sidebar-list a {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--grh-text);
    line-height: 1.3;
}
.grh-sidebar-list a:hover { color: var(--grh-accent-2); text-decoration: none; }

/* ============================
   Search page
   ============================ */
.grh-search-result-count {
    color: var(--grh-text-muted);
    font-size: 0.9rem;
    margin-bottom: 20px;
}

/* ============================
   Pagination
   ============================ */
.grh-pagination {
    display: flex;
    gap: 8px;
    justify-content: center;
    padding: 30px 0;
    flex-wrap: wrap;
}
.grh-pagination a, .grh-pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    border-radius: 999px;
    background: #fff;
    border: 1px solid var(--grh-border);
    color: var(--grh-text);
    font-size: 0.85rem;
    font-weight: 600;
}
.grh-pagination .current {
    background: var(--grh-dark);
    color: #fff;
    border-color: var(--grh-dark);
}
.grh-pagination a:hover { text-decoration: none; border-color: var(--grh-accent-2); }

/* ============================
   Comments
   ============================ */
.grh-comments {
    margin-top: 30px;
    border-top: 1px solid var(--grh-border);
    padding-top: 24px;
}
.grh-comments h3 { font-size: 1.1rem; }
.comment-list { list-style: none; margin: 0; padding: 0; }
.comment-list li { margin-bottom: 16px; }
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--grh-border);
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.9rem;
    margin-bottom: 10px;
}
.comment-form textarea { min-height: 100px; }
.comment-form .form-submit input {
    background: var(--grh-dark);
    color: #fff;
    border: none;
    padding: 10px 22px;
    border-radius: 999px;
    font-weight: 700;
    cursor: pointer;
    width: auto;
}

/* ============================
   Plain page template (About / Contact / Privacy)
   ============================ */
.grh-page-content {
    padding: 20px 0 60px;
    max-width: 820px;
}
.grh-page-content h1 { font-size: 1.7rem; }
.grh-page-content h2 { font-size: 1.15rem; margin-top: 1.6em; }

/* ============================
   Footer
   ============================ */
.grh-footer {
    background: var(--grh-header-bg);
    border-top: 1px solid var(--grh-header-border);
    color: var(--grh-text-muted);
    padding: 34px 0;
    margin-top: 40px;
}
.grh-footer-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    text-align: center;
}
.grh-footer-links {
    margin: 0;
    font-size: 0.92rem;
    color: var(--grh-text-muted);
}
.grh-footer-links a { color: var(--grh-text-muted); font-weight: 500; }
.grh-footer-links a:hover { color: var(--grh-text); text-decoration: underline; }
.grh-footer-copy { font-size: 0.8rem; color: #9a9ea8; margin: 0; }

/* Empty state */
.grh-empty {
    padding: 40px 0;
    color: var(--grh-text-muted);
}

/* ============================
   NSZPedia Homepage Information
   ============================ */
.nszpedia-about {
    max-width: 100%;
    margin: 10px 0 45px;
    padding-top: 10px;
}

.nszpedia-about h2 {
    font-size: 1.35rem;
    margin: 0 0 18px;
    line-height: 1.35;
}

.nszpedia-about h3 {
    font-size: 1.05rem;
    margin: 26px 0 10px;
    line-height: 1.4;
}

.nszpedia-about p {
    margin: 0 0 16px;
    line-height: 1.7;
    color: var(--grh-text);
}

.nszpedia-about strong {
    font-weight: 600;
}

.nszpedia-about {
    margin: 20px 0 40px;
}

.nszpedia-about h2 {
    margin-bottom: 16px;
}

.nszpedia-about h3 {
    margin-top: 26px;
    margin-bottom: 10px;
}

.nszpedia-about p {
    line-height: 1.7;
    margin-bottom: 16px;
}

.nszpedia-more-content {
    display: none;
}

.nszpedia-more-content.is-visible {
    display: block;
}

/* Read More Button */
.nszpedia-read-more {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 100px;
    height: 40px;
    padding: 9 18px;
    margin: 4px 0 10px;
    border: none;
    border-radius: 999px;
    background: #d21f3c;
    color: #fff;
    font-family: inherit;
    font-size: 15px;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
}

.nszpedia-read-more:hover {
    background: #b91833;
    color: #fff;
    transform: translateY(-1px);
}
