*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    overflow-x: hidden;
    width: 100%;
}

body {
    margin: 0;
    padding: 0;
    background-color: #FFF5F7;
    color: #5D4037;
    font-family: 'Nunito', sans-serif;
}

section, footer {
    scroll-margin-top: 80px;
}

.container {
    max-width: 95%;
    margin: auto;
    padding: 0 20px;
    width: 100%;
}

.music-section .container, .anime-section .container, .sandbox-section .container, .projects-section .container {
    max-width: 95%;
}


.about-me-section .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.site-footer .container {
    display: flex;
    justify-content: space-between;
    max-width: 95%;
    align-items: center;
}

/* header */
.site-header {
    font-size: 40px;
    height: auto;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);

    position: sticky;
    top: 0;
    z-index: 1000;

    background-color: rgba(255, 206, 222, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);

    box-shadow: 0 4px 15px rgba(255, 105, 180, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.4);
}

.site-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}

.main-nav__list {
    display: flex;
    gap: 40px;
    list-style: none;
    margin: 0;
    padding-top: 5px;
}

.main-nav__item {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0;
}

.main-nav__box-link {
    background-color: #fce8f5;
    border-radius: 50px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);

    display: flex;
    justify-content: center;
    align-items: center;

    width: 50px;
    height: 50px;
    padding: 0;

    text-decoration: none;
    color: #ff57ab;
    font-weight: bold;
    font-size: 25px;

    overflow: hidden;
    white-space: nowrap;
    transition: all 0.3s ease-in-out;
}

.main-nav__box-link span {
    max-width: 0;
    opacity: 0;
    margin-left: 0;
    transition: all 0.3s ease-in-out;
}

.main-nav__box-link i {
    margin: 0;
    text-align: center;
    font-size: 25px;
    min-width: 25px;
}

.main-nav__box-link:hover {
    width: 150px;
    justify-content: flex-start;
    padding-left: 20px;
    background-color: #FF69B4;
    color: white;
    gap: 15px;
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(255, 105, 180, 0.4);
}

.main-nav__item--picture .main-nav__box-link:hover {
    width: 155px;
}

.main-nav__item--projects .main-nav__box-link:hover {
    width: 180px;
}

.main-nav__item--sandbox .main-nav__box-link:hover {
    width: 185px;
}

.main-nav__item--contact .main-nav__box-link:hover {
    width: 180px;
}

.main-nav__box-link:hover span {
    max-width: 120px;
    opacity: 1;
}

.main-nav__item--home .main-nav__box-link:hover span {
    padding-top: 4px;
}

.main-nav__item--picture .main-nav__box-link:hover span {
    padding-top: 4px;
}

.main-nav__item--sandbox .main-nav__box-link:hover span {
    padding-top: 2px;
}

/* Tên và ảnh logo */
.site-logo {
    padding: 0;
}

.site-logo a {
    text-decoration: none;
    color: #ff2994;
    padding-left: 20px;
    transition: all 0.3s ease-in-out;
}

.site-logo:hover a {
    font-size: 3rem;
}

/* Chỉnh thanh điều hướng */

.music-section__title, .anime-section__title {
    font-size: 50px;
    margin: 0px 0px 0px 30px;
}

/* main content */
/* Chỉnh khoảng cách các phần */
.main-content {
    display: flex;
    flex-direction: column;
    gap: 70px;
}

.about-me-section {
    min-height: 100vh;
    background: linear-gradient(120deg, #FFF5F7 0%, #FFFFFF 100%);
    padding-top: 150px;
    padding-left: 10%;
    gap: 50px;

    position: relative;
    z-index: 1;

    font-family: 'Be Vietnam Pro', sans-serif;
}

.left {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: center;
    flex: 1;
}

.left img {
    width: 350px;
    height: 350px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 20px 20px 60px rgba(0, 0, 0, 0.05);

    animation: morph 6s ease-in-out infinite;
}

@keyframes morph {
    0%, 100% {
        border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
        transform: scale(1);
    }

    25% {
        border-radius: 45% 55% 74% 26% / 47% 65% 35% 53%;
        transform: scale(1.02);
    }

    50% {
        border-radius: 38% 62% 63% 37% / 41% 44% 56% 59%;
        transform: scale(0.98);
    }
}

.left .text1 {
    font-family: 'Montserrat', sans-serif;
    font-size: 2.2rem;
    font-weight: 700;
    margin: 25px 0 5px 0;
    color: #2D3436;
}

.right .text2 {
    font-size: 1.3rem;
    color: #303638;
    letter-spacing: 2px;
}

.maxim {
    border-left: 4px solid #D81B60;
    padding-left: 20px;
}

.maxim p {
    font-family: 'Itim', cursive;
    font-size: 1.5rem !important;
    color: #D81B60;
    margin: 0;
    line-height: 1.4;
}

.right {
    flex: 1.2;
}

.right .text1 {
    font-family: 'Montserrat', sans-serif;
    font-size: 4rem;
    font-weight: 700;
    margin-bottom: 20px;
    color: #2D3436;
}

.right .text1 span {
    font-size: 5rem;
    color: #C2185B;
    display: inline-block;
    filter: drop-shadow(2px 2px 2px rgba(0, 0, 0, 0.3))
}

.right .text2, .text3, .text4 {
    font-size: 1.5rem;
    line-height: 1.8;
    color: #5D4037;
    font-weight: 400;
}

.text4 {
    list-style-type: none;
}

.text4 i {
    padding-right: 10px;
}

.music-section {
    margin-top: -70px;
    position: relative;
    z-index: 1;
}

.music-section::before {
    content: "";
    position: absolute;

    top: 0;
    left: 0;

    width: 100%;
    height: 5px;

    transform: translateY(-100%);

    background: linear-gradient(to top, rgba(0, 0, 0, 0.15), transparent);
}

/* Chỉnh bố cục các nội dung */
.music-section__list, .anime-section__list, .sandbox-section__list {
    display: flex;
    flex-wrap: wrap;
    gap: 35px;
    justify-content: start;
    list-style: none;
    padding-right: 20px;
    margin-top: 10px;
    margin-bottom: 0;
}

.music-section__caption {
    font-size: 30px;
    margin-top: 0px;
    font-weight: bold;
    margin-top: 10px;
}

.music-section__player, .anime-section__item img {
    width: 100%;
    height: 315px;
    border-radius: 20px;
}

.music-section__item {
    text-align: center;
    width: 45%;
}

.music-section__item, .anime-section__item {
    background-color: #ffffff;
    padding: 15px;

    border-radius: 15px;
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.5);
    transition: transform 0.3s ease;
    width: 30%;
    min-width: 300px;
}

.music-section__title, .anime-section__title, .sandbox-section__title, .projects-section__title {
    display: block;
    width: fit-content;
    margin: 50px auto;
    text-align: center;

    background-color: #FFF0F5;
    border-left: 10px solid #fca2cf;
    border-right: 10px solid #fca2cf;
    padding: 10px 40px;

    color: #2D3436;
    font-size: 35px;
    font-weight: bold;
    text-decoration: none;
    border-radius: 4px;
}

.anime-section__name {
    font-size: 22px;
    font-weight: 700;
    color: #880E4F;

    margin: 0;
    padding: 10px 0 0 0;
    text-align: center;

    display: flex;
    flex-direction: column;
    align-items: center;

    position: relative;
    transition: all 0.2s ease-in-out;
}

.anime-section__name::after {
    content: "";
    display: block;
    width: 40px;
    height: 3px;
    background-color: #FF69B4;
    border-radius: 10px;
    transition: all 0.2s ease-in-out;
}

.anime-section__item:hover .anime-section__name {
    color: #FF69B4;
}

.anime-section__item:hover .anime-section__name::after {
    width: 100px;
}

/* Projects*/

.carousel-container {
    position: relative;
    max-width: 95%;
    margin: 0 auto;
    padding: 0 50px;
}

.carousel-viewport {
    display: flex;
    overflow-x: auto;
    scroll-behavior: smooth;
    scroll-snap-type: x proximity;
    justify-content: flex-start;
    gap: 30px;
    padding: 20px 20px;
    margin: 0 -20px;
    scrollbar-width: none;
}

.carousel-viewport::-webkit-scrollbar {
    display: none;
    /* Ẩn thanh cuộn (Chrome/Safari) */
}

.projects-card-wrapper {
    flex: 0 0 calc(25% - 20px);
    scroll-snap-align: center;
}

.carousel-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 45px;
    height: 45px;
    background: #FFF5F7;
    border: none;
    color: #FF69B4;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
}

.carousel-container:hover .carousel-nav {
    opacity: 1;
}

.carousel-nav.prev {
    left: -10px;
}

.carousel-nav.prev:hover {
    background: #FFF5F7;
    color: #ff5096;
    transform: translateY(-50%) translateX(-10px) scale(1.5);
}

.next {
    right: -10px;
}

.carousel-nav.next:hover {
    background: #FFF5F7;
    transform: translateY(-50%) translateX(10px) scale(1.5);
}

.projects-card {
    background-color: white;
    overflow: hidden;
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.5);
    transition: all 0.3s ease;
    border-radius: 20px;
    display: flex;
    flex-direction: column;
}

.projects-card__image-container {
    position: relative;
    width: 100%;
    height: 230px;
    overflow: hidden;
}

.projects-card__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.projects-card__content {
    padding: 10px;
    display: flex;
    flex-direction: column;
    text-align: center;
    flex-grow: 1;
}

.projects-card__title {
    margin: 0;
    color: #a70043;
    font-size: 25px;
    font-weight: bold;
}

.projects-card__description {
    font-size: 20px;
    color: #666;
    line-height: 1.5;
    margin: 15px 0;
}

.projects-card__actions {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.projects-btn {
    width: fit-content;
    padding: 10px 10px;
    border-radius: 15px;
    font-weight: bold;
    font-size: 14px;
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
}

.projects-btn--play {
    background: #ffafbe;
    color: #000000;
    box-shadow: 0 4px 10px rgba(255, 105, 180, 0.3);
    transition: all 0.3s ease;
    cursor: pointer;
}

.projects-card:hover {
    transform: translateY(-10px);
    border-color: #FF69B4;
    box-shadow: 0 10px 15px rgba(255, 105, 180, 0.3);
}

.projects-card:hover .projects-card__image {
    transform: scale(1.3);
}

.projects-btn--play:hover {
    transform: translateY(-2px) scale(1.2);
    background: #ff5096;
    color: #ffffff;
}

/*Card 3D code*/
.sandbox-section__list {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 40px;
}

.sandbox-section__card {
    display: flex;
    flex-direction: column;
    align-items: center;

    background-color: white;
    width: 300px;
    padding: 30px 20px;

    border-radius: 25px;
    border: 3px solid #ffe6f2;
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);

    text-decoration: none;
    color: #333;
    transition: transform 0.3s ease;
}

.music-section__item:hover, .anime-section__item:hover, .sandbox-section__card:hover {
    transform: translateY(-10px);
    border-color: #FF69B4;
    box-shadow: 0 15px 25px rgba(255, 105, 180, 0.3);
}

/* Card 3D text*/
.card-icon {
    font-size: 50px;
    background: #FFF0F5;
    width: 90px;
    height: 90px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 15px;
}

.card-content {
    text-align: center;
}

.card-content h3 {
    margin: 0 0 10px 0;
    color: #C2185B;
    font-size: 22px;
}

.card-content p {
    font-size: 16px;
    color: #666;
    margin-bottom: 20px;
}

.card-tag {
    background-color: #FFDEE9;
    color: #880E4F;
    padding: 5px 15px;
    border-radius: 15px;
    font-size: 13px;
    font-weight: bold;
}

/* Card happy new year */
.card-content__happy-new-year h3 {
    color: rgb(19, 131, 184);
}

.card-content__happy-new-year span {
    color: rgb(3, 128, 167);
    background-color: #def5ff;
}

.sandbox-section__card__happy-new-year {
    border: 3px solid #e6f7ff;
}

.sandbox-section__card__happy-new-year .card-icon {
    background: #ebf7ff;
}

.sandbox-section__card__happy-new-year:hover {
    border-color: #69d0ff;
    box-shadow: 0 15px 25px rgba(105, 165, 255, 0.3);
}

/* Card happy birthday */
.card-content__happy-birthday h3 {
    color: rgb(184, 173, 19);
}

.card-content__happy-birthday span {
    color: rgb(144, 146, 0);
    background-color: #fffcd0;
}

.sandbox-section__card__happy-birthday {
    border: 3px solid #ffedd8;
}

.sandbox-section__card__happy-birthday .card-icon {
    background: #fffedd;
}

.sandbox-section__card__happy-birthday:hover {
    border-color: #eef127;
    box-shadow: 0 15px 25px rgba(239, 255, 90, 0.3);
}

/* footer */
.site-footer {
    margin-top: 60px;
    padding: 40px 50px;
    display: flex;
    justify-content: space-around;
    align-items: center;
    background: linear-gradient(to top, #ffede9, #f0d7f0);
    box-shadow: 0 -5px 15px rgba(0, 0, 0, 0.05);
    border-radius: 40px;
    font-size: 20px;
}

.contact-infomation__title {
    color: #880E4F;
    border-bottom: 2px dashed #FF69B4;
    padding-bottom: 5px;
    margin-bottom: 20px;
}

.contact-information_table td {
    padding: 8px 0;
    font-size: 18px;
}

/* Chỉnh form */
.feedback__form--fieldset {
    background-color: rgba(255, 219, 241, 0.918);
    border: 2px solid #cc92af;
    border-radius: 20px;
    padding: 20px;
}

.feedback__form--fieldset legend {
    background-color: #FF69B4;
    color: white;
    padding: 5px 10px;
    border-radius: 15px;
    font-weight: bold;
    text-align: center;
}

.feedback__form--table input {
    width: 250px;
    padding: 8px 15px;
    margin: 3px 0;
    border: 2px solid #eeaea9;
    border-radius: 15px;
}

.feedback__form--table input:focus {
    outline: none;
    border-color: #FF69B4;
    box-shadow: 0 0 8px rgba(255, 105, 180, 0.5);
}

.feedback__button button {
    margin-top: 10px;
    padding: 8px 20px;
    border-radius: 20px;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.feedback__button-submit {
    background-color: #FF69B4;
    border-color: #FF69B4;
    color: white;
}

.feedback__button-submit:hover {
    transform: translateY(-3px);
}

.feedback__button-reset {
    background-color: #E0E0E0;
    color: #2b2a2a;
    border-color: #e4d5d5;
    margin-left: 20px;
}

.feedback__button-reset:hover {
    transform: translateY(-3px);
}

/* Chỉnh logo link */
.logo-link .logo-link__list {
    display: flex;
    justify-content: center;
    align-items: center;
    list-style-type: none;
    gap: 10px;
}

.logo-link__list a {
    text-decoration: none;
}

.logo-link__list .fa-brands {
    font-size: 20px;
    color: white;

    width: 35px;
    height: 35px;
    border-radius: 50%;

    display: flex;
    justify-content: center;
    align-items: center;

    transition: all 0.2s ease-in-out;
}

.fa-facebook-f {
    background-color: #3b5998;
}

.fa-facebook-f:hover {
    transform: translateY(-7px);
}

.fa-github, .fa-x-twitter {
    background-color: #333333;
}

.fa-github:hover, .fa-x-twitter:hover {
    transform: translateY(-7px);
}

/* =========================================
    GIAO DIỆN ĐIỆN THOẠI (FIXED)
   ========================================= */
@media screen and (max-width: 768px) {

    section, footer {
        scroll-margin-top: 100px;
    }

    .container {
        margin: 0 auto;
        max-width: 100%;
    }

    /* 1. Header & Navigation */
    .site-header .container {
        flex-direction: row;
        justify-content: center;
        height: 70px;
        padding: 0;
    }

    .site-logo a {
        display: none;
        /* Ẩn chữ logo trên mobile cho gọn */
    }

    .main-nav__list {
        display: flex;
        justify-content: center;
        gap: 8px;
        padding: 0;
        margin: 0;
        width: 100%;
    }

    .main-nav__box-link {
        width: 45px !important;
        height: 45px !important;
        font-size: 20px !important;
        justify-content: center !important;
        padding: 0 !important;
    }

    .main-nav__box-link span {
        display: none !important;
    }

    .main-nav__box-link:active {
        background-color: #FF69B4 !important;
        color: white !important;
        transform: scale(0.9);
    }

    /* 2. About Me Section */
    .about-me-section {
        flex-direction: column;
        text-align: center;
        padding: 20px;
        padding-top: 50px;
    }

    .about-me-section .container {
        flex-direction: column;
        gap: 30px;
    }

    .left, .right {
        width: 100%;
        padding: 0;
    }

    .left {
        align-items: center;
    }

    .right {
        text-align: left;
        padding-left: 20px;
    }

    .right .text1 {
        font-size: 2.5rem;
    }

    .text3, .text4 {
        display: none;
    }

    /* 3. Tối ưu danh sách Music, Anime, Sandbox */
    .music-section__list,
    .anime-section__list,
    .sandbox-section__list {
        flex-direction: column;
        align-items: center;
        padding: 0;
        gap: 30px;
    }

    .sandbox-section__item {
        width: 100%;
        display: flex;
        justify-content: center;
    }

    .music-section__item,
    .anime-section__item,
    .sandbox-section__card {
        width: 95% !important;
        max-width: 450px;
        min-width: unset;
        min-height: 250px;
    }

    .music-section__player {
        height: 250px !important;
        border-radius: 12px;
    }

    .music-section__item {
        padding: 10px;
    }

    .music-section__caption {
        font-size: 25px;
        margin-top: 8px;
    }

    .anime-section__item img {
        height: 200px !important;
    }

    /* 4. Projects Carousel */
    .carousel-container {
        padding: 0;
        overflow: hidden;
        width: 100%;
    }

    .carousel-nav {
        display: none;
    }

    .carousel-viewport {
        gap: 20px;
        padding: 15px;
        margin: 0;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .projects-card-wrapper {
        flex: 0 0 100% !important;
        scroll-snap-align: center;
    }

    .projects-card__image-container {
        height: 180px;
    }

    .projects-card__title {
        font-size: 20px;
        margin-top: 5px;
    }

    .projects-card__description {
        font-size: 15px;
        margin: 8px 0;
    }

    .projects-btn {
        padding: 8px 15px;
    }

    .sandbox-section {
        width: 100%;
    }

    /* 5. Footer & Feedback Form */
    .site-footer {
        flex-direction: column;
        align-items: center;
        padding: 40px 20px;
        gap: 30px;
        border-radius: 25px;
        text-align: center;
    }

    .site-footer .container {
        flex-direction: column;
        align-items: center;
        gap: 40px;
        width: 100%;
    }

    .contact-infomation {
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .contact-information_table td {
        display: block;
        text-align: center;
        font-size: 16px;
        word-break: break-all;
    }

    .logo-link {
        width: 100%;
    }

    .logo-link__list {
        justify-content: center;
        padding: 0;
        margin: 10px 0;
    }

    .feedback {
        width: 100%;
    }

    .feedback__form--table tr {
        display: flex !important;
        flex-direction: row !important;
        align-items: center;
        justify-content: flex-start;
        gap: 10px;
        width: 100%;
        margin-bottom: 15px;
    }

    .feedback__button {
        display: flex;
        justify-content: flex-start;
    }

    .feedback__button td:first-child {
        display: none;
    }

    .feedback__form--table td:first-child {
        flex: 0 0 30%;
        text-align: left;
        white-space: nowrap;
        font-size: 17px;
    }

    .feedback__form--table td:last-child {
        flex: 1;
    }

    .feedback__form--table input {
        width: 100% !important;
        height: 35px !important;
        border-radius: 15px;
        padding: 0 10px;
    }
}