/* IndieGoblin.com Styles */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #22c55e;
    --primary-dark: #16a34a;
    --secondary: #f8fafc;
    --accent: #e2e8f0;
    --text: #1e293b;
    --text-muted: #64748b;
    --bg: #ffffff;
    --card-bg: #f8fafc;
    --card-hover: #f1f5f9;
    --border: #e2e8f0;
}

[data-theme="dark"] {
    --primary: #22c55e;
    --primary-dark: #16a34a;
    --secondary: #1a1a2e;
    --accent: #16213e;
    --text: #eee;
    --text-muted: #aaa;
    --bg: #0f0f1a;
    --card-bg: #1a1a2e;
    --card-hover: #252542;
    --border: #333;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    transition: background 0.3s, color 0.3s;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.2s;
}

a:hover {
    color: var(--primary-dark);
}

/* Header */
header {
    background: var(--secondary);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
}

nav {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo:hover {
    color: var(--primary-dark);
}

.logo-icon {
    width: 32px;
    height: 32px;
}

.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-links a {
    color: var(--text);
    font-weight: 500;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--primary);
}

/* Theme toggle */
.theme-toggle {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 0.4rem 0.8rem;
    cursor: pointer;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    transition: background 0.2s;
}

.theme-toggle:hover {
    background: var(--card-hover);
}

/* Hamburger menu */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: var(--text);
    transition: 0.3s;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* Breadcrumb */
.breadcrumb {
    background: var(--accent);
    padding: 0.75rem 2rem;
    font-size: 0.9rem;
}

.breadcrumb ol {
    max-width: 1400px;
    margin: 0 auto;
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.breadcrumb li::after {
    content: '/';
    margin-left: 0.5rem;
    color: var(--text-muted);
}

.breadcrumb li:last-child::after {
    content: '';
}

.breadcrumb a {
    color: var(--text-muted);
}

.breadcrumb a:hover {
    color: var(--primary);
}

/* Main content */
main {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
    min-height: calc(100vh - 200px);
}

/* Hero section */
.hero, .page-hero, .category-hero {
    text-align: center;
    padding: 3rem 1rem;
    margin-bottom: 2rem;
    background: linear-gradient(135deg, var(--secondary), var(--accent));
    border-radius: 12px;
    border: 1px solid var(--border);
}


.hero h1, .page-hero h1, .category-hero h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    color: var(--text);
}

.hero p, .page-hero p, .category-hero p {
    color: var(--text-muted);
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

.hero-stats, .category-stats {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.hero-stats span, .category-stats span {
    background: var(--primary);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 500;
    font-size: 0.9rem;
}

.hero-search {
    margin-top: 1.5rem;
    display: flex;
    justify-content: center;
}

.hero-search input {
    width: 100%;
    max-width: 500px;
    padding: 1rem 1.5rem;
    font-size: 1.1rem;
    border-radius: 30px;
}

.random-game-btn {
    margin-top: 1rem;
    padding: 0.75rem 1.5rem;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.random-game-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(34, 197, 94, 0.4);
}

/* Filters */
.filters {
    margin-bottom: 2rem;
}

.search-box {
    margin-bottom: 1rem;
}

.search-box input {
    width: 100%;
    max-width: 400px;
    padding: 0.75rem 1rem;
    border: 2px solid var(--border);
    border-radius: 8px;
    background: var(--card-bg);
    color: var(--text);
    font-size: 1rem;
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary);
}

/* Category chips - horizontal scrollable */
.category-filters {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
}

.category-filters::-webkit-scrollbar {
    height: 4px;
}

.category-filters::-webkit-scrollbar-track {
    background: var(--border);
    border-radius: 4px;
}

.category-filters::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 4px;
}

.filter-btn {
    padding: 0.5rem 1rem;
    border: 1px solid var(--border);
    border-radius: 20px;
    background: var(--card-bg);
    color: var(--text);
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.2s;
    white-space: nowrap;
    flex-shrink: 0;
}

.filter-btn:hover {
    background: var(--card-hover);
}

.filter-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

/* Price segmented toggle */
.price-toggle {
    display: inline-flex;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 1rem;
}

.price-toggle .toggle-btn {
    padding: 0.6rem 1.25rem;
    border: none;
    background: transparent;
    color: var(--text);
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s;
    border-right: 1px solid var(--border);
}

.price-toggle .toggle-btn:last-child {
    border-right: none;
}

.price-toggle .toggle-btn:hover {
    background: var(--card-hover);
}

.price-toggle .toggle-btn.active {
    background: var(--primary);
    color: white;
}

/* Platform icon buttons - multi-select (homepage only) */
.platform-buttons {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.platform-buttons .platform-btn {
    width: 44px;
    height: 44px;
    border: 2px solid var(--border);
    border-radius: 10px;
    background: var(--card-bg);
    cursor: pointer;
    font-size: 1.2rem;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.platform-buttons .platform-btn:hover {
    background: var(--card-hover);
    border-color: var(--primary);
}

.platform-buttons .platform-btn.active {
    background: var(--primary);
    border-color: var(--primary);
}

.platform-buttons .platform-btn svg {
    width: 22px;
    height: 22px;
    fill: var(--text);
    transition: fill 0.2s;
}

.platform-buttons .platform-btn.active svg {
    fill: white;
}

/* Filter row layout */
.filter-row {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
    margin-bottom: 0.5rem;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.filter-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
}

/* More filters expandable */
.more-filters-btn {
    padding: 0.5rem 1rem;
    border: 1px dashed var(--border);
    border-radius: 8px;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.more-filters-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.more-filters-btn .arrow {
    transition: transform 0.2s;
}

.more-filters-btn.expanded .arrow {
    transform: rotate(180deg);
}

.more-filters-panel {
    display: none;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1rem;
    margin-top: 1rem;
}

.more-filters-panel.visible {
    display: block;
}

.more-filters-panel h4 {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
}

/* Legacy price/platform filters - hidden by default, used on other pages */
.price-filters, .platform-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

/* Game grid */
.game-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.game-card {
    background: var(--card-bg);
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;
    color: var(--text);
    border: 1px solid var(--border);
}

a.game-card {
    text-decoration: none;
}

.game-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(34, 197, 94, 0.15);
    color: var(--text);
}

.game-image {
    position: relative;
    aspect-ratio: 4/3;
    overflow: hidden;
    background: var(--accent);
}

.game-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.game-image .platforms {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(0,0,0,0.7);
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.85rem;
}

.game-image .itch-link {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.7);
    opacity: 0;
    transition: opacity 0.2s;
    color: white;
    font-weight: bold;
    font-size: 0.9rem;
}

.game-image:hover .itch-link {
    opacity: 1;
}

.game-image .itch-link span {
    background: var(--primary);
    padding: 0.5rem 1rem;
    border-radius: 20px;
}

.game-info {
    padding: 1rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: var(--text);
}

a.game-info:hover {
    color: var(--text);
}

a.game-image {
    display: block;
}

.game-info h3 {
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
    color: var(--text);
    line-height: 1.3;
}

.game-info .author {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.game-info .description {
    font-size: 0.85rem;
    color: var(--text-muted);
    flex: 1;
    margin-bottom: 0.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.game-info .price {
    display: inline-block;
    background: var(--primary);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    font-size: 0.9rem;
    font-weight: 500;
    align-self: flex-start;
}

.no-results {
    text-align: center;
    padding: 3rem;
    color: var(--text-muted);
}

.no-results a {
    color: var(--primary);
}

.history-actions {
    margin-bottom: 1.5rem;
}

/* About page */
.about-page {
    max-width: 800px;
    margin: 0 auto;
}

.about-content h1 {
    font-size: 2.5rem;
    margin-bottom: 2rem;
    text-align: center;
}

.about-section {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.about-section h2 {
    color: var(--primary);
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.about-section p {
    color: var(--text-muted);
    margin-bottom: 0.75rem;
    line-height: 1.7;
}

.about-section p:last-child {
    margin-bottom: 0;
}

.feature-list {
    list-style: none;
    padding: 0;
}

.feature-list li {
    padding: 0.5rem 0;
    color: var(--text-muted);
}

.about-cta {
    text-align: center;
    margin-top: 2rem;
}

/* Load more button */
.load-more-container {
    text-align: center;
    margin: 2rem 0;
}

.load-more-btn {
    padding: 1rem 3rem;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 30px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.load-more-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(34, 197, 94, 0.4);
}

.load-more-btn:disabled {
    background: var(--text-muted);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Game detail page */
.game-detail {
    max-width: 1000px;
    margin: 0 auto;
}

.game-header {
    display: flex;
    gap: 2rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.game-cover {
    flex: 0 0 300px;
    max-width: 100%;
}

.game-cover img {
    width: 100%;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    transition: transform 0.2s, box-shadow 0.2s;
}

.game-cover a:hover img {
    transform: scale(1.02);
    box-shadow: 0 6px 25px rgba(34, 197, 94, 0.3);
}

.game-title-section {
    flex: 1;
    min-width: 200px;
}

.game-title-section h1 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.game-title-section .author {
    color: var(--text-muted);
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.price-tag {
    display: inline-block;
    background: var(--primary);
    color: white;
    padding: 0.5rem 1.5rem;
    border-radius: 8px;
    font-size: 1.2rem;
    font-weight: bold;
    margin-bottom: 1rem;
}

.play-button {
    display: inline-block;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    padding: 1rem 2rem;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: bold;
    transition: transform 0.2s, box-shadow 0.2s;
}

.play-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(34, 197, 94, 0.4);
    color: white;
}

/* Video */
.video-container {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    margin: 2rem 0;
    border-radius: 12px;
    overflow: hidden;
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Screenshots */
.screenshots {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    padding: 1rem 0;
    margin: 1rem 0;
}

.screenshots img {
    height: 150px;
    border-radius: 8px;
    flex-shrink: 0;
    transition: transform 0.2s;
}

.screenshots a:hover img {
    transform: scale(1.05);
}

/* Game content layout */
.game-content {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 2rem;
    margin-top: 2rem;
}

.description {
    background: var(--card-bg);
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid var(--border);
}

.description h2 {
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.description p {
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.game-sidebar {
    background: var(--card-bg);
    padding: 1.5rem;
    border-radius: 12px;
    height: fit-content;
    border: 1px solid var(--border);
}

.info-table {
    width: 100%;
    border-collapse: collapse;
}

.info-table td {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border);
}

.info-table td:first-child {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.info-table tr:last-child td {
    border-bottom: none;
}

/* CTA Button in sidebar */
.cta-button {
    display: block;
    width: 100%;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    text-align: center;
    padding: 1rem;
    border-radius: 8px;
    font-weight: bold;
    font-size: 1.1rem;
    margin-top: 1.5rem;
    transition: transform 0.2s, box-shadow 0.2s;
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(34, 197, 94, 0.4);
    color: white;
}

.cta-button span {
    display: block;
    font-size: 0.85rem;
    font-weight: normal;
    opacity: 0.9;
    margin-top: 0.25rem;
}

/* Tags */
.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

.tag {
    background: var(--accent);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Related games */
.related-games {
    margin-top: 3rem;
}

.related-games h2 {
    margin-bottom: 1.5rem;
}

/* Categories page */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
}

.category-card {
    background: var(--card-bg);
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    transition: transform 0.2s;
    color: var(--text);
    border: 1px solid var(--border);
}

.category-card:hover {
    transform: translateY(-4px);
    color: var(--text);
}

.category-image {
    width: 120px;
    flex-shrink: 0;
}

.category-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.category-info {
    padding: 1rem;
    display: flex;
    flex-direction: column;
}

.category-info h2 {
    font-size: 1.2rem;
    margin-bottom: 0.25rem;
}

.category-info p {
    font-size: 0.85rem;
    color: var(--text-muted);
    flex: 1;
}

.category-info .count {
    background: var(--primary);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    font-size: 0.8rem;
    align-self: flex-start;
}

/* Other categories section */
.other-categories {
    margin-top: 3rem;
}

.other-categories h2 {
    margin-bottom: 1rem;
}

.category-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.category-links a {
    background: var(--card-bg);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    color: var(--text);
    transition: background 0.2s;
    border: 1px solid var(--border);
}

.category-links a:hover {
    background: var(--card-hover);
    color: var(--primary);
}

/* Footer */
footer {
    background: var(--secondary);
    border-top: 1px solid var(--border);
    margin-top: 4rem;
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 3rem 2rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
}

.footer-section h4 {
    color: var(--primary);
    margin-bottom: 1rem;
}

.footer-section p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.footer-section a {
    display: block;
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.footer-section a:hover {
    color: var(--primary);
}

.footer-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.footer-categories a {
    display: inline;
}

.footer-bottom {
    background: var(--accent);
    text-align: center;
    padding: 1rem;
}

.footer-bottom p {
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* Back to top */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    border: none;
    cursor: pointer;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s;
    z-index: 99;
}

.back-to-top.visible {
    opacity: 1;
    transform: translateY(0);
}

.back-to-top:hover {
    background: var(--primary-dark);
}

/* Floating newsletter bar */
.newsletter-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: var(--primary);
    color: white;
    padding: 0.6rem 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.15);
    transform: translateY(0);
    transition: transform 0.3s ease;
}

.newsletter-bar.hidden {
    transform: translateY(-100%);
}

.newsletter-bar-content {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
}

.newsletter-bar-text {
    font-size: 0.9rem;
}

.newsletter-bar-text strong {
    font-weight: 600;
}

.newsletter-bar-form {
    display: flex;
    gap: 0.4rem;
}

.newsletter-bar-form input[type="email"] {
    padding: 0.5rem 0.75rem;
    border: none;
    border-radius: 6px;
    font-size: 0.85rem;
    width: 180px;
    background: rgba(255,255,255,0.95);
    color: #333;
}

.newsletter-bar-form input[type="email"]::placeholder {
    color: #888;
}

.newsletter-bar-form input[type="email"]:focus {
    outline: 2px solid rgba(255,255,255,0.5);
}

.newsletter-bar-form button {
    padding: 0.5rem 1rem;
    background: var(--primary-dark);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.newsletter-bar-form button:hover {
    background: #128a3e;
}

.newsletter-bar-close {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0 0.5rem;
    opacity: 0.8;
    transition: opacity 0.2s;
    line-height: 1;
}

.newsletter-bar-close:hover {
    opacity: 1;
}

.newsletter-bar .newsletter-message {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-top: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.85rem;
    white-space: nowrap;
    box-shadow: 0 2px 10px rgba(0,0,0,0.15);
}

/* Offset content when bar is visible */
body.has-newsletter-bar {
    padding-top: 52px;
}

body.has-newsletter-bar header {
    top: 52px;
}

@media (max-width: 768px) {
    .newsletter-bar {
        padding: 0.5rem;
        flex-direction: column;
        gap: 0.5rem;
    }

    .newsletter-bar-content {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }

    .newsletter-bar-text {
        font-size: 0.8rem;
    }

    .newsletter-bar-form input[type="email"] {
        width: 150px;
    }

    .newsletter-bar-close {
        position: absolute;
        top: 0.25rem;
        right: 0.5rem;
    }

    body.has-newsletter-bar {
        padding-top: 85px;
    }

    body.has-newsletter-bar header {
        top: 85px;
    }
}

/* Newsletter signup box (for category/free pages) */
.newsletter-box {
    background: linear-gradient(135deg, var(--secondary), var(--accent));
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    margin: 2rem 0;
}

.newsletter-box h3 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    color: var(--text);
}

.newsletter-box p {
    color: var(--text-muted);
    margin-bottom: 1.25rem;
    font-size: 0.95rem;
}

.newsletter-form {
    display: flex;
    gap: 0.5rem;
    max-width: 450px;
    margin: 0 auto;
}

.newsletter-form input[type="email"] {
    flex: 1;
    padding: 0.85rem 1.25rem;
    border: 2px solid var(--border);
    border-radius: 8px;
    background: var(--bg);
    color: var(--text);
    font-size: 1rem;
    min-width: 0;
}

.newsletter-form input[type="email"]:focus {
    outline: none;
    border-color: var(--primary);
}

.newsletter-form input[type="email"]::placeholder {
    color: var(--text-muted);
}

.newsletter-form button {
    padding: 0.85rem 1.5rem;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, transform 0.2s;
    white-space: nowrap;
}

.newsletter-form button:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

.newsletter-form button:disabled {
    background: var(--text-muted);
    cursor: not-allowed;
    transform: none;
}

.newsletter-message {
    margin-top: 1rem;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-size: 0.9rem;
    display: none;
}

.newsletter-message.success {
    display: block;
    background: rgba(34, 197, 94, 0.15);
    color: var(--primary);
    border: 1px solid var(--primary);
}

.newsletter-message.error {
    display: block;
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
    border: 1px solid #ef4444;
}

/* Compact newsletter for game pages */
.newsletter-compact {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem;
    margin-top: 2rem;
}

.newsletter-compact h3 {
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
}

.newsletter-compact p {
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

@media (max-width: 768px) {
    .newsletter-form {
        flex-direction: column;
    }

    .newsletter-form button {
        width: 100%;
    }

    .newsletter-box {
        padding: 1.5rem;
    }
}

/* 404 page */
.error-page {
    text-align: center;
    padding: 5rem 2rem;
}

.error-page h1 {
    font-size: 6rem;
    color: var(--primary);
    margin-bottom: 1rem;
}

.error-page h2 {
    margin-bottom: 1rem;
}

.error-page p {
    color: var(--text-muted);
    margin-bottom: 2rem;
}

.error-page .home-link {
    display: inline-block;
    background: var(--primary);
    color: white;
    padding: 1rem 2rem;
    border-radius: 8px;
    font-weight: bold;
}

/* Responsive */
@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }

    .nav-links {
        position: fixed;
        top: 60px;
        left: 0;
        right: 0;
        background: var(--secondary);
        flex-direction: column;
        padding: 1rem;
        gap: 0;
        transform: translateY(-100%);
        opacity: 0;
        transition: all 0.3s;
        border-bottom: 1px solid var(--border);
    }

    .nav-links.active {
        transform: translateY(0);
        opacity: 1;
    }

    .nav-links a {
        padding: 1rem;
        border-bottom: 1px solid var(--border);
    }

    .nav-links .theme-toggle {
        margin: 1rem;
    }

    .hero h1, .page-hero h1, .category-hero h1 {
        font-size: 1.8rem;
    }

    .hero-stats {
        display: none;
    }

    .game-header {
        flex-direction: column;
    }

    .game-cover {
        flex: auto;
    }

    .game-content {
        grid-template-columns: 1fr;
    }

    .game-sidebar {
        order: -1;
    }

    .category-card {
        flex-direction: column;
    }

    .category-image {
        width: 100%;
        height: 150px;
    }

    main {
        padding: 1rem;
    }

    .footer-content {
        grid-template-columns: 1fr;
    }

    /* Mobile filter adjustments */
    .filter-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .filter-group {
        width: 100%;
    }

    .price-toggle {
        width: 100%;
    }

    .price-toggle .toggle-btn {
        flex: 1;
        text-align: center;
    }

    .platform-buttons {
        width: 100%;
        justify-content: flex-start;
    }

    .more-filters-btn {
        width: 100%;
        justify-content: center;
    }
}
