/* ===== 1. 基礎設定 ===== */

/* 顏色設定 */
:root {
    --purple-line: 2px solid rgb(187, 0, 255);
    --blue-line: rgb(0, 246, 255);
}

/* 全局樣式 */
body {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    margin: 0;
    padding: 0;
    width: 100vw;
    height: auto;

    overflow: hidden;
    background-color: rgba(14, 17, 22, 0.95);
    color: white;
    font-size: 16px;
    font-family: 'Segoe UI', Roboto, sans-serif;
}


/* ===== 2. 佈局與元件 ====== */

/* 紫光容器 */
.purple-light {
    z-index: -2;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
}

/* 讓紫光容器裡的 div 都繼承 */
.purple-light > div {
    position: absolute;
    filter: blur(1px);
    /* 左右紫線 */
    border-left: var(--purple-line);
    border-right: var(--purple-line);
    /* 漸層背景 */
    background: linear-gradient(
        90deg,
        rgba(187, 0, 255, 0.15) 0%, 
        rgba(187, 0, 255, 0.05) 50%, 
        rgba(187, 0, 255, 0) 100%
        );
    /* 上下透明漸變 */
    -webkit-mask-image: linear-gradient(to bottom, transparent 0%, black 25%, black 75%, transparent 100%);
    mask-image: linear-gradient(to bottom, transparent 0%, black 25%, black 75%, transparent 100%);
}

/* 右下紫光 */
.purple-light-1 {
    top: 0;
    right: 0;
    width: 20vw;
    height: 100vh;
    opacity: 0.8;
    transform: skew(-30deg);  /* 斜切效果 */
}

/* 左中紫光 */
.purple-light-2 {
    top: 0;
    left: 0;
    width: 18vw;
    height: 80vh;
    transform: skew(50deg);
}

/* 左上紫光 */
.purple-light-3 {
    top: 0;
    left: 15vw;
    width: 10vw;
    height: 60vh;
    opacity: 0.5;
    transform: skew(-30deg);
}

/* 藍線 SVG 容器 */
.svg-lines {
    z-index: -1;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    filter: drop-shadow(0 0 3px var(--blue-line));
    transform: translateZ(0);
}

/* 藍線路徑樣式 */
.blue-line {
    position: absolute;
    fill: none;                /* 無填充 */
    stroke: var(--blue-line);  /* 線條顏色 */
    stroke-width: 1.5;         /* 線條寬度 */
    opacity: 0.8;
    filter: blur(1px);
    will-change: opacity;
}

/* 終端機介面 */
.terminal-panel {
    z-index: 10;
    position: absolute;
    padding: 0;

    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80%;
    max-width: 1000px;
    height: 80%;
    max-height: 700px;
    
    overflow: hidden;
    background: rgba(255, 255, 255, 0.03);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(16px);
    border: 0.5rem solid rgba(255, 255, 255, 0.2);
    border-radius: 2rem;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5), 0 0 15px rgba(0, 255, 255, 0.1);
}

/* 頂部工具列 */
.terminal-panel .title-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
    
    height: 2.5rem;
    font-size: 0.8rem;
    letter-spacing: 2px;
    background: rgba(0, 0, 0, 0.3);
}

/* 視窗按鈕容器 */
.title-bar .control-container {
    display: flex;
    gap: 0.7rem;
}

/* 視窗按鈕 */
.control-container > span {
    width: 1rem;
    height: 1rem;
    border-radius: 50%;
    cursor: pointer;
    border: 1px solid;
}

/* 各按鈕顏色 */
.control-container .min-button {background: rgba(60, 255, 0, 0.3); border-color: rgba(60, 255, 0, 0.5);}
.control-container .max-button {background: rgba(0, 220, 255, 0.3); border-color: rgba(0, 220, 255, 0.5);}
.control-container .close-button {background: rgba(255, 0, 255, 0.3); border-color: rgba(255, 0, 255, 0.5);}