/* styles.css */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Arial', sans-serif;
}

html, body {
    height: 100%;
    margin: 0;
}

body {
    background-color: #e0e4e9;
    color: #333;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.main-content {
    flex: 1 0 auto;
    padding-top: 200px; /* Offset for fixed header (~130px) and top bar (~70px) */
    overflow-y: auto; /* Ensure content scrolls */
}

header {
    background: linear-gradient(90deg, #0288d1, #4fc3f7);
    color: white;
    padding: 1.5rem;
    text-align: center;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
}

.top-bar {
    background: linear-gradient(90deg, #ffffff, #f5f5f5);
    color: #333;
    padding: 0.75rem;
    text-align: center;
    position: fixed;
    top: 130px;
    width: 100%;
    z-index: 900;
    display: flex;
    justify-content: center;
    gap: 1rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    flex-wrap: nowrap; /* Prevent wrapping */
    overflow-x: auto; /* Allow horizontal scrolling if needed */
    white-space: nowrap; /* Ensure single line */
}

.top-bar a {
    color: #333;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 25px;
    transition: background 0.3s, box-shadow 0.3s;
    font-weight: 500;
    background: rgba(0, 0, 0, 0.05);
    display: inline-block;
    min-width: 100px; /* Reduced from fixed 130px to allow flexibility */
    text-align: center;
    font-size: 1.0rem;
}

.top-bar a:hover {
    background: rgba(2, 136, 209, 0.2);
    box-shadow: 0 0 8px rgba(2, 136, 209, 0.5);
}

.logo img {
    max-width: 200px;
    height: auto;
    display: block;
    margin: 0 auto 0.5rem;
}

footer {
    background: linear-gradient(90deg, #ffffff, #f5f5f5);
    color: #333;
    text-align: center;
    padding: 1rem;
    flex-shrink: 0;
    box-shadow: 0 -2px 4px rgba(0, 0, 0, 0.1);
}

.search-bar {
    margin: 1rem auto;
    max-width: 600px;
    padding: 0 1rem;
}

.search-bar input {
    width: 100%;
    padding: 0.75rem;
    border: none;
    border-radius: 25px;
    font-size: 1rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
    outline: none;
}

.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 0.20fr));
    justify-content: center;
    gap: 30px;
    padding: 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
    min-height: calc(80vh - 200px - 70px);
}

.game-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
    height: 330px; /* Fixed height for consistency */
}

.game-card:hover {
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
}

.game-card img {
    width: 100%;
    height: 200px; /* Fixed height, ~half of original 240px */
    object-fit: cover;
    display: block;
}

.game-info {
    padding: 0.5rem; /* Reduced to fit smaller height */
    text-align: center;
    height: 50px; /* Fixed height for consistency */
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.game-info h3 {
    font-size: 1.1rem; /* Reduced for smaller space */
    margin-bottom: 0.2rem;
}

.game-info .platform-icon {
    width: 16px; /* Reduced for smaller space */
    height: auto;
    margin: 0 auto 0.2rem;
    display: block;
    transition: transform 0.3s;
}

.game-info .platform-icon:hover {
    transform: scale(1.1);
}

.game-info p {
    min-height: 2.4em; /* Roughly the height of two lines, assuming 1.2em line-height */
    margin-bottom: 5px; /* Ensure no extra spacing affects layout */
    line-height: 1.2; /* Consistent line height for predictability */
    font-size: 0.9rem
}

.game-info button {
    background: #0288d1;
    color: white;
    border: none;
    padding: 0.3rem 0.8rem; /* Reduced for smaller space */
    border-radius: 20px;
    cursor: pointer;
    transition: background 0.3s;
    font-size: 0.8rem;
}

.game-info button:hover {
    background: #01579b;
}

.privacy-content {
    max-width: 800px;
    margin: 2rem auto;
    padding: 1.5rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    min-height: calc(100vh - 200px - 70px); /* Match games-grid for consistent scrolling */
}

.privacy-content h4 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    text-align: center;
    color: #0288d1;
}

.privacy-content p {
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 1rem;
    color: #333;
}

.privacy-content ul {
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 1rem;
    padding-left: 2rem;
    color: #333;
}

.privacy-content ul li {
    margin-bottom: 0.5rem;
}

.privacy-content a {
    color: #0288d1;
    text-decoration: none;
    font-weight: 500;
}

.privacy-content a:hover {
    text-decoration: underline;
}

.privacy-content strong {
    font-weight: 700;
}

@media (max-width: 600px) {
    .logo img {
        max-width: 150px;
    }

    header {
        padding: 1.2rem;
    }

    .top-bar {
        gap: 0.75rem;
        top: 110px;
        padding: 0.75rem;
        /* Removed flex-direction: column to keep horizontal layout */
    }

    .top-bar a {
        padding: 0.4rem 0.8rem;
        min-width: 80px; /* Slightly smaller for mobile */
        font-size: 0.8rem;
    }

    .main-content {
        padding-top: 180px; /* Offset for mobile header (~110px) and top bar (~70px) */
    }

    .games-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 1rem;
        /* min-height: calc(100vh - 180px - 70px);*/ /* Adjust for mobile */
    }

    /* No mobile-specific overrides for .game-card or .game-info to maintain fixed height */
    .privacy-content {
        margin: 1rem;
        padding: 1rem;
        min-height: calc(100vh - 180px - 70px); /* Adjust for mobile */
    }

    .privacy-content h4 {
        font-size: 1.3rem;
    }

    .privacy-content p,
    .privacy-content ul {
        font-size: 0.9rem;
    }
}