/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Gill Sans', 'Gill Sans MT', Calibri, 'Trebuchet MS', sans-serif;
}

body {
    background: linear-gradient(120deg, #ffecd2, #fcb69f);
    color: #000000;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100vh;
    overflow: hidden;
    animation: gradientBackground 15s ease infinite;
}

.container {
    text-align: center;
    padding: 20px;
}

.title {
    font-size: 3rem;
    margin-bottom: 40px;
    animation: slideIn 2s ease-in-out, fadeIn 2s ease-in-out;
}

/* Animation for title */
@keyframes slideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.main-buttons {
    margin-bottom: 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.main-buttons button {
    background-color: #007bff;
    color: #ffffff;
    border: none;
    padding: 15px 30px;
    cursor: pointer;
    border-radius: 10px;
    font-size: 1.2rem;
    transition: background-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}

.main-buttons button:hover {
    background-color: #0056b3;
    transform: scale(1.1);
    box-shadow: 0 0 15px rgba(0, 123, 255, 0.5);
}

.game-panel, .tech-panel {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0, 0, 0, 0.8);
    justify-content: center;
    align-items: center;
}

.panel-content {
    position: relative;
    background: rgba(255, 255, 255, 0.95);
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
    max-width: 800px;
    width: 90%;
    text-align: center;
    transform: scale(0.7);
    animation: scaleUp 0.5s ease forwards;
    max-height: 90vh; /* Ensure the panel does not exceed viewport height */
    overflow-y: auto; /* Enable vertical scrolling */
}

.close-btn {
    position: absolute;
    top: 10px;
    right: 20px;
    font-size: 2rem;
    cursor: pointer;
    color: #000;
}

.buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
}

.buttons a {
    display: block;
    width: 80px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.buttons img {
    width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
}

.buttons a:hover {
    transform: scale(1.1);
    box-shadow: 0 0 30px rgba(255, 255, 255, 0.7);
}

.tech-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
}

.tech-button {
    padding: 20px;
    background-color: #28a745;
    color: #ffffff;
    border-radius: 10px;
    text-align: center;
    font-size: 1.5rem;
    text-decoration: none;
    width: 250px; /* Increased width */
    height: 70px; /* Increased height */
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}

.tech-button:hover {
    background-color: #218838;
    transform: scale(1.1);
    box-shadow: 0 0 15px rgba(40, 167, 69, 0.5);
}

/* Keyframes for animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}

@keyframes scaleUp {
    from {
        transform: scale(0.7);
    }
    to {
        transform: scale(1);
    }
}

@keyframes scaleDown {
    from {
        transform: scale(1);
    }
    to {
        transform: scale(0.7);
    }
}

@keyframes gradientBackground {
    0% {
        background: linear-gradient(120deg, #ffecd2, #fcb69f);
    }
    25% {
        background: linear-gradient(120deg, #ffb3ba, #ffdfba);
    }
    50% {
        background: linear-gradient(120deg, #ffffba, #baffc9);
    }
    75% {
        background: linear-gradient(120deg, #bae1ff, #baffc9);
    }
    100% {
        background: linear-gradient(120deg, #ffecd2, #fcb69f);
    }
}

/* Additional animation for bounce effect */
.buttons a.bounce {
    animation: bounce 1s;
}

/* Responsive styles */
@media (max-width: 600px) {
    h1 {
        font-size: 2.5rem;
    }

    .main-buttons {
        flex-direction: column;
        align-items: center;
    }

    .buttons, .tech-buttons {
        flex-direction: column;
        align-items: center;
    }

    .buttons a, .tech-buttons a {
        width: 100%; /* Full width buttons on mobile devices */
    }

    .main-buttons button {
        width: 100%; /* Full width buttons on mobile devices */
        padding: 12px 25px; /* Adjust padding for main buttons on mobile devices */
        margin: 10px 0; /* Add margin to separate buttons */
    }

    .tech-button {
        width: 100%; /* Full width for tech buttons on mobile devices */
        height: 60px; /* Adjust height for tech buttons on mobile devices */
    }
}

@media (min-width: 600px) {
    h1 {
        font-size: 2.5rem;
    }

    .buttons a, .tech-buttons a {
        width: 150px;
    }

    .tech-button {
        width: 250px; /* Adjusted width for tech buttons on larger screens */
        height: 70px; /* Adjusted height for tech buttons on larger screens */
    }
}

@media (min-width: 768px) {
    h1 {
        font-size: 3rem;
    }

    .buttons a, .tech-buttons a {
        width: 180px;
    }

    .tech-button {
        width: 300px; /* Further adjustment for tech buttons on larger screens */
        height: 80px; /* Further adjustment for tech buttons on larger screens */
    }
}

@media (min-width: 1024px) {
    h1 {
        font-size: 3.5rem;
    }

    .buttons a, .tech-buttons a {
        width: 200px;
    }

    .tech-button {
        width: 350px; /* Further adjustment for tech buttons on larger screens */
        height: 90px; /* Further adjustment for tech buttons on larger screens */
    }
}
