/* Đặt toàn bộ màn hình theo kích thước bản vẽ */
* {
    padding: 0;
    margin: 0;
    box-sizing: border-box; /* Thêm box-sizing để quản lý kích thước tốt hơn */
}

:root {
    --primary-color: #229DBB; /* Màu chính */
    --background-color: #FFF; /* Màu nền */
    --font-family: 'Inter', sans-serif; /* Font chữ */
    --button-font-size: 20px; /* Kích thước font cho nút */
}

html {
    font-family: var(--font-family);



}

button {
    cursor: pointer;
}
#login-button {
    font-family: var(--font-family);

}
body {
    font-size: 16px;
    width: 100rem;
    margin: 0 auto;
    position: relative;
}

/* Ví dụ phần nội dung bên trong */
#main-logo {
    width: 8.3125rem;
    height: 8.3125rem;
    object-fit: contain;
}
#text-logo  {
    width: 23.25rem;
    height: 3.1875rem;
    object-fit: contain;
}

#login-button {
    display: inline-flex;
    padding: 10px 20px;
    justify-content: center;
    align-items: center;
    gap: 10px;
    border-radius: 30px;
    background: var(--background-color);
    color: var(--primary-color);
    font-size: var(--button-font-size);
    font-weight: 900;
    border: none;
    line-height: normal;
}

header {

    height: 4.375rem;
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
}
header svg {
    position: absolute;
    z-index: 99;


}
header .wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width:   89.125rem;
    padding: 0.62rem 6.88rem;
    height: 4.375rem;
    z-index: 100;


}
.container {
    display: flex;
    flex-direction: column;
    gap: 6rem;
    align-items: center;
    padding: 1rem;
}

.row {
    display: flex;
    gap: 1rem; /* Khoảng cách giữa các nút trong hàng */
    justify-content: center;
    width: 100%;
    align-items: center;
}

.button-wrapper {
    display: flex;
    justify-content: center;
    flex: 1 1 30%; /* Đảm bảo mỗi nút chiếm khoảng 1/3 của hàng */
    max-width: 30%;
}

.task-button {
    padding: 0.625rem 1.875rem; /* Khoảng cách bên trong */
    white-space: nowrap; /* Ngăn không cho văn bản xuống dòng */
    color: #fff;
    border-radius: 4.0625rem;
    border: none;
    box-shadow:
        0 0 0 0.1rem var(--White, #FFF), /* Lớp ngoài cùng màu trắng */
        0 0 0 0.6rem #229DBB,           /* Lớp giữa màu xanh */
        0 0 0 0.7rem var(--White, #FFF); /* Lớp trong cùng màu trắng */
    cursor: pointer;
    background-image: url('/img/button-bg.jpg');
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
    text-align: center;
    font-family: Inter, sans-serif;
    font-size: 3rem;
    font-weight: bolder;
    text-transform: uppercase;
    position: relative;
    overflow: hidden;
    transition: background-color 0.3s;
}

.task-button::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #fff;
    opacity: 0;
    transition: opacity 0.3s;
    z-index: 0; /* Đảm bảo nằm dưới văn bản */
}

.task-button:hover::before {
    opacity: 0.8;
}

.task-button span {
    position: relative; /* Đặt văn bản nằm trên lớp phủ */
    z-index: 1;
}

.task-button:hover {
    color: var(--primary-color);
}


/* Đảm bảo văn bản và nội dung button không bị lớp phủ che */


#row-1{
    margin-top: 4rem;
}
#row-2{
    margin-top: 4rem;
}



#whale-game-button {
    position: absolute;
    left: 48rem;
    top: 12rem;

}
#homework-button {
    position: absolute;
    top: 13rem;
    left: 11rem;
}
#test-button
 {
    position: absolute;
    top: 13rem;
    left: 77rem;
 }
#lecture-button
 {
    position: absolute;
    top: 29rem;
 }
#achievement-button
 {
    position: absolute;
    top: 37rem;
    left: 43rem;
 }
#mindmap-button
 {
    position: absolute;
    top: 34rem;
    left: 76rem;

 }
#back-button
 {
    position: absolute;
    top: 47rem;
    left: -3rem;

 }
 @media (max-height: 500px) and (max-width: 1000px) {
    #back-button {
        position: absolute;
        top: 40rem;
        left: 3rem; /* Change left to 3rem */
    }
}


 #obtorbus {
    position: absolute;
    z-index: 100;
    width: 10.5rem;
    height: 13.5rem;
    left: 7rem;
    top: 27rem;
    object-fit: contain;

 }
 #sua_1 {
    position: absolute;
    z-index: 100;
    width: 8.6875rem;
    height: 11.125rem;
    left: 23rem;
    top: 9rem;
    object-fit: contain;

 }
 #sua_2 {
    position: absolute;
    z-index: 100;
    /* width: 10.5rem; */
    /* height: 13.5rem; */
    left: 9rem;
    top: 16rem;
    width: 6.01844rem;
    height: 7.70706rem;
    object-fit: contain;
 }
 #whale1 {
    position: absolute;
    z-index: 100;
    left: 40rem;
    top: 14rem;
    width: 24.125rem;
    height: 16.5rem;
    object-fit: contain;
 }
 #Whalekiller {
    position: absolute;
    z-index: 100;
    left: 88rem;
    top: 12rem;
    width: 9.6875rem;
    height: 11.9375rem;
    object-fit: contain;
 }
 #rua1 {
    position: absolute;
    z-index: 100;
    left: 68rem;
    top: 34rem;
    width: 14.25rem;
    height: 7.8125rem;
    object-fit: contain;
 }
 #so2 {
    position: absolute;
    z-index: 100;
    left: 36rem;
    top: 40rem;
    width: 12.9375rem;
    height: 7.0625rem;
    object-fit: contain;
 }
 #crab1 {
    position: absolute;
    z-index: 100;
    left: 46rem;
    top: 42rem;
    width: 10.375rem;
    height: 4.125rem;
    object-fit: contain;
 }
 #so3 {
    position: absolute;
    z-index: 100;
    left: 56rem;
    top: 42rem;
    width: 5.6875rem;
    height: 3.1875rem;
    object-fit: contain;
 }
 #crab2 {
    position: absolute;
    z-index: 99;
    left: 58rem;
    top: 42rem;
    width: 8.6875rem;
    height: 3.375rem;
    object-fit: contain;
 }
 .button-hover-trigger {
    position: absolute;
    z-index: 5; /* Ảnh nằm dưới button */
    cursor: pointer;
}

/* Hover trên ảnh sẽ thêm hiệu ứng như hover vào button */
.button-wrapper:hover .task-button::before {
    opacity: 0.7; /* Đậm hơn khi hover */
}
.button-wrapper:hover .task-button {
    color: var(--primary-color);
}
#obtorbus {
    animation: bounce 5s infinite linear; /* 2s duration, infinite loop, linear timing */
}
#sua_1 {
    animation: bounce 3s infinite linear; /* 2s duration, infinite loop, linear timing */
}
#sua_2 {
    animation: bounce 4s infinite linear; /* 2s duration, infinite loop, linear timing */
}
#whale1 {
    animation: bounce 6s infinite linear; /* 2s duration, infinite loop, linear timing */
}
#Whalekiller {
    animation: bounce 3s infinite linear; /* 2s duration, infinite loop, linear timing */
}
#rua1 {
    animation: bounce 9s infinite linear; /* 2s duration, infinite loop, linear timing */
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0); /* Original position */
    }
    25% {
        transform: translateY(-15px); /* Move up */
    }
    50% {
        transform: translateY(-10px); /* Move slightly down */
    }
    75% {
        transform: translateY(0); /* Back to original position */
    }
}
#crab1 {
    animation: crawl 10s infinite alternate; /* 4s duration, infinite loop, alternate direction */
}
#crab2 {
    animation: crawl 7s infinite reverse; /* 4s duration, infinite loop, alternate direction */
}

@keyframes crawl {
    0% {
        transform: translateX(0) translateY(0); /* Start position */
    }
    50% {
        transform: translateX(10px) translateY(0); /* Move to the right and up */
    }
    100% {
        transform: translateX(0) translateY(0); /* Move back to original position */
    }
}
