* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Arial, sans-serif;
}

body {
    background:url("./img/bg.jpg") no-repeat center center ;
    background-size:100% 100%;
    min-height: 100vh;
}

/* Carousel */
.carousel {
    width: 100%;
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    margin-bottom: 10px;
}

.carousel-inner {
    display: flex;
    transition: transform 0.5s ease;
}

.carousel-item {
    min-width: 100%;
}

.carousel-item {
    height: 0;
    background-size: 100%;
    background-position: center;
    background-repeat: no-repeat;
    padding-bottom: 60%;
}

/* Button Container */
.button-container {
    display: grid;
    gap: 5px;
    margin-bottom: 60px; /* Space for footer on mobile */
}

/* Red Buttons */
.red-button { 
    aspect-ratio: 1.4;
    position: relative;
    transition: transform 0.2s ease;
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
}

.red-button:hover {
    transform: translateY(-2px); 
}

/* Footer Navigation */
.footer-nav {
    background-color: #333;
    position: fixed;
    bottom: 10px;
    left:50%;
    transform: translateX(-50%);
    right: 0;
    width: 90%;
    display: flex;
    justify-content: space-around;
    padding: 10px 0;
    border-radius: 30px;
    background: rgba(219, 73, 73, 0.75); /* 紅色透明背景 */
    backdrop-filter: blur(10px) saturate(150%);
    -webkit-backdrop-filter: blur(10px) saturate(150%);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
    color: white;
    font-size: 24px;
    font-weight: bold;
    text-shadow: 1px 1px 5px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);

}

.footer-nav &:div  {
    color: white;
    text-decoration: none;
    font-size: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.nav-icon {
    width: 24px;
    height: 24px;
    margin-bottom: 5px;
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
}

/* Responsive styles */
/* Mobile View */
@media (max-width: 767px) {
    .container {
        padding: 8px;
    }

    .button-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 5px;
        padding: 0 5px;
    }
    
    /* Custom grid layout for 7 buttons in 2 columns */
    .button-container {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: repeat(4, auto);
    }
    
    /* Place the 7th button in the first column of the 4th row */
    .button-container .red-button:nth-child(7) {
        grid-column: 1;
        grid-row: 4;
    }
    
    /* Hide the placeholder */
    .empty-placeholder {
        visibility: hidden;
    }

    .footer-nav {
        display: flex;
    }
}


/* Desktop View */
@media (min-width: 768px) {
    .container {
        max-width: 1200px;
        margin: 0 auto;
        padding: 20px;
        display: flex;
        flex-direction: column;
        min-height: 100vh;
    }

    .carousel {
        flex: 1;
        max-height: calc(100vh - 120px);
        margin-bottom: 20px;
    }

    .carousel-item {
        height: calc(100vh - 120px);
    }

    .button-container {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: rgba(208, 208, 208, 0.7);
        border-radius: 15px;
        backdrop-filter: blur(10px) saturate(150%);
        -webkit-backdrop-filter: blur(10px) saturate(150%);
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
        grid-template-columns: repeat(4, 1fr);
        margin: 0;
        padding: 15px 20px;
        max-width: 100%;
        z-index: 100;
        gap: 15px;
    }
    
    .red-button {
        aspect-ratio: 1.5;
    }
    
    /* Show all buttons in desktop view */
    .empty-placeholder {
        display: none;
    }

    .footer-nav {
        display: none;
    }
}