/* 整理完成 */

/* 科技感發光動畫 */
@keyframes glow {

    0%,
    100% {
        filter: drop-shadow(0 0 10px var(--white));
    }

    50% {
        filter: drop-shadow(0 0 20px var(--teal, var(--blue)));
    }
}

/* 上下浮動動畫 */
@keyframes bounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-20px);
    }
}

/* ===== 主區塊 ===== */
#index {
    width: 100%;
    height: calc(100dvh - 60px);
    max-width: none;
    padding: 0;
    display: grid;
    place-items: center;
}

/* 背景容器 */
.indexBackground {
    position: absolute;
    overflow: hidden;
    width: 100%;
    height: -webkit-fill-available;
    z-index: 0;
}

.indexBackground img {
    position: absolute;
    width: 500px;
    height: auto;
    object-fit: cover;
    opacity: 0.8;
    transform-origin: center center;
    will-change: transform;
}

.indexBackground #index-img-1 {
    top: 0px;
    left: 12px;
    transform: scale(0.75);
}

.indexBackground #index-img-2 {
    top: clamp(300px, 25%, 35%);
    left: -185px;
    transform: scaleX(-1) scale(0.9) rotate(-40deg);
}

.indexBackground #index-img-3 {
    top: clamp(680px, 55%, 85%);
    left: -25px;
    transform: scaleX(-1) scale(0.9) rotate(159deg);
}

.indexBackground #index-img-4 {
    top: clamp(200px, 10%, 30%);
    right: -110px;
    transform: scaleX(-1) scale(0.8) rotate(120deg);
}

.indexBackground #index-img-5 {
    top: clamp(541px, 40%, 80%);
    right: -122px;
    transform: scaleX(-1) scale(0.8) rotate(-10deg);
}

/* ===== 主標題區 ===== */
#indexTittle {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: auto;
    max-width: 90%;
    min-height: 1200px;
    text-align: center;
    margin-top: 80px;
}

#indexTittle>div:first-child {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

#indexTittle img {
    width: clamp(250px, 35vw, 400px);
    height: auto;
    filter: drop-shadow(0 0 10px var(--white));
    transition: filter 0.15s ease-out;
    will-change: filter;
}

#indexTittle img:hover {
    filter: drop-shadow(0 0 20px var(--teal, var(--blue)));
}

#indexTittle p {
    margin: 0;
    font-size: clamp(24px, 4vw, 40px);
    font-weight: bold;
    transition: opacity 0.5s ease;
}

/* ===== 認證操作區塊 ===== */
.auth-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    margin-top: 40px;
}



/* 向下滾動指示器 (已登入時顯示) */
.scroll-indicator {
    margin-top: 40px;
    animation: bounce 2s infinite;
}

.scroll-indicator a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    font-size: 24px;
    border: 2px solid var(--c-cyan);
    border-radius: 50%;
    background: rgba(0, 217, 255, 0.1);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    box-shadow: 0 0 20px rgba(0, 217, 255, 0.3);
}

.scroll-indicator a:hover {
    background: rgba(0, 217, 255, 0.2);
    border-color: var(--white);
    transform: scale(1.1);
    box-shadow: 0 0 30px rgba(0, 217, 255, 0.6);
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}


/* ===== RWD 斷點 ===== */

@media (max-width: 1920px), (max-height: 1080px) {

    #indexTittle {
        min-height: 800px;
    }

    .indexBackground img {
        width: 350px;
    }

    .indexBackground #index-img-1 {
        top: 30px;
        left: 8px;
    }

    .indexBackground #index-img-2 {
        top: clamp(240px, 30%, 45%);
        left: -130px;
    }

    .indexBackground #index-img-3 {
        top: clamp(550px, 60%, 85%);
        left: -20px;
    }

    .indexBackground #index-img-4 {
        top: clamp(200px, 10%, 30%);
        right: -80px;
    }

    .indexBackground #index-img-5 {
        top: clamp(470px, 40%, 80%);
        right: -90px;
    }
}

@media (max-width: 1440px), (max-height: 1000px) {
    
    #indexTittle {
        min-height: 800px;
    }

    .indexBackground img {
        width: 300px;
    }

    .indexBackground #index-img-1 {
        top: 20px;
        left: 5px;
    }

    .indexBackground #index-img-2 {
        top: clamp(200px, 25%, 40%);
        left: -110px;
    }

    .indexBackground #index-img-3 {
        top: clamp(450px, 55%, 80%);
        left: -20px;
    }

    .indexBackground #index-img-4 {
        top: clamp(150px, 10%, 25%);
        right: -70px;
    }

    .indexBackground #index-img-5 {
        top: clamp(400px, 35%, 75%);
        right: -80px;
    }
}

@media (max-width: 991px), (max-height: 900px) {


    #indexTittle img {
        animation: glow 3s infinite alternate ease-in-out;
    }

    #indexTittle {
        min-height: 750px;
    }

    .indexBackground img {
        width: 250px;
    }

    .indexBackground #index-img-1 {
        top: 60px;
        left: 8px;
    }

    .indexBackground #index-img-2 {
        top: clamp(240px, 30%, 45%);
        left: -130px;
    }

    .indexBackground #index-img-3 {
        top: clamp(465px, 60%, 85%);
        left: -20px;
    }

    .indexBackground #index-img-4 {
        top: clamp(200px, 10%, 30%);
        right: -80px;
    }

    .indexBackground #index-img-5 {
        top: clamp(385px, 45%, 80%);
        right: -90px;
    }
}


@media (max-width: 768px), (max-height: 850px) {

   #indexTittle {
        min-height: 600px;
    }

    .indexBackground img {
        width: 220px;
    }

    .indexBackground #index-img-1 {
        top: clamp(40px, 10%, 30%);
        left: -15px;
    }

    .indexBackground #index-img-2 {
        top: clamp(200px, 35%, 45%);
        left: -75px;
    }

    .indexBackground #index-img-3 {
        top: clamp(360px, 60%, 85%);
        left: -20px;
    }

    .indexBackground #index-img-4 {
        top: clamp(150px, 30%, 50%);
        right: -80px;
    }

    .indexBackground #index-img-5 {
        top: clamp(200px, 45%, 80%);
        right: -90px;
    }

    /* 行動版禁用 will-change（省電） */
    .indexBackground img,
    #indexTittle img {
        will-change: auto;
    }

    .auth-actions {
        gap: 15px;
        margin-top: 30px;
    }

    .btn-login {
        padding: 14px 35px;
        font-size: 16px;
    }

    .btn-login i {
        font-size: 18px;
    }

    .auth-hint {
        font-size: 14px;
        flex-direction: column;
        gap: 5px;
        text-align: center;
    }

    .scroll-indicator {
        margin-top: 30px;
    }

    .scroll-indicator a {
        width: 45px;
        height: 45px;
        font-size: 22px;
    }
}

@media (max-width: 480px) {

    .indexBackground img {
        display: none;
    }

    .scroll-indicator {
        bottom: 3dvh;
        bottom: 3vh;
    }
}


@media (max-width: 425px) {
    .auth-actions {
        margin-top: 25px;
    }

    .btn-login {
        padding: 12px 30px;
        font-size: 15px;
        gap: 10px;
    }

    .btn-login i {
        font-size: 16px;
    }

    .auth-hint {
        font-size: 13px;
    }

    .scroll-indicator a {
        width: 40px;
        height: 40px;
        font-size: 20px;
    }
}

/* 行動裝置隱藏 */
@media (pointer: coarse){
    .mouse-follower{
        display: none !important;
    }
}