/* 整理完成 */

/* ===============================
            滑鼠移動偵測
   =============================== */

.mouse-follower {
    position: absolute;
    bottom: 0;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.5);
    pointer-events: none;
    /* 讓這個元素不干擾鼠標事件 */
    transition: none !important;
    /* 平滑過渡效果 */
    z-index: 9999;
    filter: blur(50px);
}

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

/* ===============================
            主題與顯示控制
   =============================== */

/* 主題宿主分層與顯示控制：只顯示被選中的主題 */
#theme-host {
    position: fixed;
    inset: 0;
    z-index: -1;
    /* 永遠在內容底層 */
    pointer-events: none;
    /* 背景不吃事件 */
    overflow: hidden;
}

#theme-host .theme {
    display: none;
    position: fixed;
    inset: 0;
    pointer-events: none;
}

#theme-host[data-theme="bg-stars"] #bg-stars {
    display: block;
}

#theme-host[data-theme="bg-tech-clean"] #bg-tech-clean {
    display: block;
}

#theme-host[data-theme="bg-particles"] #bg-particles {
    display: block;
}

/* default：不顯示任何主題，由 body 原本背景生效 */
#theme-host[data-theme="default"] .theme {
    display: none;
}



/* ===============================
            Modal 樣式
   =============================== */

/* 停止背景滾動（開啟 modal 時） */
body.modal-open {
    overflow: hidden;
}

/* Modal：霧面背景 */
.modal {
    position: fixed;
    inset: 0;
    display: none;
    place-items: center;
    padding: 6vh 5vw;
    background: var(--blur-d);
    backdrop-filter: blur(3px) saturate(100%);
    z-index: 10000;
}

.modal.show {
    display: grid !important;
}

/* Modal 內容：簡潔靜態外框 */
.modal-content {
    position: relative;
    width: min(92vw, 520px);
    padding: 30px 10px 15px 10px;
    border-radius: 18px;
    background: rgba(33, 37, 41);
    color: var(--text-light);
    border: 1px solid var(--c-cyan);
    box-shadow: 0 15px 40px rgba(0, 0, 0, .5), 0 0 25px rgba(0, 217, 255, .3);
    animation: modalUp .3s ease;
    overflow: visible;
}

/* 不使用的外框動畫元素（確保被忽略） */
.modal-border-svg,
.modal-border-runner {
    display: none !important;
}

.modal-content h2 {
    margin: 0 0 15px;
    font-size: 35px;
    text-align: center;
    color: #9bd1ff;
    text-shadow: 0 0 12px rgba(0, 217, 255, .4);
    position: relative;
    z-index: 1;
}

.modal-content form {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 15px;
    padding: 20px;
    margin: 0;
    box-shadow: 0 0 0;
}

.modal-content form button {
    padding: 14px 20px;
    border-radius: 12px;
    border: 1px solid var(--c-blue);
    background: rgba(255, 255, 255, .06);
    color: var(--text-light);
    cursor: pointer;
    font-size: 15px;
    font-weight: 500;
    transition: all .2s;
    position: relative;
    overflow: hidden;
}

.modal-content form button::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle, var(--c-cyan) 0%, transparent 70%);
    opacity: 0;
    transition: opacity .3s;
}

.modal-content form button:hover::before {
    opacity: .15;
}

.modal-content form button:hover {
    transform: translateY(-2px);
    background: rgba(100, 147, 250, .16);
    border-color: var(--c-cyan);
    box-shadow: 0 10px 28px rgba(0, 0, 0, .45), 0 0 24px var(--c-cyan);
}

.modal-content form hr {
    border: none;
    border-top: 1px solid rgba(100, 147, 250, .2);
    margin: 8px 0;
}

@keyframes modalUp {
    from {
        opacity: 0;
        transform: translateY(50px) scale(.94);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}



/* ===============================
            旋轉圓圈 - 暗黑科技風格
   =============================== */

.circle {
    position: absolute;
    width: 15%;
    margin: auto;
    transform: rotate(100deg);
    animation: circle-animate 20s linear infinite;
    filter: drop-shadow(0 0 15px rgba(0, 217, 255, 0.6));
    transition: all 0.5s ease;
}

/* 🔥 暗黑科技旋轉動畫 */
@keyframes circle-animate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* 圓圈位置 右 */
.rightCircle {
    position: absolute;
    top: 20px;
    right: 5%;
}

/* 圓圈位置 左 */
.leftCircle {
    position: absolute;
    top: 20px;
    left: 5%;
}

.circle svg {
    display: block;
    overflow: visible;
    transition: all 0.5s ease;
    position: relative;
}

/* 🔥 圓圈路徑：霓虹邊框 */
.circle path {
    fill: none;
    stroke: var(--c-cyan);
    stroke-width: 0.3;
    stroke-dasharray: 2, 3;
    opacity: 0.6;
    filter: drop-shadow(0 0 8px var(--c-cyan));
    animation: dash-flow 8s linear infinite;
    transition: all 0.5s ease;
}

@keyframes dash-flow {
    to {
        stroke-dashoffset: -20;
    }
}

/* 🔥 文字樣式：科技霓虹效果 */
.circle text {
    fill: rgba(230, 241, 255, 0.7);
    font-family: 'Segoe UI', system-ui, sans-serif;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
}

.circle a {
    fill: rgba(230, 241, 255, 0.7);
    text-decoration: none;
    transition: all 0.3s ease;
}

/* 🔥 高亮項目：發光效果 */
.circle .highlight {
    font-weight: 700;
    fill: var(--white);
    filter: drop-shadow(0 0 8px var(--c-cyan)) drop-shadow(0 0 12px rgba(0, 217, 255, 0.8));
    animation: text-glow 2s ease-in-out infinite;
}

@keyframes text-glow {
    0%, 100% {
        filter: drop-shadow(0 0 8px var(--c-cyan)) drop-shadow(0 0 12px rgba(0, 217, 255, 0.6));
    }
    50% {
        filter: drop-shadow(0 0 12px var(--c-cyan)) drop-shadow(0 0 20px rgba(0, 217, 255, 1));
    }
}

/* 🔥 懸停效果：增強發光 */
.circle a:hover {
    fill: var(--white);
    filter: drop-shadow(0 0 10px var(--c-cyan)) 
            drop-shadow(0 0 15px rgba(0, 217, 255, 0.9))
            drop-shadow(0 0 20px rgba(100, 147, 250, 0.6));
    font-weight: 600;
}

/* 🔥 圓圈容器：增加旋轉軌道效果 */
.circle::before {
    content: '';
    position: absolute;
    inset: -15%;
    border: 1px solid rgba(0, 217, 255, 0.15);
    border-radius: 50%;
    animation: orbit-ring 15s linear infinite reverse;
    transition: all 0.5s ease;
}

.circle::after {
    content: '';
    position: absolute;
    inset: -25%;
    border: 1px dashed rgba(100, 147, 250, 0.1);
    border-radius: 50%;
    animation: orbit-ring 20s linear infinite;
    transition: all 0.5s ease;
}

@keyframes orbit-ring {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* 🔥🔥🔥 懸停時整個圓圈的動畫效果 🔥🔥🔥 */

/* 1. 整體圓圈放大與發光 */
.circle:hover {
    filter: drop-shadow(0 0 30px rgba(0, 217, 255, 1))
            drop-shadow(0 0 50px rgba(100, 147, 250, 0.8));
    transform: scale(1.15) rotate(105deg);
    animation-play-state: paused;
}

/* 2. SVG 整體旋轉 */
.circle:hover svg {
    transform: rotate(15deg) scale(1.05);
}

/* 3. 內圈路徑變化 */
.circle:hover path {
    stroke-width: 0.5;
    opacity: 1;
    stroke: var(--white);
    stroke-dasharray: 4, 2;
    animation: dash-flow-fast 2s linear infinite;
    filter: drop-shadow(0 0 15px var(--c-cyan)) 
            drop-shadow(0 0 20px rgba(0, 217, 255, 1));
}

@keyframes dash-flow-fast {
    to {
        stroke-dashoffset: -40;
    }
}

/* 4. 外圈軌道加速旋轉 */
.circle:hover::before {
    border-width: 2px;
    border-color: rgba(0, 217, 255, 0.4);
    inset: -20%;
    animation: orbit-ring-fast 3s linear infinite reverse;
    box-shadow: 0 0 20px rgba(0, 217, 255, 0.5);
}

.circle:hover::after {
    border-width: 2px;
    border-color: rgba(100, 147, 250, 0.3);
    inset: -30%;
    animation: orbit-ring-fast 4s linear infinite;
    box-shadow: 0 0 25px rgba(100, 147, 250, 0.4);
}

@keyframes orbit-ring-fast {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* 5. 數據點加速脈衝 */
.circle:hover .data-dot {
    width: 6px;
    height: 6px;
    animation: data-point-fast 1s ease-in-out infinite;
    box-shadow: 
        0 0 15px var(--c-cyan),
        0 0 30px rgba(0, 217, 255, 0.8),
        0 0 40px rgba(0, 217, 255, 0.6);
}

@keyframes data-point-fast {
    0%, 100% {
        opacity: 0.5;
        transform: scale(1);
    }
    50% {
        opacity: 1;
        transform: scale(2);
    }
}

/* 6. 文字全部發光 */
.circle:hover text {
    fill: rgba(230, 241, 255, 1);
    filter: drop-shadow(0 0 5px var(--c-cyan));
}

.circle:hover a {
    fill: var(--white);
    font-weight: 600;
}

/* 7. 背景光暈擴散 */
.circle:hover svg::before {
    opacity: 1;
    transform: scale(1.5);
}

/* 🔥 圓圈進場動畫 - 科技感增強 */
.about-circle-animation {
    animation: circle-tech-enter 2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.about-circle-none {
    opacity: 0;
    transform: scale(0.5) rotate(-180deg);
    transition: all 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes circle-tech-enter {
    0% {
        transform: rotate(0deg) scale(0.3);
        opacity: 0;
        filter: drop-shadow(0 0 30px var(--c-cyan));
    }
    40% {
        opacity: 0.5;
        filter: drop-shadow(0 0 40px var(--c-cyan));
    }
    70% {
        transform: rotate(720deg) scale(1.1);
        opacity: 1;
    }
    100% {
        transform: rotate(820deg) scale(1);
        opacity: 1;
        filter: drop-shadow(0 0 15px rgba(0, 217, 255, 0.6));
    }
}

/* 991px 以下隱藏旋轉圓圈 */
@media screen and (max-width: 991px) {
    .circle,
    .rightCircle,
    .leftCircle {
        display: none !important;
    }
}


/* ===============================
            標題
   =============================== */

/* 標題區塊 - 暗黑科技風格增強 */
.tittles {
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: center;
    align-items: center;
    margin: 50px auto 30px;
    position: relative;
    padding: 20px;
}

/* 標題背景裝飾 */
.tittles::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(0, 217, 255, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    filter: blur(40px);
    z-index: -1;
    animation: pulse-bg 4s ease-in-out infinite;
}

@keyframes pulse-bg {

    0%,
    100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.3;
    }

    50% {
        transform: translate(-50%, -50%) scale(1.2);
        opacity: 0.6;
    }
}

.tittles h1 {
    margin: 0 0 15px;
    font-size: clamp(35px, 5vw, 50px);
    font-weight: 700;
    background: linear-gradient(135deg, var(--c-cyan), var(--c-blue), var(--white));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: none;
    position: relative;
    letter-spacing: 2px;
    color: var(--text-light);
    text-shadow: 0 0 20px rgba(0, 217, 255, 0.6);

}

/* 標題下方裝飾線 */
.tittles h1::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--c-cyan), transparent);
    box-shadow: 0 0 10px var(--c-cyan);
}

.tittles p {
    font-size: clamp(16px, 2vw, 20px);
    margin: 20px 0 0;
    color: rgba(230, 241, 255, 0.8);
    letter-spacing: 1px;
    position: relative;
}

/* 副標題前後裝飾 */
.tittles p::before,
.tittles p::after {
    content: '—';
    margin: 0 15px;
    color: var(--c-cyan);
    opacity: 0.6;
}

@media screen and (max-width: 991px) {
    .tittles {
        margin: 40px auto 20px;
        padding: 15px;
    }

    .tittles h1 {
        margin-bottom: 12px;
        letter-spacing: 1px;
    }

    .tittles h1::after {
        width: 50px;
        height: 2px;
    }

    .tittles p {
        margin-top: 15px;
    }
}

@media screen and (max-width: 425px) {
    .tittles {
        margin: 30px auto 15px;
    }

    .tittles p::before,
    .tittles p::after {
        margin: 0 10px;
    }
}
