:root {
    --bg-color: #1a1a2e; /* Dark blue/purple */
    --card-bg: #16213e;
    --accent-color: #0f3460;
    --highlight-color: #e94560;
    --text-color: #e0fbfc;
    --footer-text: #a0a0c0;
    --font-primary: 'Orbitron', sans-serif; /* Sci-fi/tech font */
    --font-secondary: 'Roboto', sans-serif;
}

body {
    margin: 0;
    font-family: var(--font-secondary);
    background-color: var(--bg-color);
    color: var(--text-color);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    padding-top: 20px;
    box-sizing: border-box;
}

.launcher-header {
    text-align: center;
    margin-bottom: 40px;
    padding: 0 20px;
}

.launcher-header h1 {
    font-family: var(--font-primary);
    font-size: clamp(2.5em, 6vw, 4em);
    margin: 0 0 10px 0;
    color: var(--text-color);
    letter-spacing: 2px;
    font-weight: 700;
}

.launcher-header .header-highlight {
    color: var(--highlight-color);
}

.launcher-header p {
    font-size: clamp(1em, 2.5vw, 1.2em);
    color: var(--footer-text);
    margin: 0;
}

.game-launcher-container {
    display: grid;
    /* Allow cards to be slightly wider if needed */
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); /* Increased min width */
    gap: 30px;
    padding: 20px clamp(15px, 5vw, 50px); /* Horizontal padding responds */
    max-width: 1400px; /* Limit width on very large screens */
    margin: 0 auto; /* Center the grid */
    flex-grow: 1; /* Make main content fill available space */
}

.game-card {
    background-color: var(--card-bg);
    border-radius: 10px;
    overflow: hidden;
    text-decoration: none; /* Remove underline from link */
    color: var(--text-color);
    display: flex;
    flex-direction: column;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.4);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid var(--accent-color);
}

.game-card:hover {
    transform: translateY(-8px) scale(1.03);
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.6);
}

.game-thumbnail {
    width: 100%;
    /* *** INCREASED height significantly *** */
    height: 220px; /* Was 160px - adjust as desired */
    background-color: var(--accent-color); /* Fallback color */
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden; /* Hide parts of image that don't fit */
}

.game-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Cover the area, may crop */
    transition: transform 0.3s ease;
}

.game-card:hover .game-thumbnail img {
    transform: scale(1.1); /* Zoom image slightly on hover */
}

.game-info {
    padding: 15px;
    text-align: center;
    /* Removed flex-grow: 1; */
    display: flex;
    flex-direction: column;
    justify-content: center; /* Center text vertically */
    background: linear-gradient(to top, rgba(0,0,0,0.2), transparent); /* Subtle gradient */
    min-height: 60px; /* Ensure some minimum space for text */
}

.game-info h2 {
    font-family: var(--font-primary);
    font-size: 1.3em;
    margin: 0; /* Removed default margins */
    font-weight: 600;
    color: var(--highlight-color);
    /* *** ADDED styles for long text handling *** */
    white-space: nowrap;     /* Prevent wrapping */
    overflow: hidden;        /* Hide overflow */
    text-overflow: ellipsis; /* Add '...' */
    max-width: 100%;         /* Ensure it respects padding */
}

/* Placeholder for loading/error messages */
#loading-message, #error-message {
    grid-column: 1 / -1; /* Span full grid width */
    text-align: center;
    font-size: 1.2em;
    padding: 40px;
    color: var(--footer-text);
}

.launcher-footer {
    text-align: center;
    padding: 20px;
    margin-top: 40px; /* Space above footer */
    color: var(--footer-text);
    font-size: 0.9em;
}