:root {
    --bg-color: #050507;
    --accent-cyan: #00f2ff;
    --accent-blue: #0077ff;
    --warning-red: #ff2d55;
    --text-color: #e0e0e0;
    --panel-bg: rgba(0, 242, 255, 0.03);
    --glass-bg: rgba(10, 10, 15, 0.9);
}

/* 基礎設定 */
* { 
    box-sizing: border-box; 
    cursor: crosshair; /* 準心游標 */
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: 'Segoe UI', 'Orbitron', 'Microsoft JhengHei', sans-serif;
    margin: 0;
    line-height: 1.6;
    overflow-x: hidden;
}

/* 華麗動態網格背景 (電腦版) */
body::before {
    content: "";
    position: fixed;
    top: -50%; left: -50%; width: 200%; height: 200%;
    background-image: 
        linear-gradient(var(--panel-bg) 1px, transparent 1px),
        linear-gradient(90deg, var(--panel-bg) 1px, transparent 1px);
    background-size: 50px 50px;
    z-index: -1;
    transform: perspective(500px) rotateX(60deg);
    animation: grid-move 20s linear infinite;
}

@keyframes grid-move {
    0% { transform: perspective(500px) rotateX(60deg) translateY(0); }
    100% { transform: perspective(500px) rotateX(60deg) translateY(50px); }
}

/* 導覽列：霓虹光暈 */
nav {
    background: rgba(5, 5, 7, 0.95);
    backdrop-filter: blur(15px);
    border-bottom: 2px solid var(--accent-cyan);
    box-shadow: 0 0 20px rgba(0, 242, 255, 0.2);
    padding: 0.8rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.logo-img {
    height: 50px;
    filter: drop-shadow(0 0 8px var(--accent-cyan));
    transition: 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.nav-links { list-style: none; display: flex; gap: 25px; align-items: center; margin: 0; }
.nav-links a { 
    color: var(--accent-cyan); 
    text-decoration: none; 
    font-size: 1rem; 
    letter-spacing: 2px;
    transition: 0.3s;
    opacity: 0.8;
}

.nav-links a:hover { 
    opacity: 1;
    text-shadow: 0 0 10px var(--accent-cyan);
}

/* 按鈕：電子發光感 */
.btn-book { 
    background: transparent;
    border: 1px solid var(--warning-red);
    color: var(--warning-red) !important; 
    padding: 8px 25px; 
    border-radius: 2px;
    font-weight: bold;
    transition: 0.4s;
    text-align: center;
}

.btn-book:hover {
    background: var(--warning-red);
    color: white !important;
    box-shadow: 0 0 25px var(--warning-red);
}

/* 容器與終端機卡片 */
.container { max-width: 1100px; margin: 40px auto; padding: 0 20px; }

.miso-card {
    background: var(--glass-bg);
    border: 1px solid rgba(0, 242, 255, 0.3);
    padding: 30px;
    margin-bottom: 40px;
    position: relative;
    clip-path: polygon(0 0, 96% 0, 100% 4%, 100% 100%, 4% 100%, 0 96%);
    transition: 0.4s;
}

/* 卡片四角裝飾線 */
.miso-card::before {
    content: ""; position: absolute; top: 0; left: 0; width: 15px; height: 15px;
    border-top: 3px solid var(--accent-cyan); border-left: 3px solid var(--accent-cyan);
}
.miso-card::after {
    content: ""; position: absolute; bottom: 0; right: 0; width: 15px; height: 15px;
    border-bottom: 3px solid var(--accent-cyan); border-right: 3px solid var(--accent-cyan);
}

.miso-card:hover {
    border-color: var(--accent-cyan);
    box-shadow: 0 0 20px rgba(0, 242, 255, 0.2);
    transform: translateX(5px);
}

/* 掃描線 */
.scanline {
    width: 100%; height: 60px; 
    background: linear-gradient(to bottom, transparent, rgba(0, 242, 255, 0.08), transparent);
    position: absolute; top: -60px; left: 0;
    pointer-events: none;
    animation: scan-v2 5s infinite ease-in-out;
}
@keyframes scan-v2 { 0% { top: -60px; } 100% { top: 100%; } }

/* 標題特效 */
h1, h2, h3 {
    letter-spacing: 3px;
    background: linear-gradient(to right, #fff, var(--accent-cyan));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* --- 手機版 RWD 加強適配 --- */
@media (max-width: 768px) {
    /* 背景改為靜態以節省手機效能 */
    body::before { animation: none; transform: none; background-size: 40px 40px; opacity: 0.5; }

    nav {
        padding: 1.2rem 1rem;
        flex-direction: column;
        gap: 15px;
    }

    .logo-img { height: 42px; }

    .nav-links {
        gap: 10px;
        flex-wrap: wrap;
        justify-content: center;
        width: 100%;
    }

    .nav-links a {
        font-size: 1.15rem; /* 放大導覽列文字 */
        padding: 10px 8px;
        font-weight: 500;
    }

    .container { margin: 20px auto; padding: 0 15px; }

    h1 { font-size: 2rem; }
    h2 { font-size: 1.8rem; }
    h3 { font-size: 1.6rem; }

    .miso-card {
        padding: 25px 20px;
        clip-path: none; /* 手機版取消切角，閱讀更順手 */
        border-width: 2px; /* 增加邊框感 */
    }

    .miso-card p {
        font-size: 1.2rem; /* 調查員手冊大字體 */
        line-height: 1.8;
        margin-bottom: 20px;
        color: #fff; /* 手機版文字加亮 */
    }

    /* 任務解碼按鈕與預約按鈕：全寬度滿版 */
    .btn-book, .miso-card a[href*="mission"], .miso-card a[href*="http"] {
        display: block;
        width: 100%;
        text-align: center;
        font-size: 1.2rem;
        padding: 16px;
        margin-top: 10px;
        background: rgba(0, 242, 255, 0.1);
        border: 1px solid var(--accent-cyan);
        -webkit-text-fill-color: var(--accent-cyan); /* 修正標題漸層影響 */
    }
    
    .btn-book {
        border-color: var(--warning-red);
        -webkit-text-fill-color: var(--warning-red);
    }
}

/* 極窄螢幕優化 */
@media (max-width: 380px) {
    .nav-links a { font-size: 1rem; }
    h1 { font-size: 1.7rem; }
}