body, html {
    margin: 0;
    padding: 0;
    font-family: 'Orbitron', sans-serif;
    background-color: #000000;
    color: white;
    min-height: 100vh;
    overflow-x: hidden;
}

#background-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.container {
    max-width: 1800px;
    margin: 0 auto;
    padding: 2rem;
    position: relative;
    z-index: 1;
}

header {
    text-align: center;
    margin-bottom: 3rem;
}

h1 {
    color: #60a5fa;
    font-size: 4rem;
    margin-bottom: 0.5rem;
    text-shadow: 0 0 10px rgba(96, 165, 250, 0.7);
}

.subtitle {
    color: #94a3b8;
    font-size: 2rem;
}

/* Base game grid styles */
.game-grid {
    display: grid;
    gap: 2rem;
    margin-bottom: 3rem;
}

/* Message container styles */
.message {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 200px;
    grid-column: 1 / -1;
    text-align: center;
    font-size: 1.5rem;
    color: #94a3b8;
    background-color: rgba(30, 41, 59, 0.8);
    border-radius: 1rem;
    padding: 2rem;
    margin: 2rem auto;
    max-width: 600px;
    box-shadow: 0 0 20px rgba(96, 165, 250, 0.2);
}

/* Landscape layout */
.landscape-layout {
    grid-template-columns: repeat(auto-fit, minmax(750px, 1fr));
}

/* Portrait layout */
.portrait-layout {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

@media (min-width: 768px) {
    .portrait-layout {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1200px) {
    .portrait-layout {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Base grid cell styles */
.grid-cell {
    position: relative;
    width: 100%;
    border-radius: 3rem;
    overflow: hidden;
    text-decoration: none;
    color: #60a5fa;
    transition: all 0.3s ease;
    box-shadow: 0 12px 18px rgba(0, 0, 0, 0.1);
    background-color: #1e293b;
    cursor: pointer;
}

/* Landscape cell aspect ratio */
.landscape-cell {
    padding-top: 56.25%; /* 16:9 Aspect Ratio */
}

/* Portrait cell aspect ratio */
.portrait-cell {
    padding-top: 133.33%; /* 3:4 Aspect Ratio */
}

.grid-cell:hover {
    transform: translateY(-15px);
    box-shadow: 0 30px 45px rgba(0, 0, 0, 0.2);
}

.grid-cell img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.back-button {
    background-color: rgba(30, 41, 59, 0.8);
    position: absolute;
    left: 20px;
    top: 20px;
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid #4ff;
    color: #4ff;
    border-radius: 5px;
    font-family: 'Orbitron', sans-serif;
    cursor: pointer;
    transition: all 0.3s ease;
}

.back-button:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 0 15px rgba(68, 255, 255, 0.5);
}

.back-button:active {
    transform: translateY(0);
}

footer {
    text-align: center;
    margin-top: 2rem;
}

.footer-links a {
    color: #60a5fa;
    text-decoration: none;
    margin: 0 1rem;
    transition: color 0.3s ease;
    font-size: 1.5rem;
}

.footer-links a:hover {
    color: #93c5fd;
    text-shadow: 0 0 5px rgba(96, 165, 250, 0.7);
}

/* Media queries for responsiveness */
@media (max-width: 1600px) {
    .container {
        max-width: 1200px;
    }

    h1 {
        font-size: 3rem;
    }

    .subtitle {
        font-size: 1.5rem;
    }
}

@media (max-width: 1000px) {
    .container {
        max-width: 800px;
    }

    h1 {
        font-size: 2.5rem;
    }

    .subtitle {
        font-size: 1.25rem;
    }

    .footer-links a {
        font-size: 1rem;
    }

    .landscape-layout {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }

    .message {
        font-size: 1.25rem;
        min-height: 150px;
        padding: 1.5rem;
    }
}