/* General Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Arial, sans-serif;
}

body {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background-color: #f0f0f0;
    overflow: scroll;
    padding: 10px; /* Added padding for smaller screens */
}

#main-content {
    text-align: center;
    width: 100%;
    max-width: 600px; /* Restrict width for large screens */
    min-width: 300px; /* Ensure minimum width on small screens */
    padding: 20px;
}

/* Loading Spinner */
#loading-spinner {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border: 8px solid #f3f3f3;
    border-top: 8px solid #3498db;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Logo */
.logo img {
    width: 350px;
    max-width: 100%;
    margin-bottom: 20px;
}

/* Header Text */
.header {
    font-size: 2em;
    margin-bottom: 40px;
    color: #444;
}

/* Button Grid Layout */
.button-grid {
    display: grid;
    grid-template-columns: repeat(3, 200px);
    gap: 60px;
    justify-content: center;
}

/* Button Styles */
.button {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: #444;
    padding: 20px;
    background-color: #ffffff;
    border-radius: 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    z-index: 1;
}

.button img {
    width: 100px;
    height: 100px;
    margin-bottom: 10px;
    transition: transform 0.3s;
}

.button span {
    font-size: 1em;
    font-weight: bold;
    color: #444;
}

/* Button Hover and Active Effects */
.button:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 12px rgba(0, 0, 0, 0.2);
}

.button:hover img {
    transform: scale(1.1);
}

.button:active {
    transform: scale(0.95);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.15);
}

/* Hint Tooltip */
.button[data-hint]:hover::after {
    content: attr(data-hint);
    position: absolute;
    bottom: -40px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #333;
    color: #fff;
    padding: 8px 10px;
    border-radius: 10px;
    font-size: 0.9em;
    max-width: 250px; /* Set a max width */
    white-space: normal; /* Allow line breaks */
    text-align: center;
    z-index: 1000; /* Ensures tooltip is in front of other elements */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* Responsive Design for Smaller Screens */
@media (max-width: 768px) {
    .logo img {
        width: 200px;
        max-width: 100%;
        margin-bottom: 20px;
    }

    .header {
        font-size: 1.5em;
        margin-bottom: 20px;
    }

    .button-grid {
        grid-template-columns: repeat(2, 120px); /* Smaller button grid for tablets */
        gap: 30px;
    }

    .button {
        padding: 15px;
    }

    .button img {
        width: 80px;
        height: 80px;
    }

    .button span {
        font-size: 0.9em;
    }

    /* Hide hint messages on smaller screens */
    .button[data-hint]:hover::after {
        display: none;
    }
}

@media (max-width: 480px) {
    .logo img {
        width: 150px;
        max-width: 100%;
        margin-bottom: 20px;
    }

    .header {
        font-size: 1.2em;
        margin-bottom: 10px;
    }

    .button-grid {
        grid-template-columns: 1fr; /* Single column layout for phones */
        gap: 15px;
    }

    .button {
        padding: 10px;
    }

    .button img {
        width: 60px;
        height: 60px;
    }

    .button span {
        font-size: 0.8em;
    }

    /* Hide hint messages on smaller screens */
    .button[data-hint]:hover::after {
        display: none;
    }
}
