/* --- Variables - Refined for Deeper Neon & More Contrast --- */
:root {
    --bg-dark: #07001C; /* Very dark blue-purple, almost black for depth */
    --card-bg: #150A2E; /* Darker purple for main elements */
    --accent-purple: #9B30FF; /* Brighter, more vibrant purple for accents */
    --accent-cyan: #00E5FF; /* Electric cyan, very bright */
    --text-light: #F0F0F0; /* Brighter general text */
    --text-muted: #BDBDBD; /* Slightly lighter muted text */

    /* NEW: Dedicated Neon Glow Colors - High Contrast */
    --neon-glow-primary: rgba(0, 229, 255, 0.9); /* Strongest cyan glow */
    --neon-glow-secondary: rgba(155, 48, 255, 0.7); /* Strongest purple glow */
    --neon-glow-tertiary: rgba(0, 229, 255, 0.4); /* Fainter cyan for wider spread */
    --neon-glow-quaternary: rgba(155, 48, 255, 0.3); /* Fainter purple for wider spread */

    --button-primary-bg: var(--accent-purple);
    --button-primary-hover-bg: #AE50FF; /* Lighter purple on hover */
    --button-secondary-bg: #3A2A5E; /* Darker, subtle button */
    --button-secondary-hover-bg: #4A3A70;

    --border-color: rgba(255, 255, 255, 0.1); /* Subtle internal border for depth */

    /* ECP Icon Color - Matches primary neon for consistency */
    --ecp-icon-color: var(--accent-cyan);
    --ecp-icon-color-rgb: 0, 229, 255; /* RGB for shadow */
}

/* --- General Body & Base Styles --- */
body {
    font-family: 'Oxanium', sans-serif;
    margin: 0;
    padding: 0;
    background-color: var(--bg-dark);
    color: var(--text-light);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    box-sizing: border-box;
    /* NEW: Subtle radial gradient on body for depth */
    background: radial-gradient(circle at center, rgba(15, 0, 48, 0.6) 0%, var(--bg-dark) 70%);
}

/* NEW: Pulsing background grid */
.background-grid {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        linear-gradient(to right, rgba(0, 229, 255, 0.05) 1px, transparent 1px), /* More subtle cyan grid */
        linear-gradient(to bottom, rgba(0, 229, 255, 0.05) 1px, transparent 1px);
    background-size: 50px 50px;
    opacity: 0.15; /* Slightly less opaque */
    z-index: -1;
    animation: grid-pan 60s linear infinite, grid-fade 5s infinite alternate; /* Added fade animation */
}

@keyframes grid-pan {
    0% { background-position: 0 0; }
    100% { background-position: -500px -500px; }
}

/* NEW: Grid subtle fade/pulse */
@keyframes grid-fade {
    0% { opacity: 0.15; }
    100% { opacity: 0.25; }
}

/* --- "Under Development" Warning --- */
body > p { /* Target the direct child p element for the warning */
    position: fixed; /* Keep it visible regardless of scroll */
    top: 10px;
    left: 48%;
    transform: translateX(-50%);
    background-color: rgba(255, 165, 0, 0.8); /* Orange warning */
    color: #333;
    padding: 8px 55px;
    border-radius: 5px;
    font-weight: 900;
    font-size: 0.9em;
    z-index: 1000; /* Ensure it's on top */
    box-shadow: 0 0 10px rgba(255, 165, 0, 0.6);
    animation: warningPulse 1.5s infinite alternate;
}

@keyframes warningPulse {
    0% { box-shadow: 0 0 10px rgba(255, 165, 0, 0.6); }
    100% { box-shadow: 0 0 15px rgba(255, 165, 0, 0.9), 0 0 25px rgba(255, 165, 0, 0.4); }
}


/* --- Go Home Button --- */
.Go-home-div {
    position: fixed; /* Fixed position relative to viewport */
    top: 20px;
    left: 20px;
    background-color: transparent; /* Make background transparent */
    border: 2px solid var(--accent-purple); /* Border from purple accent */
    border-radius: 8px;
    padding: 8px 15px;
    z-index: 999; /* High z-index */
    transition: all 0.3s ease;
    /* Removed animation from Go-home-div to apply to link for text glow */
    box-shadow: 0 0 10px rgba(155, 48, 255, 0.4); /* Subtle initial glow */
}

.Go-home-div:hover {
    box-shadow: 0 0 15px var(--neon-glow-secondary), 0 0 25px rgba(155, 48, 255, 0.5); /* Stronger glow on hover */
    transform: translateY(-2px);
    border-color: var(--accent-cyan); /* Cyan border on hover */
}
.Go-home {
    color: var(--text-light);
    text-decoration: none;
    font-weight: 700; /* This won't affect the icon's weight much, but keep it */
    font-size: 1.8em; /* <--- INCREASE THIS FOR ICON SIZE (e.g., 1.8em for a good size) */
    text-shadow: none; /* <--- REMOVE OR SET TO NONE, as text-shadow doesn't look right on icons */
    transition: all 0.3s ease; /* <--- Changed to 'all' for smoother transitions on icon */
    animation: pulsateGoHome 2s infinite alternate ease-in-out; /* Still applies color/shadow */
    display: flex; /* <--- NEW: Use flexbox to center the icon if padding is added to Go-home-div */
    align-items: center; /* <--- NEW: Center icon vertically */
    justify-content: center; /* <--- NEW: Center icon horizontally */
}

/* Redefine pulsateGoHome if you want the icon's glow to be different from text */
/* Otherwise, the existing pulsateGoHome for text-shadow will apply to the icon's color/shadow,
   which might still look cool, so you might not need to change this specific @keyframes
   unless the default text-shadow causes issues on the icon. */
@keyframes pulsateGoHome {
    0% {
        color: var(--text-light);
        text-shadow: 0 0 5px var(--text-light), 0 0 10px rgba(240, 240, 240, 0.2);
    }
    100% {
        color: var(--accent-cyan); /* Icon glows to cyan */
        text-shadow: 0 0 8px var(--accent-cyan), 0 0 15px rgba(0, 229, 255, 0.4);
    }
}


.Go-home:hover {
    color: var(--accent-cyan); /* Icon color changes to cyan on hover */
    /* Remove text-shadow here if you set it to none above, or adjust for icon glow */
    text-shadow: 0 0 15px var(--accent-cyan), 0 0 25px rgba(0, 229, 255, 0.5); /* Icon glow on hover */
}

/* Also, adjust .Go-home-div padding if the icon looks too small/big within it */
.Go-home-div {
    /* ... existing styles ... */
    padding: 10px 18px; /* <--- Adjust padding here to fit the new icon size better */
}


/* --- Main Header Styling --- */
.main-header {
    background-color: var(--card-bg);
    padding: 30px 40px;
    border-radius: 15px;
    box-shadow:
        0 0 20px var(--neon-glow-secondary), /* Purple inner glow */
        0 0 40px var(--neon-glow-primary),   /* Cyan outer glow */
        0 10px 40px rgba(0, 0, 0, 0.6);      /* Standard shadow for depth */
    text-align: center;
    max-width: 900px;
    width: calc(100% - 40px);
    border: 2px solid var(--accent-purple); /* Thicker, more prominent border */
    position: relative;
    z-index: 1;
    margin: 80px auto 40px auto; /* More top margin to accommodate fixed warning/home btn */
    box-sizing: border-box;
    /* NEW: Entrance animation for the header */
    animation: fadeInSlideDown 1s ease-out forwards;
}

/* NEW: Header entrance animation */
@keyframes fadeInSlideDown {
    from { opacity: 0; transform: translateY(-50px); }
    to { opacity: 1; transform: translateY(0); }
}

.main-header h1 {
    font-family: 'Orbitron', sans-serif;
    color: var(--accent-cyan);
    margin-bottom: 15px;
    font-size: 2.5em; /* Larger title */
    text-shadow:
        0 0 20px var(--neon-glow-primary),
        0 0 40px var(--neon-glow-primary),
        0 0 60px var(--neon-glow-tertiary),
        0 0 80px var(--neon-glow-tertiary); /* Intense, layered cyan glow */
    animation: pulsateGlow 2s infinite alternate; /* Existing pulsate animation */
}

/* Redefined pulsateGlow for the main H1 to use new variables */
@keyframes pulsateGlow {
    0% {
        text-shadow: 0 0 15px var(--neon-glow-primary), 0 0 25px var(--neon-glow-tertiary);
    }
    100% {
        text-shadow: 0 0 20px var(--neon-glow-primary), 0 0 35px var(--neon-glow-primary), 0 0 50px var(--neon-glow-tertiary);
    }
}

.main-header p {
    font-size: 1.4em; /* Slightly larger paragraph */
    color: var(--text-light);
    opacity: 0.9;
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.3); /* Subtle text shadow */
}

/* --- Game Showcase Layout --- */
.game-showcase {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); /* Slightly larger min-width for cards */
    gap: 40px; /* Increased gap between cards */
    padding: 30px 40px; /* More padding */
    max-width: 1400px; /* Wider showcase */
    margin: 40px auto 60px auto; /* More vertical margin */
    flex-grow: 1;
}

/* --- Individual Game Card Styling --- */
.game-card {
    background-color: var(--card-bg);
    border-radius: 18px; /* Slightly more rounded */
    overflow: hidden;
    box-shadow:
        0 0 15px var(--neon-glow-quaternary), /* Subtle purple glow */
        0 0 30px var(--neon-glow-tertiary),   /* Subtle cyan glow */
        0 10px 40px rgba(0, 0, 0, 0.6);      /* Standard depth shadow */
    border: 3px solid var(--accent-purple); /* Thicker, defined border */
    transition: transform 0.4s ease, box-shadow 0.4s ease, border-color 0.4s ease; /* Longer transition */
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    animation: cardEntrance 0.8s ease-out forwards; /* NEW: Card entrance animation */
    /* Removed default neonBorderPulse from cards as it was too much. Replaced with hover effect. */
}

/* NEW: Card entrance animation (staggered if JS is used, otherwise all at once) */
@keyframes cardEntrance {
    from { opacity: 0; transform: translateY(50px) scale(0.9); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.game-card:hover {
    transform: translateY(-12px) scale(1.02); /* More pronounced lift and slight scale */
    box-shadow:
        0 0 25px var(--neon-glow-primary),    /* Intense cyan glow */
        0 0 50px var(--neon-glow-primary),
        0 0 80px var(--neon-glow-tertiary),
        0 18px 60px rgba(0, 0, 0, 0.8);       /* Deeper shadow for elevation */
    border-color: var(--accent-cyan); /* Border changes to cyan on hover */
    z-index: 2; /* Bring hovered card slightly above others */
}

.game-card img {
    width: 100%;
    height: 250px; /* Slightly taller images */
    object-fit: cover;
    border-bottom: 2px solid var(--border-color); /* More visible border */
    transition: transform 0.3s ease;
}

.game-card:hover img {
    transform: scale(1.03); /* Subtle image zoom on card hover */
}

.game-card h2 {
    font-family: 'Orbitron', sans-serif;
    font-size: 2.2em; /* Larger heading */
    margin: 1.8rem 0.5rem 1rem; /* Adjusted margins */
    color: var(--accent-cyan);
    text-shadow: 0 0 12px var(--neon-glow-primary), 0 0 20px var(--neon-glow-tertiary); /* Stronger text glow */
}

.game-card p {
    font-size: 1.1em; /* Slightly larger paragraph text */
    padding: 0 1.8rem 1.2rem; /* More padding */
    color: var(--text-muted);
    flex-grow: 1;
    line-height: 1.6;
    text-shadow: 0 0 3px rgba(255, 255, 255, 0.1); /* Very subtle text shadow */
}

/* --- Button Styling (from Nickname Generator Site) --- */
.action-button {
    border: none;
    padding: 15px 35px; /* More padding */
    border-radius: 10px; /* Slightly more rounded */
    font-size: 1.2em; /* Larger text */
    cursor: pointer;
    transition: background-color 0.4s ease, transform 0.3s ease, box-shadow 0.4s ease, color 0.4s ease; /* All properties transition */
    font-weight: 700;
    letter-spacing: 1px; /* Tighter letter spacing for impact */
    text-transform: uppercase;
    text-decoration: none;
    display: inline-block;
    margin-bottom: 30px; /* More space below button */
    font-family: 'Oxanium', sans-serif;
    outline: none; /* Remove default outline */
    text-shadow: 0 0 5px rgba(255,255,255,0.4); /* Initial text shadow */
}

.primary-button {
    background-color: var(--button-primary-bg);
    color: var(--text-light); /* Button text color */
    box-shadow: 0 0 15px var(--neon-glow-secondary), 0 0 25px var(--neon-glow-quaternary); /* Initial subtle purple glow */
    border: 2px solid var(--button-primary-bg); /* Match border to bg */
}

.primary-button:hover {
    background-color: var(--button-primary-hover-bg);
    transform: translateY(-5px); /* More pronounced lift */
    box-shadow:
        0 0 20px var(--neon-glow-primary),    /* Intense cyan glow */
        0 0 40px var(--neon-glow-primary),
        0 0 60px var(--neon-glow-tertiary);
    border-color: var(--accent-cyan); /* Border changes to cyan on hover */
    filter: brightness(1.2); /* Brighter on hover */
    text-shadow: 0 0 8px var(--text-light), 0 0 15px var(--accent-cyan); /* Stronger text shadow on hover */
}

.primary-button:active {
    transform: translateY(-2px); /* Slight push back */
    box-shadow: 0 0 10px var(--neon-glow-primary);
    filter: brightness(0.9);
}

.secondary-button { /* General secondary button (not used in HTML, but styled) */
    background-color: var(--button-secondary-bg);
    color: var(--text-light);
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
    border: 1px solid var(--button-secondary-bg);
}

.secondary-button:hover {
    background-color: var(--button-secondary-hover-bg);
    transform: translateY(-3px);
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.4), 0 0 20px rgba(255, 255, 255, 0.1);
}

/* --- Footer Styling --- */
.main-footer {
    background-color: var(--card-bg);
    color: var(--text-muted);
    text-align: center;
    padding: 1.8rem 0; /* More padding */
    margin-top: 80px; /* More margin from content */
    border-top: 2px solid var(--accent-purple); /* Thicker border */
    width: 100%;
    box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.3), 0 0 15px var(--neon-glow-quaternary); /* Subtle glow on footer */
    font-size: 0.95em;
}


/* --- NEW STYLES FOR AUTHENTICATION AND LAYOUT TOGGLING (Refined) --- */

/* Top Game Info (ECP and User Info) - Assume these will be present if logged in */
.top-game-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: 1400px; /* Match game-showcase max-width for alignment */
    margin: 30px auto 10px auto; /* Adjust top margin as needed */
    padding: 12px 25px; /* More padding */
    box-sizing: border-box;
    background-color: var(--card-bg);
    border-radius: 12px;
    border: 2px solid var(--accent-purple);
    box-shadow: 0 0 15px var(--neon-glow-secondary), 0 0 25px var(--neon-glow-quaternary); /* Enhanced glow */
    animation: fadeInSlideDown 0.8s ease-out forwards; /* Entrance animation */
}

.ecp-display {
    color: var(--accent-cyan);
    font-size: 1.6em; /* Larger ECP display */
    font-family: 'Orbitron', sans-serif;
    display: flex;
    align-items: center;
    gap: 10px;
    text-shadow: 0 0 10px var(--accent-cyan), 0 0 20px var(--neon-glow-tertiary); /* Stronger glow */
}

.coin-icon {
    color: var(--ecp-icon-color); /* Uses new variable */
    text-shadow: 0 0 8px var(--ecp-icon-color), 0 0 15px rgba(var(--ecp-icon-color-rgb), 0.5); /* Stronger glow based on color */
    font-size: 1.1em; /* Slightly larger icon */
}

.user-info {
    color: var(--text-light);
    font-size: 1.2em; /* Larger user info */
    display: flex;
    align-items: center;
    gap: 12px;
    background-color: var(--button-secondary-bg);
    padding: 10px 20px; /* More padding */
    border-radius: 25px; /* More rounded */
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.4), 0 0 10px var(--neon-glow-quaternary); /* Subtle shadow/glow */
    border: 1px solid var(--accent-cyan); /* Cyan border */
}

#loggedInUserEmail {
    font-weight: bold;
    color: var(--accent-cyan);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 180px; /* Increased max-width for email */
    text-shadow: 0 0 5px var(--accent-cyan);
}

#logoutButton {
    padding: 8px 18px; /* More padding */
    font-size: 1em; /* Larger font */
    margin-left: 10px; /* More margin */
    /* Inherits action-button styles, then primary/secondary specific styles can apply */
    background-color: var(--button-secondary-bg); /* Use secondary button style */
    color: var(--text-light);
    border: 1px solid var(--accent-purple);
    box-shadow: 0 0 8px rgba(0,0,0,0.3);
}

#logoutButton:hover {
    background-color: var(--button-secondary-hover-bg);
    border-color: var(--accent-cyan);
    box-shadow: 0 0 15px var(--neon-glow-quaternary);
}

/* Auth Section Styling */
.auth-form {
    background-color: var(--card-bg);
    padding: 50px 40px; /* More padding */
    border-radius: 20px; /* More rounded */
    box-shadow:
        0 0 30px var(--neon-glow-secondary), /* Purple glow */
        0 0 60px var(--neon-glow-quaternary), /* Wider purple glow */
        0 0 15px var(--neon-glow-tertiary); /* Cyan accent glow */
    border: 3px solid var(--accent-purple); /* Thicker border */
    width: 100%;
    max-width: 500px; /* Slightly wider form */
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    gap: 25px; /* More space between elements */
    align-items: center;
    margin-top: 50px; /* Adjust margin as needed */
    margin-bottom: 60px;
    animation: fadeInScale 0.8s ease-out forwards; /* Entrance animation */
}

/* NEW: Auth form entrance animation */
@keyframes fadeInScale {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}


.auth-form .card-title {
    font-size: 2.5em; /* Larger title */
    color: var(--accent-cyan);
    margin-bottom: 30px; /* More space */
    display: flex;
    align-items: center;
    gap: 15px;
    text-shadow: 0 0 15px var(--neon-glow-primary), 0 0 25px var(--neon-glow-tertiary); /* Stronger glow */
}

.auth-form .input-area {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px; /* More space */
}

.auth-form .input-label {
    font-size: 1.2em; /* Larger label */
    color: var(--accent-purple);
    font-family: 'Oxanium', sans-serif;
    text-shadow: 0 0 5px var(--accent-purple); /* Subtle glow */
}

.auth-form .text-input {
    width: 100%;
    padding: 15px 20px; /* More padding */
    background-color: var(--bg-dark); /* Darker input background */
    border: 2px solid var(--accent-cyan); /* Cyan border */
    border-radius: 10px; /* More rounded */
    color: var(--text-light);
    font-family: 'Oxanium', sans-serif;
    font-size: 1.2em; /* Larger font */
    box-shadow: 0 0 10px rgba(0, 229, 255, 0.4); /* Cyan glow */
    transition: box-shadow 0.3s ease, border-color 0.3s ease;
    box-sizing: border-box;
}

.auth-form .text-input::placeholder {
    color: var(--text-muted);
    opacity: 0.8; /* Slightly more visible placeholder */
}

.auth-form .text-input:focus {
    outline: none;
    border-color: var(--accent-purple); /* Purple border on focus */
    box-shadow: 0 0 15px var(--neon-glow-secondary), 0 0 25px var(--neon-glow-quaternary); /* Stronger purple glow on focus */
}

.auth-controls {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px; /* More space between buttons */
    width: 100%;
    margin-top: 30px; /* More top margin */
}

/* Auth buttons get primary-button styles, if they have the class */
.auth-controls .action-button {
    /* These will automatically inherit from .action-button and .primary-button */
}

.feedback-message {
    margin-top: 20px; /* More margin */
    font-size: 1.1em; /* Larger font */
    font-weight: 600; /* Slightly bolder */
    text-align: center;
    padding: 10px 20px; /* More padding */
    border-radius: 8px; /* More rounded */
    width: 100%;
    box-sizing: border-box;
    display: none;
    animation: fadeIn 0.5s ease-out forwards; /* Fade in animation */
}

.feedback-message.error {
    color: #FF6B6B; /* Brighter red */
    background-color: rgba(255, 107, 107, 0.2);
    border: 1px solid #FF6B6B;
    box-shadow: 0 0 10px rgba(255, 107, 107, 0.5);
    display: block;
}

.feedback-message.success {
    color: #6BFF6B; /* Brighter green */
    background-color: rgba(107, 255, 107, 0.2);
    border: 1px solid #6BFF6B;
    box-shadow: 0 0 10px rgba(107, 255, 107, 0.5);
    display: block;
}

.feedback-message.info {
    color: var(--accent-cyan);
    background-color: rgba(0, 229, 255, 0.2);
    border: 1px solid var(--accent-cyan);
    box-shadow: 0 0 10px rgba(0, 229, 255, 0.5);
    display: block;
}

/* General Styles for hidden/active screens (important for toggling visibility) */
.game-screen {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    box-sizing: border-box;
    /* transition: opacity 0.5s ease-in-out; */ /* Removed for instant swap, can add back later */
}

.hidden-screen {
    display: none;
    opacity: 0;
    pointer-events: none;
    visibility: hidden;
    height: 0;
    overflow: hidden;
    margin: 0;
    padding: 0;
}

.active-screen {
    display: flex;
    opacity: 1;
    pointer-events: auto;
    visibility: visible;
    position: relative;
    height: auto;
    margin: auto;
    padding: 20px;
}

body {
    display: block;
    min-height: 100vh;
}

#authSection, #gamesContentSection {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
}

#authSection .main-header,
#gamesContentSection .main-header {
    margin-top: 0;
}

#gamesContentSection .main-footer {
    margin-top: auto;
}

/* --- Responsive Adjustments (Adapted & Enhanced) --- */
@media (max-width: 1024px) {
    .game-showcase {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        gap: 30px;
        padding: 25px 30px;
        max-width: 1200px;
    }
    .game-card img {
        height: 220px;
    }
}

@media (max-width: 900px) {
    .main-header {
        padding: 25px 30px;
        margin: 70px auto 30px auto;
    }
    .main-header h1 {
        font-size: 2.5em;
    }
    .main-header p {
        font-size: 1.2em;
    }
    .game-showcase {
        padding: 20px 20px;
        gap: 25px;
    }
    .game-card h2 {
        font-size: 2em;
    }
    .game-card img {
        height: 200px;
    }
    .action-button {
        padding: 13px 30px;
        font-size: 1.1em;
    }
}

@media (max-width: 768px) {
    .main-header {
        padding: 20px 25px;
        margin: 60px auto 25px auto;
        max-width: 90%;
    }
    .main-header h1 {
        font-size: 2.5em;
    }
    .main-header p {
        font-size: 1.1em;
    }
    .game-showcase {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        padding: 15px;
        gap: 20px;
    }
    .game-card h2 {
        font-size: 1.8em;
    }
    .game-card p {
        font-size: 1em;
        padding: 0 1.2rem 1rem;
    }
    .action-button {
        padding: 11px 25px;
        font-size: 1em;
    }
    .top-game-info {
        flex-direction: column;
        gap: 15px;
        padding: 15px 20px;
        margin: 20px auto 10px auto;
    }
    .ecp-display {
        font-size: 1.4em;
    }
    .user-info {
        font-size: 1.1em;
        width: 100%;
        justify-content: center;
    }
    #loggedInUserEmail {
        max-width: 150px;
    }
    #logoutButton {
        margin-left: 0;
    }
    .auth-form {
        padding: 40px 30px;
        max-width: 450px;
        margin-top: 30px;
    }
}

@media (max-width: 580px) {
    .Go-home-div {
        top: 50px;
        left: 21px;
        padding: 6px 22px;
    }
    .Go-home {
        font-size: 0.9em;
    }
    body > p {
        top: 50px; /* Adjust if home button causes overlap */
        font-size: 0.4em;
    }
    .main-header {
        padding: 15px 20px;
        margin: 50px auto 20px auto;
        width: calc(100% - 30px);
    }
    .main-header h1 {
        font-size: 2.2em;
        margin-bottom: 10px;
    }
    .main-header p {
        font-size: 0.8em;
    }
    .game-showcase {
        grid-template-columns: 1fr;
        padding: 10px;
        gap: 15px;
        margin: 20px auto 40px auto;
        width: calc(100% - 20px);
    }
    .game-card {
        margin: 0;
        border-radius: 12px;
    }
    .game-card img {
        height: 180px;
    }
    .game-card h2 {
        font-size: 1.6em;
        margin: 1.2rem 0.5rem 0.6rem;
    }
    .game-card p {
        font-size: 0.9em;
        padding: 0 1rem 0.8rem;
    }
    .action-button {
        padding: 10px 20px;
        font-size: 0.9em;
        margin-bottom: 20px;
    }
    .main-footer {
        padding: 1.2rem 10px;
        margin-top: 50px;
        font-size: 0.85em;
    }
    .auth-form {
        padding: 30px 20px;
        max-width: 95%;
        margin-top: 20px;
    }
    .auth-form .card-title {
        font-size: 2em;
        margin-bottom: 20px;
    }
    .auth-form .input-label {
        font-size: 1em;
    }
    .auth-form .text-input {
        padding: 12px 15px;
        font-size: 1.1em;
    }
    .auth-controls {
        gap: 15px;
        margin-top: 20px;
    }
    .feedback-message {
        font-size: 0.9em;
        padding: 8px 15px;
        margin-top: 15px;
    }
}
