/* ===============================
            通知訊息
   =============================== */

.swal2-popup {
    border-radius: 18px !important;
    background: rgba(33, 37, 41) !important;
    color: var(--text-light) !important;
    border: 1px solid var(--c-cyan-35) !important;
    box-shadow: 0 15px 40px rgba(0, 0, 0, .5), 0 0 25px rgba(0, 217, 255, .3) !important;
}


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

.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;
}



/* ===============================
            特效動畫
   =============================== */

/* 波動線條環繞動畫 */
.rotate-card {
    position: relative;
    isolation: isolate;
}

.rotate-card::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: inherit;
    padding: 3px;
    background: conic-gradient(from var(--angle, 0deg) at 50% 50%,
            transparent 0deg,
            rgba(0, 217, 255, .7) 45deg,
            rgba(100, 147, 250, .9) 90deg,
            rgba(0, 217, 255, .7) 135deg,
            transparent 180deg,
            transparent 360deg);
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    border-radius: 18px;
    animation: rotate-border 3s linear infinite;
    pointer-events: none;
    z-index: -1;
}

@keyframes rotate-border {
    0% {
        --angle: 0deg;
    }

    100% {
        --angle: 360deg;
    }
}

@property --angle {
    syntax: '<angle>';
    initial-value: 0deg;
    inherits: false;
}


/* ===============================
            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, 350px);
    padding: 30px 10px 15px 10px;
    border-radius: 18px;
    background: rgba(33, 37, 41);
    color: var(--text-light);
    border: 1px solid var(--c-cyan-35);
    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 .modal-title {
    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;
}


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

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


.systemModal {
    width: min(92vw, 500px);
}

.systemModal form {
    gap: 25px;
}

/* ===============================
            圖片 Modal 樣式
   =============================== */

.image-modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .5);
    backdrop-filter: blur(10px);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.image-modal.show {
    display: flex;
}

.image-modal .modal-image {
    max-width: 90vw;
    max-height: 90vh;
    border-radius: 18px;
    border: 2px solid var(--c-cyan);
    box-shadow: 0 0 60px rgba(0, 217, 255, .6);
}

.image-modal .modal-close {
    position: absolute;
    top: 30px;
    right: 30px;
    font-size: 40px;
    color: var(--white);
    cursor: pointer;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all .3s;
}

.image-modal .modal-close:hover {
    background: var(--c-cyan);
    transform: rotate(90deg);
}



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

.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: 0px auto;
    position: relative;
    padding: 20px;
    gap: 30px;
}

/* 標題背景裝飾 */
.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;
    }
}


/* ===============================
            按鈕
   =============================== */

/* 按鈕組 */
.buttons{
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 11px 14px;
    border: 0;
    border-radius: 10px;
    transition: all .2s;
    text-decoration: none;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
}

.btn:hover {
    transform: translateY(-5px); 
    color: var(--light);
}

/* 新增項目按鈕 */
.btn-add {
    background: var(--c-cyan-10);
    color: var(--c-cyan);
    border: 2px dashed var(--c-cyan);
    font-size: 20px;
    padding: 10px 12px;
    width: 45px;
    height: 45px;
    justify-content: center;
}

.btn-add:hover {
    background: var(--c-cyan-20);
    color: var(--c-cyan);
    box-shadow: 0 4px 20px rgba(0, 217, 255, .3);
}


/* 放大檢視按鈕 */
/* 上傳照片按鈕 */
 .btn-zoom,
 .btn-upload {
 	padding: 10px 20px;
 	background: rgba(100, 147, 250, .2);
 	border: 1px solid var(--c-blue);
 	border-radius: 10px;
 	color: var(--text-light);
 	cursor: pointer;
 	transition: all .3s;
 	font-size: 14px;
 	font-weight: 600;
 }

 .btn-zoom:hover,
 .btn-upload:hover {
 	background: rgba(100, 147, 250, .4);
 	border-color: var(--c-cyan);
 	transform: translateY(-2px);
 	box-shadow: 0 4px 15px rgba(100, 147, 250, .3);
 }



/* 編輯按鈕 */
.btn-edit {
    background: linear-gradient(135deg, var(--c-cyan), var(--c-blue));
    color: var(--white);
    box-shadow: 0 4px 15px rgba(0, 217, 255, .3);
}

.btn-edit:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 217, 255, .5);
    border-color: var(--white);
}


/* 返回按鈕 */
.btn-secondary,
.btn-secondary:focus,
.btn-secondary:active {
    background: rgba(108, 117, 125, .2);
    border: 1px solid rgba(108, 117, 125, .4);
    color: var(--text-light);
    box-shadow: 0 0 0 rgba(108, 117, 125, .2);
}

.btn-secondary:hover {
    background: rgba(108, 117, 125, .4);
    box-shadow: 0 6px 20px rgba(108, 117, 125, .3);
}


/* 儲存按鈕 */
.btn-success {
    background: linear-gradient(135deg, #0acb8e, #04c7e0);
    border-color: #0acb8e;
    color: var(--white);
    box-shadow: 0 4px 15px rgba(10, 203, 142, .3);
}

.btn-success:hover {
    box-shadow: 0 8px 25px rgba(10, 203, 142, .5);
}


/* 主題與語言按鈕樣式 */
.btn-theme,
.btn-language {
    background: rgba(108, 117, 125, 0.4); 
    color: var(--white);
}

.btn-theme:hover,
.btn-language:hover {
    box-shadow: 0 8px 25px rgba(100, 147, 250, 0.5); 
    background: linear-gradient(135deg, #04c7e0, #6493fa);
}

/* 登入按鈕 */
.btn-login {
    gap: 12px;
    padding: 16px 40px;
    font-size: 15px;
    font-weight: 600;
    color: var(--white);
    background: linear-gradient(135deg, var(--c-cyan), var(--c-blue));
    border: 0;
    border-radius: 15px;
    text-decoration: none;
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow:
        0 8px 30px rgba(0, 217, 255, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.btn-login::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--c-blue), var(--c-cyan));
    opacity: 0;
    transition: opacity 0.4s ease;
}

.btn-login::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

.btn-login i,
.btn-login span {
    position: relative;
    z-index: 1;
    transition: transform 0.3s ease;
}

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

.btn-login:hover {
    transform: translateY(-5px) scale(1.05);
    border-color: var(--white);
    color: var(--light);
    box-shadow:
        0 15px 45px rgba(0, 217, 255, 0.6),
        0 0 40px rgba(0, 217, 255, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.btn-login:hover::before {
    opacity: 1;
}

.btn-login:hover::after {
    width: 100%;
    height: 300px;
}

.btn-login:hover i {
    transform: translateX(-3px);
}

.btn-login:hover span {
    transform: translateX(3px);
}

.btn-login:active {
    transform: translateY(-2px) scale(1.02);
}



/* 關聯帳號（多按鈕響應式佈局） */
.social-group {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 10px;
}

.social-group i {
    font-size: 25px;
}

.social-empty {
    text-align: center;
    padding: 30px;
    color: rgba(230, 241, 255, 0.5);
    font-style: italic;
}

.social-icon {
    width: 25px;
    height: 25px;
    object-fit: contain;
}

/* Google 白底 */
.google-btn {
    background: var(--white);
    color: #1d1d1d;
    border: 1px solid #e5e7eb;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .08);
}

.google-btn:hover {
    background: #f9fafb;
    color: #1d1d1d;
    border-color: #d1d5db;
    box-shadow: 0 4px 12px rgba(0, 0, 0, .12);
}

/* LINE 綠底 */
.line-btn {
    background: #06c755;
    color: var(--light);
    border: 1px solid #06c755;
    box-shadow: 0 2px 8px rgba(6, 199, 85, .25);
}

.line-btn:hover {
    background: #05b04d;
    color: var(--light);
    border-color: #05b04d;
    box-shadow: 0 4px 12px rgba(6, 199, 85, .35);
}

/* GitHub 黑底 */
.github-btn {
    background: #24292e;
    color: var(--light);
    border: 1px solid #24292e;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .25);
}

.github-btn:hover {
    background: #1b1f23;
    color: var(--light);
    border-color: #1b1f23;
    box-shadow: 0 4px 12px rgba(0, 0, 0, .35);
}



/* 手機版：單欄排列 */
@media (max-width: 480px) {
    .social-group {
        grid-template-columns: 1fr;
    }
}


/* ===============================
            註冊提示
   =============================== */

.auth-hint {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 15px;
    color: rgba(230, 241, 255, 0.7);
    animation: fadeIn 1s ease-in-out 0.5s both;
}

.auth-hint span {
    color: rgba(230, 241, 255, 0.6);
}

.auth-hint a {
    color: var(--c-cyan);
    text-decoration: none;
    font-weight: 600;
    position: relative;
    transition: all 0.3s ease;
}

.auth-hint a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--c-cyan);
    transition: width 0.3s ease;
    box-shadow: 0 0 10px var(--c-cyan);
}

.auth-hint a:hover {
    color: var(--white);
    text-shadow: 0 0 15px var(--c-cyan);
}

.auth-hint a:hover::after {
    width: 100%;
}