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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    line-height: 1.6;
    color: #333333;
    background-color: #f5f5f7;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

html, body {
    height: 100%;
}

/* Apple-inspired color scheme */
:root {
    --apple-blue: #0071e3;
    --apple-gray: #86868b;
    --apple-light-gray: #f5f5f7;
    --apple-dark: #1d1d1f;
    --apple-green: #68cc45;
}

/* Container */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
header {
    background-color: var(--apple-dark);
    color: white;
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
}

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

.nav-link {
    color: white;
    text-decoration: none;
    font-size: 1.15rem;
    font-weight: 500;
    transition: color 0.3s, border-bottom 0.3s;
    padding-bottom: 2px;
    border-bottom: 2px solid transparent;
}

.nav-link:hover, .nav-link:focus {
    color: var(--apple-blue);
    border-bottom: 2px solid var(--apple-blue);
    text-decoration: none;
}

/* Search Bar */
.search-container {
    margin: 2rem 0;
    text-align: center;
}

.search-bar {
    width: 100%;
    max-width: 600px;
    padding: 0.8rem 1.5rem;
    border: 2px solid var(--apple-gray);
    border-radius: 25px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.search-bar:focus {
    outline: none;
    border-color: var(--apple-blue);
    box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.2);
}

/* Category Filter */
.category-filter {
    margin: 1rem 0 2rem;
    text-align: center;
}

.category-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
}

.category-btn {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 20px;
    background-color: white;
    color: var(--apple-dark);
    cursor: pointer;
    transition: all 0.3s ease;
}

.category-btn:hover,
.category-btn.active {
    background-color: var(--apple-blue);
    color: white;
}

/* Main content */
main {
    padding: 2rem 0;
}

h1 {
    font-size: 2.5rem;
    margin-bottom: 2rem;
    color: var(--apple-dark);
    text-align: center;
}

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

.game-card {
    background-color: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s, box-shadow 0.3s;
    text-decoration: none;
    color: var(--apple-dark);
    display: flex;
    flex-direction: column;
}

.game-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.12);
}

.game-card img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    display: block;
    margin: 0 auto;
}

.game-card-title {
    font-size: 1.2rem;
    font-weight: 600;
    padding: 1rem;
    text-align: center;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin: 2rem 0;
}

.pagination a {
    color: var(--apple-blue);
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: background-color 0.3s, color 0.3s;
    min-width: 40px;
    text-align: center;
}

.pagination a:hover {
    background-color: var(--apple-blue);
    color: white;
}

.pagination a.active {
    background-color: var(--apple-blue);
    color: white;
    font-weight: bold;
}

.pagination .disabled {
    color: var(--apple-gray);
    cursor: not-allowed;
}

/* Footer */
footer {
    background-color: var(--apple-dark);
    color: white;
    padding: 2rem 0;
    text-align: center;
    margin-top: 0;
    flex-shrink: 0;
}

.footer-links {
    margin-bottom: 1rem;
}

.footer-links a {
    color: white;
    margin: 0 0.5rem;
    text-decoration: none;
}

.footer-links a:hover {
    text-decoration: underline;
}

/* Game details page specific styles */
.game-intro {
    text-align: center;
    margin-bottom: 2rem;
}

.tagline {
    font-size: 1.2rem;
    color: var(--apple-blue);
    margin-bottom: 2rem;
}

.game-container {
    position: relative;
    width: 100%;
    padding-top: 56.25%;
    margin-bottom: 2rem;
    background-color: #000;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.game-iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.features {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.feature-card {
    background-color: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.feature-card h3 {
    color: var(--apple-blue);
    margin-bottom: 0.5rem;
}

.game-details {
    background-color: white;
    padding: 2rem;
    border-radius: 8px;
    margin-bottom: 2rem;
}

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

.cta-button {
    display: inline-block;
    background-color: var(--apple-blue);
    color: white;
    padding: 0.8rem 1.5rem;
    border-radius: 20px;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.3s;
}

.cta-button:hover {
    background-color: #0051a2;
}

/* Responsive design */
@media (max-width: 768px) {
    h1 {
        font-size: 2rem;
    }
    
    .game-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
    
    .features {
        grid-template-columns: 1fr;
    }
    
    .category-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .category-btn {
        width: 100%;
        max-width: 300px;
    }
}

main.container {
    flex: 1 0 auto;
} 