:root {
    --bg-main: #181A15;
    --bg-surface: #22261E;
    
    --border: #4A5440;        
    --border-color: #4A5440;
    
    --text-main: #B4BBA8;
    --text-heading: #EAEEE3;
    
    --accent: #8FB366
}

body {
    background-color: var(--bg-main);
    color: var(--text-main);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    min-height: 100vh;
    margin: 0;
    padding: 40px 20px;
    box-sizing: border-box;
}

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

.page-header {
    text-align: center;
    margin-bottom: 60px;
}

.page-header h1 {
    font-size: 3.5rem;
    color: var(--text-heading);
    margin: 0 0 10px 0;
    font-weight: 800;
    letter-spacing: -1px;
}

.page-header p {
    font-size: 1.2rem;
    color: #8b949e;
    margin: 0;
}

.back-button-container {
    position: fixed;
    top: 30px;
    left: 30px;
    z-index: 100;
}

.back-button {
    display: inline-flex;
    align-items: center;
    padding: 10px 20px;
    background-color: var(--bg-card);
    color: var(--text-main);
    text-decoration: none;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    font-weight: 600;
    transition: all 0.2s ease;
}

.back-button:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
}

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

.game-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent);
    box-shadow: 0 8px 24px #313d23;
}

.game-thumbnail-wrapper {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
    background: #000;
}

.game-thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.3s ease;
}

.game-card:hover .game-thumbnail {
    opacity: 0.8;
}

.game-info {
    padding: 24px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.game-title {
    font-size: 1.5rem;
    color: var(--text-heading);
    margin: 0 0 10px 0;
    font-weight: 700;
}

.game-description {
    font-size: 1rem;
    color: #8b949e;
    line-height: 1.5;
    margin: 0 0 20px 0;
    flex-grow: 1;
}

.game-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

.game-tag {
    font-size: 0.75rem;
    padding: 4px 10px;
    border-radius: 20px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tag-playable { background: rgba(46, 160, 67, 0.15); color: #3fb950; border: 1px solid rgba(46, 160, 67, 0.4); }
.tag-prototype { background: rgba(163, 113, 247, 0.15); color: #a371f7; border: 1px solid rgba(163, 113, 247, 0.4); }
.tag-archived { background: rgba(139, 148, 158, 0.15); color: #8b949e; border: 1px solid rgba(139, 148, 158, 0.4); }
.tag-frozen { background: rgba(45, 212, 191, 0.15); color: #2dd4bf; border: 1px solid rgba(45, 212, 191, 0.4); }
.tag-alpha { background: rgba(212, 45, 70, 0.15); color: #e34376; border: 1px solid rgba(212, 45, 106, 0.4); }

.card-action {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-weight: 600;
    color: var(--accent);
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
}

.card-action::after {
    content: '→';
    font-size: 1.2rem;
    transition: transform 0.2s ease;
}

.game-card:hover .card-action::after {
    transform: translateX(5px);
}

@media (max-width: 768px) {
    .back-button-container { position: static; margin-bottom: 20px; display: flex; justify-content: center; }
    .page-header h1 { font-size: 2.5rem; }
}