* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Orbitron', sans-serif;
    background-color: #0d0d1a; /* Deep black-blue */
    color: #e6e6e6; /* Light gray for text */
    line-height: 1.6;
}

header {
    background: linear-gradient(90deg, #0d0d1a, #1a1a2e);
    padding: 1rem;
    text-align: center;
    border-bottom: 2px solid #00d4ff; /* Neon cyan accent */
}

h1 {
    font-size: 2.5rem;
    color: #00d4ff; /* Neon cyan */
    text-shadow: 0 0 5px rgba(0, 212, 255, 0.5);
}

nav {
    margin-top: 0.5rem;
}

.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background: transparent;
    border: 2px solid #ff007a; /* Neon magenta */
    color: #ff007a;
    text-decoration: none;
    font-weight: 700;
    transition: all 0.3s ease;
}

.btn:hover {
    background: #ff007a;
    color: #0d0d1a;
    box-shadow: 0 0 10px rgba(255, 0, 122, 0.7);
}

.hero {
    text-align: center;
    padding: 4rem 2rem;
    background: radial-gradient(circle, #1a1a2e, #0d0d1a);
}

.tagline {
    font-size: 1.2rem;
    color: #00ffcc; /* Neon teal */
    text-shadow: 0 0 3px rgba(0, 255, 204, 0.5);
}

.game-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    padding: 2rem;
}

.game-tile {
    background: #1a1a2e; /* Darker tile */
    padding: 1rem;
    text-align: center;
    border: 1px solid #00d4ff;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-decoration: none;
    color: #e6e6e6;
}

.game-tile:hover {
    transform: scale(1.05);
    box-shadow: 0 0 15px rgba(0, 212, 255, 0.5);
}

.game-placeholder {
    width: 100%;
    height: 120px;
    background: linear-gradient(45deg, #00d4ff, #ff007a);
    opacity: 0.2;
    margin-bottom: 0.5rem;
}

h3 {
    font-size: 1.2rem;
    color: #ff007a; /* Neon magenta */
}

.game-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 2rem;
    background: #0d0d1a;
}

#pongCanvas {
    display: block;
    margin: 0 auto;
    width: 700px; /* Match new canvas width */
    height: 600px;
}

#game-instructions {
    margin-top: 1rem;
    font-size: 1rem;
    color: #00ffcc;
    text-shadow: 0 0 3px rgba(0, 255, 204, 0.5);
}

/* Mobile Adjustments */
@media (max-width: 800px) {
    #pongCanvas {
        width: 100%;
        height: auto;
        max-width: 800px;
        max-height: 600px;
        aspect-ratio: 4 / 3;
    }

    .game-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    }

    .game-tile {
        padding: 0.5rem;
    }

    .game-placeholder {
        height: 90px;
    }

    h1 {
        font-size: 2rem;
    }

    .tagline {
        font-size: 1rem;
    }

    .btn {
        padding: 0.5rem 1rem;
    }

    .game-container {
        padding: 1rem;
    }
}

.mobile-controls {
    display: none; /* Hidden on desktop by default */
    flex-direction: row;
    justify-content: space-around;
    align-items: center;
    width: 100%;
    max-width: 800px;
    padding: 1rem;
}

.joystick {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #333, #555); /* Dark gray to white-gray */
    border-radius: 50%;
    position: relative;
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.8), 0 0 5px rgba(0, 0, 0, 0.5); /* 3D effect */
}

.stick {
    width: 40px;
    height: 40px;
    background: #000; /* Black stick */
    border-radius: 50%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    transition: transform 0.1s ease;
}

.shoot-button {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #333, #555);
    border: none;
    border-radius: 50%;
    color: #fff;
    font-family: 'Orbitron', sans-serif;
    font-size: 1rem;
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.8), 0 0 5px rgba(0, 0, 0, 0.5);
    cursor: pointer;
}

.shoot-button:active {
    background: linear-gradient(135deg, #555, #777);
    box-shadow: inset 0 0 15px rgba(0, 0, 0, 0.9);
}

@media (max-width: 800px) {
    .mobile-controls {
        display: flex;
    }
}
.game-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); /* Slightly narrower cards */
    gap: 20px;
    padding: 20px;
}

.game-card {
    background: #2a2a4e;
    border: 2px solid #00d4ff;
    border-radius: 10px;
    padding: 15px; /* Reduced padding */
    text-align: center;
    transition: transform 0.3s;
}

.game-card:hover {
    transform: scale(1.05);
}

.game-screenshot {
    width: 100%; /* Full width of card */
    max-width: 200px; /* Cap screenshot size */
    height: auto;
    border-radius: 5px;
    margin-bottom: 10px;
    object-fit: cover; /* Ensure image fits without distortion */
}

.btn {
    display: inline-block;
    padding: 8px 15px; /* Reduced padding for smaller buttons */
    background: #ff007a;
    color: #fff;
    text-decoration: none;
    border-radius: 5px;
    margin-top: 10px;
    font-size: 14px; /* Smaller font for button text */
}

.btn:hover {
    background: #00d4ff;
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
    background: #2a2a4e;
    margin: 15% auto;
    padding: 20px;
    border: 2px solid #00d4ff;
    border-radius: 10px;
    width: 300px;
    text-align: center;
}

.close {
    color: #fff;
    float: right;
    font-size: 28px;
    cursor: pointer;
}

.close:hover {
    color: #00d4ff;
}

input {
    width: 80%;
    padding: 10px;
    margin: 10px 0;
    border: none;
    border-radius: 5px;
    background: #1a1a2e;
    color: #fff;
}