/* Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* DESKTOP CSS */
html,
body {
    height: 100%;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    font-family: "Montserrat", Arial, Helvetica, sans-serif;
}

.desktop {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    width: 100%;
    background: url("./images/background.png") no-repeat center center;
    background-size: cover;
    background-color: #161920;
    position: relative;
    overflow-y: auto;
    /* overflow: hidden; */
}

.menu-container {
    display: flex;
    flex-direction: column;
    flex: 1;
    width: 100%;
    max-width: 1920px;
    margin: 0 auto;
    padding: 2vh 2vw;
    padding-bottom: 20px;
}

.title-group {
    width: 100%;
    text-align: center;
    margin-top: 2vh;
    /*margin-bottom: -72px;*/
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0vh;
}
.title-img {
    width: 15%;
    height: auto;
}

.social-icons {
    position: fixed;
    right: 2vw;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: -3.5vh;
    z-index: 100;
}

.social-icon {
    width: clamp(50px, 4vw, 70px);
    height: clamp(50px, 4vw, 70px);
    cursor: pointer;
    transition: transform 0.3s ease;
}

.social-icon:hover {
    /* transform: scale(1.1); */
}

.social-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/*Link Items*/
@keyframes spin {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

.link-items {
    display: flex;
    flex-direction: row;
    align-items: flex-end;
    justify-content: center;
    gap: 1.5rem;
    padding: 0 1rem 1rem;
    flex-wrap: wrap;
}

.link-item:hover {
    transform: scale(1.08);
    transition: transform 0.25s ease;
}

.link-item {
    transition: transform 0.25s ease;
}

.link-divider {
    width: 2px;
    height: 140px;
    border-left: 2px dashed #ccc;
    align-self: center;
    opacity: 0.5;
}

.link-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.6rem;
    cursor: pointer;
}

.link-circle {
    position: relative;
    width: 150px;
    height: 150px;
}

/* Ring 1 — outer, full solid */
.link-ring-1 {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 3px solid transparent;
    background:
            linear-gradient(#fff, #fff) padding-box,
            linear-gradient(180deg, #3AFFB0, #D5D5D5) border-box;
    opacity: 1;
}

/* Ring 2 — middle, nhiều răng cưa dùng repeating-conic-gradient */
.link-ring-2 {
    position: absolute;
    inset: 8px;
    border-radius: 50%;
    background: linear-gradient(180deg, #3AFFB0, #D5D5D5);
    -webkit-mask:
        repeating-conic-gradient(#000 0deg 4deg, transparent 4deg 6deg),
        radial-gradient(farthest-side, transparent calc(100% - 5px), #000 calc(100% - 5px));
    mask:
        repeating-conic-gradient(#000 0deg 4deg, transparent 4deg 6deg),
        radial-gradient(farthest-side, transparent calc(100% - 5px), #000 calc(100% - 5px));
    -webkit-mask-composite: intersect;
    mask-composite: intersect;
    opacity: 0.9;
}

/* Ring 3 — inner, 70% arc, spinning */
/* Uses conic-gradient + radial-gradient mask to create a partial arc ring */
.link-ring-3 {
    position: absolute;
    inset: 22px;
    border-radius: 50%;
    background: conic-gradient(var(--color) 252deg, transparent 252deg);
    -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 5px), #000 calc(100% - 5px));
    mask: radial-gradient(farthest-side, transparent calc(100% - 5px), #000 calc(100% - 5px));
    animation: spin 2s linear infinite;
}

/* Center content */
.link-content {
    position: absolute;
    inset: 20px;
    border-radius: 50%;
    background: radial-gradient(47.14% 47.14% at 50% 52.86%, #2AFFB9 0%, #24C38F 100%), #FFF;
    box-shadow: 0 -2px 6px 0 #68FFCE inset, 0 2px 4px 0 #83FFD7 inset, 0 0 10px 0 #008258;
    display: flex;
    align-items: center;
    justify-content: center;
}

.link-ms {
    color: #ffff;
    font-weight: 700;
    font-size: 30px;
    letter-spacing: 0.5px;
}

.link-label {
    background: linear-gradient(180deg, #19996F 0%, #2AFFB9 100%);
    color: #fff;
    font-weight: 700;
    font-size: 18px;
    padding: 5px 18px;
    border-radius: 999px;
    letter-spacing: 1px;
    box-shadow: 0 0 10px 0 #129F71, 0 -4px 4px 0 #1AF4AD inset, 0 4px 4px 0 #1AF4AD inset;
}

/*Link Section*/
.link-section {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.link-section img {
    max-width: 55rem;
    max-height: 22rem;
    object-fit: contain;
}

.link-join {
    margin-top: -6rem;
    background: #fff;
    position: relative;
    border: 8px solid #FFA4D1;
    border-radius: 16px;
    padding: 40px 40px 0 40px
}
.link-join-img {
    position: absolute;
    top: -14px;
    left: 50%;
    transform: translateX(-50%);
}
/*End Link Section*/
/*Download*/
.download-section {
    margin-top: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
}
.download-section .image {
    max-width: 62.5rem;
}
.download-section .image img {
    width: 100%;
    height: 100%;
}
.download-btn {
    position: absolute;
    display: flex;
    gap: 1rem;
    align-items: center;
    bottom: 1rem;
}
.download-btn img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}
.download-btn .button-download-ios {

}
.download-btn .button-download-android {

}

.download-section-mobile {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
}
.download-section-mobile .image {
    max-width: 100%;
    width: 100%;
}
.download-section-mobile .image img {
    width: 100%;
    height: 100%;
}
.download-btn-mobile {
    position: absolute;
    display: flex;
    gap: 16px;
    align-items: center;
    bottom: 1rem;
    left: 5%;
}
.download-btn-mobile img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}
.download-btn-mobile .button-download-ios {
    height: 45px;
    width: 100px;
}
.download-btn-mobile .button-download-android {
    height: 45px;
    width: 100px;
}
/*End Download*/

/* Social Buttons */
.social {
    display: none;
    flex-direction: column;
    gap: 20px;
    margin-top: 16px;
    align-items: center;
}

.social-row {
    display: flex;
    flex-direction: row;
    gap: 10px;
    justify-content: space-between;
}

.social-btn-link {
    display: inline-block;
    cursor: pointer;
    transition: transform 0.2s ease, filter 0.2s ease;
}

.social-btn-link img {
    /*height: 44px;*/
    width: 100%;
    display: block;
    object-fit: contain;
}

.social-btn-link:hover {
    transform: scale(1.06);
    filter: brightness(1.05);
}
/* End Social Buttons */
@media (max-width: 344px) {
    .download-btn-mobile {
        left: 0;
    }
    .download-btn-mobile .button-download-ios {
        height: 35px;
        width: 100px;
    }
    .download-btn-mobile .button-download-android {
        height: 35px;
        width: 100px;
    }
}
@media (max-width: 767px) {
    .title-img {
        width: 60%;
    }
    .link-section img {
        width: 100%;
        height: 100%;
    }
    .link-join {
        margin-top: -2.5rem;
        width: 100%;
        padding: 30px 12px 12px;
    }
    .link-items {
        width: 100%;
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        justify-items: center;
        gap: 0.5rem;
        padding: 1.2rem 0.5rem;
    }
    .link-divider {
        display: none;
    }
    .link-circle {
        width: 100px;
        height: 100px;
    }
    .link-ms {
        font-size: 1rem;
    }
    .link-label {
        font-size: 0.8rem;
        padding: 3px 12px;
    }
    .download-section {
        display: none;
    }
    .download-section-mobile {
        display: flex;
    }
    .social {
        display: flex;
    }
    .download-btn .button-download-ios {
        height: 30px;
    }
    .download-btn .button-download-android {
        height: 30px;
    }
    .social-icons {
        display: none;
    }
}
@media (min-width: 768px) and (max-width: 1024px) {
    .title-img {
        width: 40%;
    }
    .link-section img {
        width: 100%;
        height: 100%;
    }
    .link-join {
        margin-top: -4.5rem;
        width: 100%;
        padding: 36px 16px 16px;
    }
    .link-items {
        width: 100%;
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        justify-items: center;
        gap: 1.2rem;
        padding: 1.2rem 0.5rem;
    }
    .link-divider {
        display: none;
    }
    .link-circle {
        width: 150px;
        height: 150px;
    }
    .download-section {
        display: none;
    }
    .download-section-mobile {
        display: flex;
        padding: 0 16px;
    }
    .social {
        display: none;
    }
    .download-btn .button-download-ios {
        height: 65px;
    }
    .download-btn .button-download-android {
        height: 65px;
    }

    .download-btn-mobile {
        position: absolute;
        display: flex;
        gap: 16px;
        align-items: center;
        bottom: 1rem;
        left: 5%;
    }
    .download-btn-mobile img {
        width: 100%;
        height: 100%;
        object-fit: contain;
    }
    .download-btn-mobile .button-download-ios {
        height: 100%;
        width: 100%;
    }
    .download-btn-mobile .button-download-android {
        height: 100%;
        width: 100%;
    }
}

/* Nest Hub (1024×600) — desktop-like layout */
@media (min-width: 768px) and (max-width: 1024px) and (max-height: 600px) {
    .title-img {
        width: 12%;
    }
    .link-items {
        gap: 0.2rem;
        grid-template-columns: repeat(6, 1fr);
    }
    .link-circle {
        width: 110px;
        height: 110px;
    }
    .link-ms {
        font-size: 1.1rem;
    }
    .link-label {
        font-size: 0.9rem;
        padding: 4px 14px;
    }
    .download-section {
        display: flex;
        margin-top: 8px;
    }
    .download-section .image {
        max-width: 90%;
    }
    .download-btn {
        bottom: 1.4rem;
    }
    .download-btn .button-download-ios,
    .download-btn .button-download-android {
        height: 66px;
    }
    .download-section-mobile {
        display: none;
    }
    .social {
        display: none;
    }
    .social-icons {
        display: flex;
    }
}

/* Nest Hub Max (1280×800) — desktop-like layout */
@media (min-width: 1280px) and (max-width: 1280px) and (max-height: 800px) {
    .social {
        display: none;
    }
    .social-icons {
        display: flex;
    }
    .download-section-mobile {
        display: none;
    }
    .download-section {
        display: flex;
    }
}

/* iPad mini */
@media (min-width: 768px) and (max-width: 768px) and (min-height: 1024px) {
    .social-icons {
        display: none;
    }
    .social {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 36px;
        margin-top: 20px;
        width: 100%;
        padding: 0;
    }
    .social-row {
        display: flex;
        flex-direction: row;
        gap: 16px;
        justify-content: center;
        width: 100%;
    }
    .social-btn-link {
        flex: 1;
        max-width: 340px;
    }
    .social-btn-link img {
        width: 100%;
        height: auto;
        display: block;
    }
}

/* iPad Air */
@media (min-width: 820px) and (max-width: 820px) and (min-height: 1180px) {
    .title-img {
        width: 30%;
    }
    .social-icons {
        display: none;
    }
    .social {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 16px;
        margin-top: 20px;
        width: 100%;
        padding: 0 24px;
        max-width: 820px;
    }
    .social-row {
        display: flex;
        flex-direction: row;
        gap: 16px;
        justify-content: center;
        width: 100%;
        max-width: 740px;
    }
    .social-btn-link {
        flex: 1;
        max-width: 360px;
    }
    .social-btn-link img {
        width: 100%;
        height: auto;
        display: block;
    }
    .download-btn-mobile {
        bottom: 2.5rem;
        left: 8%;
    }
    .download-btn-mobile .button-download-ios,
    .download-btn-mobile .button-download-android {
        height: 70px;
        width: 190px;
    }
}

/* iPad Pro 11" */
@media (min-width: 834px) and (max-width: 834px) and (min-height: 1194px) {
    .title-img { width: 28%; }
    .social-icons { display: none; }
    .social {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 16px;
        margin-top: 20px;
        width: 100%;
        padding: 0 24px;
        max-width: 834px;
    }
    .social-row {
        display: flex;
        flex-direction: row;
        gap: 16px;
        justify-content: center;
        width: 100%;
        max-width: 760px;
    }
    .social-btn-link { flex: 1; max-width: 370px; }
    .social-btn-link img { width: 100%; height: auto; display: block; }
    .download-btn-mobile { bottom: 1.2rem; left: 6%; }
    .download-btn-mobile .button-download-ios,
    .download-btn-mobile .button-download-android { height: 55px; width: 135px; }
}

/* ASUS ZenBook Fold */
@media (min-width: 853px) and (max-width: 853px) and (min-height: 1280px) {
    .title-img { width: 27%; }
    .social-icons { display: none; }
    .social {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 16px;
        margin-top: 20px;
        width: 100%;
        padding: 0;
        max-width: 853px;
    }
    .social-row {
        display: flex;
        flex-direction: row;
        gap: 16px;
        justify-content: center;
        width: 100%;
        max-width: 770px;
    }
    .social-btn-link { flex: 1; max-width: 375px; }
    .social-btn-link img { width: 100%; height: auto; display: block; }
    .download-btn-mobile { bottom: 2.5rem; left: 10%; }
    .download-btn-mobile .button-download-ios,
    .download-btn-mobile .button-download-android { height: 80px; width: 210px; }
}

/* Surface Pro 7 */
@media (min-width: 912px) and (max-width: 912px) and (min-height: 1368px) {
    .title-img { width: 25%; }
    .social-icons { display: none; }
    .social {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 16px;
        margin-top: 20px;
        width: 100%;
        padding: 0 32px;
        max-width: 912px;
    }
    .social-row {
        display: flex;
        flex-direction: row;
        gap: 20px;
        justify-content: center;
        width: 100%;
        max-width: 820px;
    }
    .social-btn-link { flex: 1; max-width: 400px; }
    .social-btn-link img { width: 100%; height: auto; display: block; }
    .download-btn-mobile { bottom: 2.5rem; left: 7%; }
    .download-btn-mobile .button-download-ios,
    .download-btn-mobile .button-download-android { height: 100px; width: 250px; }
}

/* iPad Pro 12.9" */
@media (min-width: 1024px) and (max-width: 1024px) and (min-height: 1366px) {
    .title-img { width: 22%; }
    .social-icons { display: none; }
    .social {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 20px;
        margin-top: 20px;
        width: 100%;
        padding: 0 40px;
        max-width: 1024px;
    }
    .social-row {
        display: flex;
        flex-direction: row;
        gap: 24px;
        justify-content: center;
        width: 100%;
        max-width: 900px;
    }
    .social-btn-link { flex: 1; max-width: 440px; }
    .social-btn-link img { width: 100%; height: auto; display: block; }
    .download-btn-mobile { bottom: 2.5rem; left: 3%; }
    .download-btn-mobile .button-download-ios,
    .download-btn-mobile .button-download-android { height: 100px; width: 310px; }
}

/* Surface Duo - 1 màn (folded) */
@media (min-width: 540px) and (max-width: 540px) and (min-height: 720px) {
    .download-btn-mobile {
        bottom: 1rem;
        left: 5%;
    }
    .download-btn-mobile .button-download-ios,
    .download-btn-mobile .button-download-android {
        height: 60px;
        width: 150px;
    }
}

/* Surface Duo - 2 màn mở ra (unfolded) */
@media (min-width: 1114px) and (max-width: 1114px) and (min-height: 705px) {

}
