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

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

/* ===============================
            拖曳排序樣式
   =============================== */

/* 拖曳手把樣式 */
.drag-handle {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: grab;
    z-index: 10;
    transition: all 0.2s ease;
}

.drag-handle:hover {
    background: var(--accent, #00d9ff);
    color: #fff;
    border-color: var(--accent, #00d9ff);
    box-shadow: 0 0 10px rgba(0, 217, 255, 0.6);
}

.drag-handle:active {
    cursor: grabbing;
}

.phase-header {
	cursor: move; /* 指示可拖曳 */
}

.sortable-ghost {
	opacity: 0.2 !important;
	background: transparent !important;
	border: 1px dashed rgba(255, 255, 255, 0.3) !important;
	box-shadow: none !important;
	transition: none !important;
	pointer-events: none;
}

.sortable-fallback {
	opacity: 1 !important;
	background-color: var(--sys-bg-card, #1e293b);
	box-shadow: 0 15px 30px rgba(0, 0, 0, 0.5);
	border: 1px solid var(--accent, rgba(0, 217, 255, 0.3));
	transform: scale(1.02);
	cursor: grabbing;
	transition: none !important;
	z-index: 9999;
	pointer-events: none !important;
}

.sortable-drag {
	opacity: 1 !important;
	cursor: grabbing;
	background-color: var(--sys-bg-card, #1e293b);
	transition: none !important;
}



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

.mouse-follower {
    position: fixed;
    top: 0;
    left: 0;
    width: 260px;
    height: 260px;
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    filter: blur(42px);
    opacity: 0;
    will-change: transform, opacity;
    transition: opacity 0.3s ease;
    mix-blend-mode: screen;
}

.mouse-follower.is-active {
    opacity: 0.8;
    transition: none;
}

/* 行動裝置隱藏 */
@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-dark"] #bg-dark {
    display: block;
}

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

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

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

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

#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: 100;
}

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

.modal-footer {
    display: flex;
    gap: 12px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}


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

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


.tittles h1 {
    position: relative;
    z-index: 1;
    color: var(--text-light);
    font-size: 3rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--white) 0%, var(--cyan) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 40px rgba(0, 217, 255, 0.3);
    letter-spacing: 1px;
}

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

.tittles p {
    letter-spacing: 1px;
    font-size: 1.2rem;
    color: var(--text-light);
    font-weight: 400;
}

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

/* =========================================================
   前台通用雙欄佈局 (共用：作品集、學習筆記等)
   ========================================================= */
.front-sidebar-layout {
    display: flex;
    gap: 40px;
    width: 100%;
    align-items: flex-start;
}

.front-sidebar {
    width: 280px;
    flex-shrink: 0;
    position: sticky;
    top: 100px;
}

.front-layout-main {
    flex: 1;
    min-width: 0;
}

@media (max-width: 992px) {
    .front-sidebar-layout {
        flex-direction: column;
        gap: 30px;
    }
    .front-sidebar {
        width: 100%;
        position: static;
    }
}

/* =========================================================
   前台通用篩選器樣式 (共用：作品集、學習筆記等)
   ========================================================= */
.filters-container {
    width: 100%;
    margin: 0;
    position: relative;
    z-index: 2;
}

.filter-section {
    margin-bottom: 30px;
}

.filter-section:last-child {
    margin-bottom: 0;
}

.filter-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 700;
    color: var(--cyan);
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    opacity: 0.9;
}

.filter-title i {
    font-size: 12px;
}

.filter-buttons {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* 2 欄網格布局 */
.filter-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

/* 自動換行布局 */
.filter-wrap {
    display: flex;
    flex-wrap: wrap;
    flex-direction: row;
    gap: 6px;
}

.filter-btn {
    width: 100%;
    padding: 14px 18px;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: rgba(255, 255, 255, 0.6);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.25s ease;
    position: relative;
    text-align: center;
}

.filter-btn span {
    position: relative;
    z-index: 1;
}

.filter-btn:hover {
    border-color: rgba(0, 217, 255, 0.4);
    background: rgba(0, 217, 255, 0.05);
    color: var(--cyan);
    transform: translateX(3px);
}

.filter-btn.active {
    background: rgba(0, 217, 255, 0.15);
    border-color: var(--cyan);
    color: var(--cyan);
    box-shadow: 0 0 15px rgba(0, 217, 255, 0.2);
}

/* 自動寬度按鈕 */
.filter-btn-auto {
    width: fit-content;
    padding: 8px 14px;
    font-size: 12px;
    white-space: nowrap;
    flex-shrink: 0;
}
