@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;600;700&family=Press+Start+2P&display=swap');

/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'JetBrains Mono', monospace;
    color: #e0e0e0;
    background-color: #0a0a0a;
    min-height: 100vh;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Header */
.site-header {
    background: rgba(10, 10, 10, 0.95);
    border-bottom: 1px solid #333;
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
}

.site-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 15px;
}

.site-title {
    font-family: 'Press Start 2P', monospace;
    font-size: 0.9rem;
    font-weight: 400;
    color: #00aaff;
}

@keyframes neonGlow {
    from { text-shadow: 0 0 10px #ff6600, 0 0 20px #ff6600, 0 0 30px #ff6600; }
    to { text-shadow: 0 0 5px #ff6600, 0 0 10px #ff6600, 0 0 15px #ff6600; }
}

.site-title a {
    color: #00aaff;
    text-decoration: none;
}

.site-nav ul {
    display: flex;
    list-style: none;
    gap: 1rem;
}

.site-nav a {
    color: #e0e0e0;
    text-decoration: none;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.8rem;
    transition: all 0.3s ease;
    position: relative;
}

.site-nav a:hover {
    color: #00ff88;
}

.site-nav a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: #00ff88;
    transition: width 0.3s ease;
}

.site-nav a:hover::after {
    width: 100%;
}

/* Main content */
.site-main {
    min-height: calc(100vh - 120px);
    padding: 0;
}

/* Homepage background image */
body.home .site-main {
    background-image: url('/img/hero.png');
    background-position: top center;
    background-repeat: no-repeat;
    background-size: auto;
}

/* Hero section */
.hero {
    text-align: center;
    padding: 2rem 0 1rem 0;
    border-radius: 8px;
    margin: 0;
}


@keyframes scanLine {
    0% { left: -100%; }
    100% { left: 100%; }
}

.hero h1 {
    font-family: 'Press Start 2P', monospace;
    font-size: 2rem;
    margin-bottom: 0.5rem;
    color: white;
}

.hero p {
    font-size: 0.9rem;
    color: #e0e0e0;
}

/* Games grid */
.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(500px, 1fr));
    gap: 1rem;
    margin: 1rem 0;
}

.games-grid.sidebar {
    grid-template-columns: 1fr;
    gap: 0.75rem;
}

/* Featured games cards on main page sidebar */
.featured-games-sidebar .game-card {
    display: flex;
    flex-direction: column;
    padding: 0.75rem;
    gap: 0.5rem;
}

.featured-games-sidebar .game-image {
    width: 100%;
    height: 120px;
}

.featured-games-sidebar .game-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 4px;
}

.featured-games-sidebar .game-info {
    width: 100%;
}

.featured-games-sidebar .game-title {
    font-size: 0.8rem;
    margin-bottom: 0.25rem;
}

.featured-games-sidebar .game-description {
    font-size: 0.75rem;
    line-height: 1.3;
    margin-bottom: 0.25rem;
}

.featured-games-sidebar .game-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
}

.featured-games-sidebar .game-genre,
.featured-games-sidebar .game-status {
    font-size: 0.6rem;
    padding: 0.1rem 0.3rem;
}

.game-card {
    background: rgba(20, 20, 20, 0.8);
    border: 1px solid #333;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
    position: relative;
    display: flex;
    flex-direction: row;
}

.game-card:hover {
    transform: translateY(-2px);
    border-color: #00ff88;
    box-shadow: 0 4px 12px rgba(0, 255, 136, 0.2);
}


.game-card:hover::before {
    opacity: 1;
}

.game-image {
    width: 200px;
    overflow: hidden;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000;
}

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

.game-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(45deg, #333, #555);
    color: #e0e0e0;
    font-family: 'JetBrains Mono', monospace;
    font-size: 1rem;
    font-weight: bold;
}

.game-info {
    padding: 1rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.game-title {
    font-size: 1rem;
    margin-bottom: 0.25rem;
}

.game-title a {
    color: #00ff88;
    text-decoration: none;
}

.game-title a:hover {
    color: #ffffff;
}

.game-description {
    color: #cccccc;
    margin-bottom: 0.5rem;
    line-height: 1.4;
    font-size: 0.85rem;
}

.game-meta {
    display: flex;
    gap: 0.25rem;
    flex-wrap: wrap;
}

.game-genre {
    background: rgba(255, 0, 255, 0.1);
    color: #ff00ff;
    padding: 0.15rem 0.5rem;
    border: 1px solid #ff00ff;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.game-status {
    padding: 0.15rem 0.5rem;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-released {
    background: rgba(0, 255, 136, 0.2);
    color: #00ff88;
    border: 1px solid #00ff88;
}

.status-development {
    background: rgba(255, 0, 255, 0.2);
    color: #ff00ff;
    border: 1px solid #ff00ff;
}

.status-upcoming {
    background: rgba(0, 170, 255, 0.2);
    color: #00aaff;
    border: 1px solid #00aaff;
}

.status-alpha {
    background: rgba(255, 0, 0, 0.2);
    color: #ff0000;
    border: 1px solid #ff0000;
}

.status-beta {
    background: rgba(255, 165, 0, 0.2);
    color: #ffa500;
    border: 1px solid #ffa500;
}

/* Sections overview */
.sections-overview {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin: 1.0rem 0;
}

.section-card {
    background: rgba(20, 20, 20, 0.8);
    border: 1px solid #333;
    padding: 1rem;
    border-radius: 8px;
    text-align: center;
    transition: all 0.3s ease;
}

.section-card h3 {
    margin-bottom: 0.5rem;
    color: #00aaff;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
}

.section-card h3 a {
    color: inherit;
    text-decoration: none;
}

.section-card p {
    color: #cccccc;
    margin-bottom: 0.75rem;
    font-size: 0.8rem;
}

.section-link {
    color: #e0e0e0;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.8rem;
    transition: color 0.3s ease;
}

.section-link:hover {
    color: #00ff88;
}

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

.game-header {
    text-align: center;
    margin-bottom: 2rem;
}

.game-header .game-title {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: #2c3e50;
}

.game-header .game-meta {
    justify-content: center;
    margin-bottom: 1rem;
}

.play-button {
    background: #667eea;
    color: white;
    padding: 0.75rem 2rem;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    display: inline-block;
    transition: background 0.3s ease;
}

.play-button:hover {
    background: #764ba2;
}

.game-image {
    overflow: hidden;
}

.game-image img {
    width: 100%;
    height: auto;
    display: block;
}

.game-content {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    margin: 2rem 0;
}

/* Override game-content for blog posts */
.blog-post-page .game-content {
    background: transparent;
    padding: 0;
    border-radius: 0;
    box-shadow: none;
    margin: 0;
}

.game-features,
.game-technologies {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    margin: 2rem 0;
}

.game-features h3,
.game-technologies h3 {
    margin-bottom: 1rem;
    color: #2c3e50;
}

.game-features ul {
    list-style: none;
}

.game-features li {
    padding: 0.5rem 0;
    border-bottom: 1px solid #eee;
}

.game-features li:last-child {
    border-bottom: none;
}

.tech-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tech-tag {
    background: #f0f0f0;
    color: #666;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.875rem;
}

/* Footer */
.site-footer {
    background: rgba(10, 10, 10, 0.95);
    border-top: 1px solid #333;
    color: #e0e0e0;
    text-align: center;
    padding: 1rem 0;
    margin-top: 2rem;
    font-size: 0.8rem;
}

/* Main content layout */
.main-content-layout {
    display: grid;
    grid-template-columns: 3fr 1fr;
    gap: 2rem;
    margin: 1rem 0;
    align-items: start;
}

.news-section {
    min-width: 0; /* Prevents grid overflow */
}

.featured-games-sidebar {
    min-width: 0; /* Prevents grid overflow */
}

/* Blog styles */
.blog-posts {
    display: grid;
    gap: 0.5rem;
    margin: 0.5rem 0;
}

.blog-post {
    background: rgba(20, 20, 20, 0.8);
    border: 1px solid #333;
    border-radius: 8px;
    padding: 0.75rem;
    transition: all 0.3s ease;
}

.blog-post:hover {
    border-color: #00ff88;
    box-shadow: 0 4px 12px rgba(0, 255, 136, 0.2);
}

.blog-post h2 {
    color: #00aaff;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
}

.blog-post h2 a {
    color: inherit;
    text-decoration: none;
}

.blog-post h2 a:hover {
    color: #ffff00;
    text-shadow: 0 0 10px #ffff00;
}

.blog-meta {
    color: #ffff00;
    font-size: 0.7rem;
    margin-bottom: 0.25rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.blog-excerpt {
    color: #cccccc;
    line-height: 1.4;
    margin-bottom: 0.25rem;
    font-size: 0.85rem;
}

.blog-read-more {
    color: #00ff88;
    text-decoration: none;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.8rem;
    transition: color 0.3s ease;
}

.blog-read-more:hover {
    color: #ffffff;
}

/* Blog post page styles */
.blog-post-page {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.blog-post-header {
    text-align: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #333;
}

.blog-post-title {
    color: #00aaff;
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.2rem;
    margin-bottom: 1rem;
    line-height: 1.4;
}

.blog-post-meta {
    display: flex;
    justify-content: center;
    gap: 1rem;
    color: #00ff88;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.blog-post-content {
    background: rgba(20, 20, 20, 0.8);
    border: 1px solid #333;
    border-radius: 8px;
    padding: 2rem;
    color: #e0e0e0;
    line-height: 1.6;
}

.blog-post-content h1,
.blog-post-content h2,
.blog-post-content h3,
.blog-post-content h4,
.blog-post-content h5,
.blog-post-content h6 {
    color: #00aaff;
    font-family: 'JetBrains Mono', monospace;
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.blog-post-content h1 {
    font-size: 1.1rem;
}

.blog-post-content h2 {
    font-size: 1rem;
}

.blog-post-content h3 {
    font-size: 0.9rem;
}

.blog-post-content p {
    margin-bottom: 1rem;
}

.blog-post-content a {
    color: #00ff88;
    text-decoration: none;
    transition: color 0.3s ease;
}

.blog-post-content a:hover {
    color: #ffffff;
    text-shadow: 0 0 5px #00ff88;
}

.blog-post-content ul,
.blog-post-content ol {
    margin-bottom: 1rem;
    padding-left: 2rem;
}

.blog-post-content li {
    margin-bottom: 0.5rem;
}

.blog-post-content code {
    background: rgba(0, 0, 0, 0.5);
    color: #00ff88;
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
}

.blog-post-content pre {
    background: rgba(0, 0, 0, 0.8);
    border: 1px solid #333;
    border-radius: 8px;
    padding: 1rem;
    overflow-x: auto;
    margin-bottom: 1rem;
}

.blog-post-content pre code {
    background: none;
    padding: 0;
}

.blog-post-content blockquote {
    border-left: 4px solid #00aaff;
    padding-left: 1rem;
    margin: 1rem 0;
    color: #cccccc;
    font-style: italic;
}

/* Responsive design */
@media (max-width: 768px) {
    .site-header .container {
        flex-direction: column;
        gap: 1rem;
    }
    
    .site-nav ul {
        gap: 1rem;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .games-grid {
        grid-template-columns: 1fr;
    }
    
    .sections-overview {
        grid-template-columns: 1fr;
    }
    
    .main-content-layout {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .game-header .game-title {
        font-size: 2rem;
    }
}

/* Pico-8 game page */
.pico8-game-page {
    max-width: 100%;
    margin: 0;
    padding: 0;
}

.pico8-game-page .game-header {
    background: rgba(20, 20, 20, 0.9);
    padding: 1rem;
    margin-bottom: 0;
    text-align: center;
}

.pico8-game-page .game-title {
    color: #00aaff;
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.pico8-game-page .game-meta {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.pico8-game-page .game-meta-inline {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    align-items: center;
}

.pico8-game-content {
    background: transparent;
    padding: 0;
    margin: 0;
    border: none;
    box-shadow: none;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.pico8-game-content iframe {
    display: block;
    margin: 0 auto;
    max-width: 750px;
    max-height: 680px;
    width: 750px;
    height: 680px;
    box-sizing: border-box;
    border: none;
    outline: none;
}

@media (max-width: 768px) {
    .pico8-game-content iframe {
        width: 100%;
        max-width: 100%;
        height: 400px;
        max-height: 400px;
    }
}

/* Text Adventure game page */
.text-adventure-page {
    max-width: 100%;
    margin: 0;
    padding: 0;
}

.text-adventure-content {
    background: transparent;
    padding: 0;
    margin: 0;
    border: none;
    box-shadow: none;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.text-adventure-content iframe {
    display: block;
    margin: 0 auto;
    max-width: 100%;
    width: 100%;
    height: 80vh;
    min-height: 400px;
    box-sizing: border-box;
    border: none;
    outline: none;
}

@media (max-width: 768px) {
    .text-adventure-content iframe {
        height: auto;
        min-height: 500px;
    }
}
