:root {
    /* Biến màu chung */
    --primary-color: #000000;
    --secondary-color: #0032c8;
    --background-color: #181818; /* Màu nền tối */
    --text-color: #000000; /* Màu chữ chính */
    --secondary-text-color: #ffffff; /* Màu chữ phụ */
    --card-bg-color: #202020; /* Nền thẻ phim tối */
    --card-bg-light: #ff0000; /* Nền thẻ phim sáng */
    --navbar-bg-color: #141414; /* Nền navbar */
    --card-border-color-dark: #020202; /* Viền thẻ phim tối */
    --card-border-color-light: #ff0000; /* Viền thẻ phim sáng */
    --h1-dark-color: #ff0000;  /* Màu tiêu đề h1 chế độ tối */
    --h1-light-color: #000000; /* Màu tiêu đề h1 chế độ sáng */
}

/* Chế độ sáng */
body.light-theme {
    --background-color: #ffffff; /* Nền sáng */
    --text-color: #000000; /* Màu chữ sáng */
    --secondary-text-color: #000000;
    --card-bg-color: #000000; /* Nền thẻ phim sáng */
    --navbar-bg-color: #ff0000;
    --card-border-color-light: #000000;
    --h1-dark-color: #000000;
    --primary-color: #000000;
    --secondary-color: #0032c8;
    --primary-color: #ffffff; /* Màu chính */
    --secondary-color: #b30f9a; /* Màu phụ */
}

.light-theme {
    --bg-color: #ffffff;
    --text-color: #ffffff;
    --card-bg: #f5f5f5;
    --border-color: #ccc;
}

/* Cấu hình chung */
body, .content-wrapper {
    font-family: 'Roboto', sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    margin: 0;
    padding: 0;
    transition: background-color 0.3s, color 0.3s;
}

.not-found {
    color: var(--secondary-text-color);
    font-size: 2.5rem;
    font-weight: bold;
    margin: 20px 0;
}

#toggle-theme-btn {
    border: 1px solid var(--secondary-color);
}

.text-center.mb-4 {
    color: var(--secondary-text-color); /* Đổi màu chữ */
    font-size: 24px; /* Tăng kích thước chữ */
    font-weight: bold; /* Làm đậm chữ */
}

/* Nút chuyển đổi chế độ */
.theme-toggle {
    position: fixed;
    top: 10px;
    right: 10px;
    background: var(--card-bg);
    color: var(--text-color);
    border: 1px solid var(--border-color);
    padding: 8px 16px;
    cursor: pointer;
    border-radius: 4px;
    transition: background 0.3s, color 0.3s;
}
.theme-toggle:hover {
    background: var(--border-color);
}

/* Navbar */
.navbar {
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    padding: 10px 20px;
    box-shadow: 0 4px 8px var(--shadow-dark);
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.navbar-toggler {
    border: 1px solid var(--border-color);
}

.navbar-light {
    background: var(--background-light);
    box-shadow: 0 4px 8px var(--shadow-light);
}

.navbar-nav {
    display: flex;
    align-items: center;
    gap: 15px;
}
.navbar a {
    color: var(--secondary-text-color);
    font-weight: 600;
    transition: color 0.3s;
}
.navbar-light a {
    color: var(--text-color);
}
.navbar a:hover {
    color: var(--secondary-color);
}

/* Thanh tìm kiếm */
.form-control {
    width: 250px;
    border-radius: 5px;
}
.form-control:focus {
    box-shadow: none;
    border-color: #ffcc00;
}

/* Nút bấm */
button {
    border-radius: 5px;
    display: flex;
    flex-direction: column;
}

/* Phân trang */
#pagination, #pagination-bottom {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 20px;
}
#pagination input, #pagination-bottom input {
    width: 60px;
    text-align: center;
    margin: 0 5px;
}
#pagination button, #pagination-bottom button {
    padding: 5px 15px;
    font-size: 1rem;
}
#pagination button:hover, #pagination-bottom button:hover {
    background-color: #ffcc00;
    color: #fff;
}
#pagination button:disabled, #pagination-bottom button:disabled {
    background-color: #ccc;
    color: #fff;
    cursor: not-allowed;
}

/* Thẻ phim */
#film-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

#trending-films {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

#watch-history-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 15px;
    margin-top: 20px;
    padding-bottom: 20px;
}

.content-box {
  overflow: hidden;
  transition: max-height 0.3s ease-in-out, opacity 0.3s ease-in-out;
  opacity: 1;
}

.hidden {
  max-height: 0;
  opacity: 0;
}

#film-search-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

#anime-genres {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

#trending-animes {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

#trending-show-days {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.details-link {
    text-decoration: none; /* Loại bỏ gạch dưới */
    color: var(--secondary-text-color);
    transition: background-color 0.3s ease;
}

.film-card {
    background-color: var(--card-bg);
    border: 1px solid;
    padding: 12px;
    border-radius: 8px;
    transition: transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out, background-color 0.3s ease-in-out, border-color 0.3s ease-in-out;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    font-size: 4mm;
}
.film-card:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}
.film-card h2 {
    font-size: 5.5mm;
    font-weight: bold;
    padding-top: 2mm;
    padding-bottom: 1.5mm;
}
.film-card img {
    width: 100%;
    height: 400px;
    object-fit: cover;
}

.film-card .card-body {
    padding: 10px;
}
.film-card .card-body h5 {
    font-size: 1.1rem;
    margin: 10px 0;
    color: #343a40;
}
.film-card .card-body p {
    color: #777;
    font-size: 0.9rem;
}

/* Footer */
.footer {
  background-color: #1a1a1a;
  color: #f1f1f1;
  padding: 20px;
  text-align: center;
  font-family: Arial, sans-serif;
}

.footer a {
  color: #f1f1f1;
  text-decoration: none;
}

.footer a:hover {
  text-decoration: underline;
}

.footer-content {
  max-width: 800px;
  margin: 0 auto;
}

.special-link {
  font-weight: bold; /* Chữ đậm */
  font-size: 18px;
  color: #ff5722; /* Màu nổi bật */
  text-decoration: none; /* Bỏ gạch chân */
  border-bottom: 2px solid transparent; /* Thêm hiệu ứng gạch chân động */
  transition: all 0.3s ease-in-out;
}

.special-link:hover {
  color: #e64a19; /* Màu đậm hơn khi di chuột */
  border-bottom: 2px solid #e64a19; /* Gạch chân khi hover */
  transform: scale(1.1); /* Hiệu ứng phóng to nhẹ */
}


/* Responsive */
@media (max-width: 821px) {
    .navbar-nav {
        text-align: center;
    }
    #pagination, #pagination-bottom {
        flex-direction: column;
    }
    .form-control {
        width: 200px;
    }
    #film-container {
        grid-template-columns: 1fr 1fr;
    }
    .navbar-toggler {
        background-color: #343a40;
    }
}
@media (max-width: 576px) {
    #film-container {
        grid-template-columns: 1fr;
    }
    .form-control {
        width: 150px;
    }
    #pagination input {
        width: 40px;
    }
}

/* Áp dụng hiệu ứng glitch cho nút "Tìm Kiếm" */
.search-nguonc-button,
.search-nguonc-button::after {
  padding: 10px 50px;
  font-size: 20px;
  font-weight: bold;
  text-transform: uppercase;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--secondary-color); /* Viền đen */
  border-radius: 5px;
  color: var(--secondary-text-color);
  position: relative;
  cursor: pointer;
  transition: 0.3s ease-in-out;
}

/* Tạo hiệu ứng glitch */
.search-nguonc-button::after {
  --move1: inset(50% 50% 50% 50%);
  --move2: inset(31% 0 40% 0);
  --move3: inset(39% 0 15% 0);
  --move4: inset(45% 0 40% 0);
  --move5: inset(45% 0 6% 0);
  --move6: inset(14% 0 61% 0);
  clip-path: var(--move1);
  content: 'Tìm Kiếm';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgb(255, 0, 0);
}

/* Hover effect */
.search-nguonc-button:hover {
  color: var(--secondary-color); /* Đổi màu chữ */
  box-shadow: 0px 10px 30px 0px var(--secondary-color);
}

/* Hover tạo hiệu ứng glitch */
.search-nguonc-button:hover::after {
  animation: glitch_4011 1s;
  text-shadow: 10 10px 10px black;
  animation-timing-function: steps(2, end);
  text-shadow: -3px -3px 0px #1df2f0, 3px 3px 0px #E94BE8;
  background-color: transparent;
  border: 3px solid rgb(0, 255, 213);
}

/* Keyframe glitch effect */
@keyframes glitch_4011 {
  0% { clip-path: var(--move1); transform: translate(0px,-10px); }
  10% { clip-path: var(--move2); transform: translate(-10px,10px); }
  20% { clip-path: var(--move3); transform: translate(10px,0px); }
  30% { clip-path: var(--move4); transform: translate(-10px,10px); }
  40% { clip-path: var(--move5); transform: translate(10px,-10px); }
  50% { clip-path: var(--move6); transform: translate(-10px,10px); }
  60% { clip-path: var(--move1); transform: translate(10px,-10px); }
  70% { clip-path: var(--move3); transform: translate(-10px,10px); }
  80% { clip-path: var(--move2); transform: translate(10px,-10px); }
  90% { clip-path: var(--move4); transform: translate(-10px,10px); }
  100% { clip-path: var(--move1); transform: translate(0); }
}


.film-card {
    position: relative;
    display: inline-block;
    overflow: visible;
}

.film-overview {
    position: absolute;
    top: 0;
    left: 0;
    width: 300px; /* Điều chỉnh chiều rộng phù hợp */
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 15px;
    font-size: 16px;
    opacity: 0;
    transform: translateY(10px); /* Bắt đầu thấp hơn một chút */
    transition: opacity 0.4s ease-out, transform 0.4s ease-out;
    white-space: normal;
    overflow: visible;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    z-index: 10;
    display: block;
    visibility: hidden;
}

.film-card:hover .film-overview {
    opacity: 1;
    transform: translateY(0); /* Trở về vị trí bình thường */
    visibility: visible;
}

/* Làm mờ ảnh nhẹ khi hover */
.film-card:hover img {
    opacity: 0.3;
    transition: opacity 0.4s ease-out;
}

.dropdown-menu button {
    border: none;
    background-color: white;
    color: black;
    font-weight: 600;
    transition: color 0.3s;
    padding: 5px 15px;
}

.dropdown-menu button:hover {
    color: var(--secondary-color);
}

.dropdown-item {
  color: #000 !important;
}

.trending-link {
    border: none;
    background-color: white;
    color: #000 !important;
    font-weight: 600;
    transition: color 0.3s;
    padding: 5px 15px;
    text-decoration: none;
}

.trending-link:hover {
    color: var(--secondary-color);
}

#sort-options {
    display: flex;
    flex-wrap: nowrap; /* Không cho phép wrap, giữ tất cả trong một hàng */
    align-items: center;
    justify-content: center;
    gap: 15px; /* Khoảng cách giữa các phần tử */
    padding: 20px;
    box-sizing: border-box;
}

h1.mb-0 {
    font-size: 24px;
    font-weight: 600;
    margin: 0;
    color: var(--secondary-text-color);
    margin-right: 20px; /* Khoảng cách giữa tiêu đề và các nút */
}

h1.mb-4 {
  padding-top: 1em;
  font-size: 24px;
  font-weight: 600;
  margin: 0;
  color: var(--secondary-text-color);
  margin-right: 20px; /* Khoảng cách giữa tiêu đề và các nút */
}

.sort-buttons {
    display: flex;
    gap: 15px;
    flex-wrap: nowrap; /* Các nút sắp xếp vẫn nằm trên cùng một hàng */
    justify-content: flex-start;
}

.sort-button {
    padding: 12px 25px;
    font-size: 16px;
    font-weight: 500;
    border: 2px solid #007BFF;
    background-color: #fff;
    color: #007BFF;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s, color 0.3s;
}

.sort-button:hover {
    background-color: #007BFF;
    color: #fff;
}

.sort-button:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.5);
}
.switch {
    font-size: 17px;
    position: relative;
    display: inline-block;
    width: 5.5em;
    height: 2em;
    transform-style: preserve-3d;
    perspective: 500px;
    animation: toggle__animation 3s infinite;
  }
  
  .switch::before {
    content: "";
    position: absolute;
    width: 100%;
    height: 100%;
    left: 0;
    top: 0;
    filter: blur(20px);
    z-index: -1;
    border-radius: 50px;
    background-color: #d8ff99;
    background-image: radial-gradient(at 21% 46%, hsla(183,65%,60%,1) 0px, transparent 50%),
  radial-gradient(at 23% 25%, hsla(359,74%,70%,1) 0px, transparent 50%),
  radial-gradient(at 20% 1%, hsla(267,83%,75%,1) 0px, transparent 50%),
  radial-gradient(at 86% 87%, hsla(204,69%,68%,1) 0px, transparent 50%),
  radial-gradient(at 99% 41%, hsla(171,72%,77%,1) 0px, transparent 50%),
  radial-gradient(at 55% 24%, hsla(138,60%,62%,1) 0px, transparent 50%);
  }
  
  /* Hide default HTML checkbox */
  .switch input {
    opacity: 0;
    width: 0;
    height: 0;
  }
  
  /* The slider */
  .slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #fdfefedc;
    transition: .4s;
    border-radius: 30px;
  }
  
  .slider:before {
    position: absolute;
    content: "";
    height: 1.4em;
    width: 1.4em;
    left: 0.3em;
    bottom: 0.35em;
    transition: .4s;
    border-radius: 50%;
    box-shadow: rgba(0, 0, 0, 0.17) 0px -10px 10px 0px inset,
       rgba(0, 0, 0, 0.09) 0px -1px 15px -8px;
    background-color: #ff99fd;
    background-image: radial-gradient(at 81% 39%, hsla(327,79%,79%,1) 0px, transparent 50%),
    radial-gradient(at 11% 72%, hsla(264,64%,79%,1) 0px, transparent 50%),
    radial-gradient(at 23% 20%, hsla(75,98%,71%,1) 0px, transparent 50%);
  }
  
  .input__check:checked + .slider {
    background-color: #17202A;
  }
  
  .input__check:checked + .slider:before {
    transform: translateX(1.5em);
  }
  
  @keyframes toggle__animation {
    0%, 100% {
      transform: translateY(-10px) rotateX(15deg) rotateY(-20deg);
    }
  
    50% {
      transform: translateY(0px) rotateX(15deg) rotateY(-20deg);
    }
  }

  #search-button {
    margin-right: 10px; /* Điều chỉnh khoảng cách giữa nút tìm kiếm và switch */
  }
  
  .switch {
    margin-left: 15px; /* Điều chỉnh khoảng cách giữa nút tìm kiếm và switch */
    width: 3.8em;
    flex-shrink: 0; /* Ngăn bị thu nhỏ khi responsive */
}

.slider {
    width: 100%; /* Đảm bảo nội dung luôn vừa với switch */
    height: 100%;
}
/* From Uiverse.io by Nawsome */ 
.wheel-and-hamster {
    --dur: 1s;
    position: relative;
    width: 12em;
    height: 12em;
    font-size: 14px;
  }
  
  .wheel,
  .hamster,
  .hamster div,
  .spoke {
    position: absolute;
  }
  
  .wheel,
  .spoke {
    border-radius: 50%;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
  }
  
  .wheel {
    background: radial-gradient(100% 100% at center,hsla(0,0%,60%,0) 47.8%,hsl(0,0%,60%) 48%);
    z-index: 2;
  }
  
  .hamster {
    animation: hamster var(--dur) ease-in-out infinite;
    top: 50%;
    left: calc(50% - 3.5em);
    width: 7em;
    height: 3.75em;
    transform: rotate(4deg) translate(-0.8em,1.85em);
    transform-origin: 50% 0;
    z-index: 1;
  }
  
  .hamster__head {
    animation: hamsterHead var(--dur) ease-in-out infinite;
    background: hsl(30,90%,55%);
    border-radius: 70% 30% 0 100% / 40% 25% 25% 60%;
    box-shadow: 0 -0.25em 0 hsl(30,90%,80%) inset,
          0.75em -1.55em 0 hsl(30,90%,90%) inset;
    top: 0;
    left: -2em;
    width: 2.75em;
    height: 2.5em;
    transform-origin: 100% 50%;
  }
  
  .hamster__ear {
    animation: hamsterEar var(--dur) ease-in-out infinite;
    background: hsl(0,90%,85%);
    border-radius: 50%;
    box-shadow: -0.25em 0 hsl(30,90%,55%) inset;
    top: -0.25em;
    right: -0.25em;
    width: 0.75em;
    height: 0.75em;
    transform-origin: 50% 75%;
  }
  
  .hamster__eye {
    animation: hamsterEye var(--dur) linear infinite;
    background-color: hsl(0,0%,0%);
    border-radius: 50%;
    top: 0.375em;
    left: 1.25em;
    width: 0.5em;
    height: 0.5em;
  }
  
  .hamster__nose {
    background: hsl(0,90%,75%);
    border-radius: 35% 65% 85% 15% / 70% 50% 50% 30%;
    top: 0.75em;
    left: 0;
    width: 0.2em;
    height: 0.25em;
  }
  
  .hamster__body {
    animation: hamsterBody var(--dur) ease-in-out infinite;
    background: hsl(30,90%,90%);
    border-radius: 50% 30% 50% 30% / 15% 60% 40% 40%;
    box-shadow: 0.1em 0.75em 0 hsl(30,90%,55%) inset,
          0.15em -0.5em 0 hsl(30,90%,80%) inset;
    top: 0.25em;
    left: 2em;
    width: 4.5em;
    height: 3em;
    transform-origin: 17% 50%;
    transform-style: preserve-3d;
  }
  
  .hamster__limb--fr,
  .hamster__limb--fl {
    clip-path: polygon(0 0,100% 0,70% 80%,60% 100%,0% 100%,40% 80%);
    top: 2em;
    left: 0.5em;
    width: 1em;
    height: 1.5em;
    transform-origin: 50% 0;
  }
  
  .hamster__limb--fr {
    animation: hamsterFRLimb var(--dur) linear infinite;
    background: linear-gradient(hsl(30,90%,80%) 80%,hsl(0,90%,75%) 80%);
    transform: rotate(15deg) translateZ(-1px);
  }
  
  .hamster__limb--fl {
    animation: hamsterFLLimb var(--dur) linear infinite;
    background: linear-gradient(hsl(30,90%,90%) 80%,hsl(0,90%,85%) 80%);
    transform: rotate(15deg);
  }
  
  .hamster__limb--br,
  .hamster__limb--bl {
    border-radius: 0.75em 0.75em 0 0;
    clip-path: polygon(0 0,100% 0,100% 30%,70% 90%,70% 100%,30% 100%,40% 90%,0% 30%);
    top: 1em;
    left: 2.8em;
    width: 1.5em;
    height: 2.5em;
    transform-origin: 50% 30%;
  }
  
  .hamster__limb--br {
    animation: hamsterBRLimb var(--dur) linear infinite;
    background: linear-gradient(hsl(30,90%,80%) 90%,hsl(0,90%,75%) 90%);
    transform: rotate(-25deg) translateZ(-1px);
  }
  
  .hamster__limb--bl {
    animation: hamsterBLLimb var(--dur) linear infinite;
    background: linear-gradient(hsl(30,90%,90%) 90%,hsl(0,90%,85%) 90%);
    transform: rotate(-25deg);
  }
  
  .hamster__tail {
    animation: hamsterTail var(--dur) linear infinite;
    background: hsl(0,90%,85%);
    border-radius: 0.25em 50% 50% 0.25em;
    box-shadow: 0 -0.2em 0 hsl(0,90%,75%) inset;
    top: 1.5em;
    right: -0.5em;
    width: 1em;
    height: 0.5em;
    transform: rotate(30deg) translateZ(-1px);
    transform-origin: 0.25em 0.25em;
  }
  
  .spoke {
    animation: spoke var(--dur) linear infinite;
    background: radial-gradient(100% 100% at center,hsl(0,0%,60%) 4.8%,hsla(0,0%,60%,0) 5%),
          linear-gradient(hsla(0,0%,55%,0) 46.9%,hsl(0,0%,65%) 47% 52.9%,hsla(0,0%,65%,0) 53%) 50% 50% / 99% 99% no-repeat;
  }
  
  /* Animations */
  @keyframes hamster {
    from, to {
      transform: rotate(4deg) translate(-0.8em,1.85em);
    }
  
    50% {
      transform: rotate(0) translate(-0.8em,1.85em);
    }
  }
  
  @keyframes hamsterHead {
    from, 25%, 50%, 75%, to {
      transform: rotate(0);
    }
  
    12.5%, 37.5%, 62.5%, 87.5% {
      transform: rotate(8deg);
    }
  }
  
  @keyframes hamsterEye {
    from, 90%, to {
      transform: scaleY(1);
    }
  
    95% {
      transform: scaleY(0);
    }
  }
  
  @keyframes hamsterEar {
    from, 25%, 50%, 75%, to {
      transform: rotate(0);
    }
  
    12.5%, 37.5%, 62.5%, 87.5% {
      transform: rotate(12deg);
    }
  }
  
  @keyframes hamsterBody {
    from, 25%, 50%, 75%, to {
      transform: rotate(0);
    }
  
    12.5%, 37.5%, 62.5%, 87.5% {
      transform: rotate(-2deg);
    }
  }
  
  @keyframes hamsterFRLimb {
    from, 25%, 50%, 75%, to {
      transform: rotate(50deg) translateZ(-1px);
    }
  
    12.5%, 37.5%, 62.5%, 87.5% {
      transform: rotate(-30deg) translateZ(-1px);
    }
  }
  
  @keyframes hamsterFLLimb {
    from, 25%, 50%, 75%, to {
      transform: rotate(-30deg);
    }
  
    12.5%, 37.5%, 62.5%, 87.5% {
      transform: rotate(50deg);
    }
  }
  
  @keyframes hamsterBRLimb {
    from, 25%, 50%, 75%, to {
      transform: rotate(-60deg) translateZ(-1px);
    }
  
    12.5%, 37.5%, 62.5%, 87.5% {
      transform: rotate(20deg) translateZ(-1px);
    }
  }
  
  @keyframes hamsterBLLimb {
    from, 25%, 50%, 75%, to {
      transform: rotate(20deg);
    }
  
    12.5%, 37.5%, 62.5%, 87.5% {
      transform: rotate(-60deg);
    }
  }
  
  @keyframes hamsterTail {
    from, 25%, 50%, 75%, to {
      transform: rotate(30deg) translateZ(-1px);
    }
  
    12.5%, 37.5%, 62.5%, 87.5% {
      transform: rotate(10deg) translateZ(-1px);
    }
  }
  
  @keyframes spoke {
    from {
      transform: rotate(0);
    }
  
    to {
      transform: rotate(-1turn);
    }
  } 

#back-to-top {
  display: none;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background-color: rgb(20, 20, 20);
  border: none;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0px 0px 0px 4px rgba(180, 160, 255, 0.253);
  cursor: pointer;
  transition: 0.3s;
  overflow: hidden;
  text-align: center;
  white-space: nowrap;
  padding: 0 15px;
}

#back-to-top .svgIcon {
  width: 18px;
  transition: 0.3s;
}

#back-to-top .svgIcon path {
  fill: white;
}

#back-to-top::after {
  content: "Quay về đầu";
  color: white;
  font-size: 14px;
  opacity: 0;
  transition: opacity 0.3s, transform 0.3s;
  transform: translateY(100%);
}

#back-to-top:hover {
  width: 140px;
  border-radius: 50px;
  background-color: rgb(181, 160, 255);
  justify-content: flex-start;
  padding: 0 20px;
}

#back-to-top:hover .svgIcon {
  transform: translateY(-200%);
  opacity: 0;
}

#back-to-top:hover::after {
  opacity: 1;
  transform: translateY(0);
}

.box {
  width: 140px;
  height: auto;
  float: left;
  transition: .5s linear;
  position: relative;
  display: block;
  overflow: hidden;
  padding: 15px;
  text-align: center;
  margin: 0 5px;
  background: transparent;
  text-transform: uppercase;
  font-weight: 900;
  background-color: yellow;
}

.box:before {
  position: absolute;
  content: '';
  left: 0;
  bottom: 0;
  height: 4px;
  width: 100%;
  border-bottom: 4px solid transparent;
  border-left: 4px solid transparent;
  box-sizing: border-box;
  transform: translateX(100%);
}

.box:after {
  position: absolute;
  content: '';
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  border-top: 4px solid transparent;
  border-right: 4px solid transparent;
  box-sizing: border-box;
  transform: translateX(-100%);
}

.box:hover {
  box-shadow: 0 5px 15px var(--secondary-color);
}

.box:hover:before {
  border-color: #262626;
  height: 100%;
  transform: translateX(0);
  transition: .3s transform linear, .3s height linear .3s;
}

.box:hover:after {
  border-color: #262626;
  height: 100%;
  transform: translateX(0);
  transition: .3s transform linear, .3s height linear .5s;
}

button {
  color: black;
  text-decoration: none;
  cursor: pointer;
  outline: none;
  border: none;
  background: transparent;
}

.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.8em 1.5em;
  background: none;
  border: 2px solid #00ff4c;
  font-size: 15px;
  color: #00ff4c;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: all 0.3s;
  border-radius: 8px;
  font-weight: bold;
  background-color: transparent;
  box-shadow: 0 2px 0 2px rgba(0, 0, 0, 0.2);
}

.btn i {
  margin-right: 5px; /* Giúp icon không bị dính vào text */
}

.btn:before {
  content: "";
  position: absolute;
  width: 100px;
  height: 120%;
  background-color: #00ff4c;
  top: 50%;
  transform: skewX(30deg) translate(-150%, -50%);
  transition: all 0.5s;
}

.btn:hover {
  background-color: #00ff4c;
  color: #fff;
  box-shadow: 0 2px 0 2px rgba(0, 0, 0, 0.3);
}

.btn:hover::before {
  transform: skewX(30deg) translate(150%, -50%);
  transition-delay: 0.1s;
}

.btn:active {
  transform: scale(0.95);
}
