/* Hero Section */
.hero {
    text-align: center;
    padding: 2rem 1rem;
    background: linear-gradient(135deg, var(--panel) 0%, var(--bg) 100%);
    border-bottom: 1px solid var(--muted);
    margin-bottom: 2rem;
}

.hero h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    color: var(--muted);
}

.hero p {
    font-size: 1.2rem;
    max-width: 600px;
    margin: 0 auto;
    color: var(--text-secondary);
}

.console-info {
    margin-top: 1rem;
}

.manufacturer {
    color: var(--text-secondary);
    font-size: 1rem;
    margin-top: 0.25rem;
    font-style: italic;
}

/* Per Page Selector */
.per-page-selector {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2rem;
    padding: 1rem;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 8px;
    flex-wrap: wrap;
    gap: 1rem;
}

.per-page-control {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.per-page-control label {
    color: var(--muted);
    font-weight: bold;
    white-space: nowrap;
}

.per-page-control select {
    background: #111;
    border: 1px solid var(--border);
    color: var(--text);
    padding: 0.5rem;
    border-radius: 4px;
    min-width: 80px;
}

.counter {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Games List */
.games-list {
    margin-top: 1rem;
}

.game-item {
    display: flex;
    align-items: center;
    background: var(--panel);
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid var(--border);
    margin-bottom: 1rem;
    transition: all 0.3s ease;
    gap: 1.5rem;
}

.game-item:hover {
    transform: translateX(5px);
    border-color: var(--muted);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.game-image {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 4px;
    border: 1px solid var(--border);
    flex-shrink: 0;
}

.game-image-placeholder {
    width: 80px;
    height: 80px;
    background: #1a1a1a;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    font-size: 0.8rem;
    border-radius: 4px;
    border: 1px solid var(--border);
    flex-shrink: 0;
    text-align: center;
    padding: 0.5rem;
}

.game-image-placeholder .icon {
    font-size: 1.5rem;
    margin-bottom: 0.25rem;
}

.game-content {
    flex-grow: 1;
    min-width: 0; /* Prevents flex item from overflowing */
}

.game-title {
    color: var(--muted);
    text-decoration: none;
    font-size: 1.2rem;
    font-weight: bold;
    display: block;
    margin-bottom: 0.5rem;
    transition: color 0.3s ease;
}

.game-title:hover {
    color: #ffffff;
    text-decoration: underline;
}

.game-meta {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-top: 0.25rem;
}

.game-languages {
    margin-top: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.flag {
    width: 24px;
    height: 16px;
    border-radius: 2px;
    border: 1px solid #333;
    object-fit: cover;
}

.no-languages {
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-style: italic;
}

/* No Games Message */
.no-games {
    text-align: center;
    color: var(--text-secondary);
    padding: 3rem;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 8px;
    margin: 2rem 0;
}

.no-games h3 {
    color: var(--muted);
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.no-games p {
    margin-bottom: 2rem;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 2rem 0;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.pagination-link,
.pagination-current {
    padding: 0.5rem 0.75rem;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 4px;
    color: var(--muted);
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    min-width: 40px;
    text-align: center;
}

.pagination-link:hover {
    background: #1a1a1a;
    border-color: var(--muted);
    transform: translateY(-2px);
}

.pagination-current {
    background: var(--muted);
    color: #000;
    font-weight: bold;
    border-color: var(--muted);
}

/* Back Section */
.back-section {
    text-align: center;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
}

/* Responsive */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2rem;
    }
    
    .per-page-selector {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }
    
    .per-page-control {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .per-page-control select {
        width: 100%;
    }
    
    .game-item {
        flex-direction: column;
        align-items: flex-start;
        text-align: left;
        gap: 1rem;
        padding: 1.5rem;
    }
    
    .game-image,
    .game-image-placeholder {
        width: 100%;
        height: 120px;
        margin-bottom: 0;
    }
    
    .game-title {
        font-size: 1.3rem;
    }
    
    .pagination {
        gap: 0.25rem;
    }
    
    .pagination-link,
    .pagination-current {
        padding: 0.5rem;
        font-size: 0.85rem;
        min-width: 36px;
    }
}

@media (max-width: 480px) {
    .hero {
        padding: 1.5rem 1rem;
    }
    
    .hero h1 {
        font-size: 1.8rem;
    }
    
    .hero p {
        font-size: 1rem;
    }
    
    .game-item {
        padding: 1rem;
    }
    
    .pagination-link,
    .pagination-current {
        padding: 0.4rem 0.5rem;
        font-size: 0.8rem;
        min-width: 32px;
    }
}