:root {
    --bg-color: #0a0a12;
    --grid-color: rgba(0, 255, 255, 0.1);
    --primary: #0ff;
    --secondary: #f0f;
    --text-color: #fff;
    --card-bg: rgba(20, 20, 30, 0.9);
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Courier New', Courier, monospace; /* 復古電腦字體 */
    background-color: var(--bg-color);
    color: var(--text-color);
    overflow: hidden;
    height: 100vh;
}

.grid-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(var(--grid-color) 1px, transparent 1px),
        linear-gradient(90deg, var(--grid-color) 1px, transparent 1px);
    background-size: 40px 40px;
    z-index: -2;
    transform: perspective(500px) rotateX(20deg) scale(1.5);
    transform-origin: top center;
    animation: gridMove 20s linear infinite;
}

@keyframes gridMove {
    0% { background-position: 0 0; }
    100% { background-position: 0 400px; }
}

.scanline {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(255,255,255,0), rgba(255,255,255,0) 50%, rgba(0,0,0,0.2) 50%, rgba(0,0,0,0.2));
    background-size: 100% 4px;
    z-index: -1;
    pointer-events: none;
}

.hidden { display: none !important; }

.ui-btn {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-family: inherit;
    font-weight: bold;
    transition: 0.3s;
}

.ui-btn:hover {
    background: var(--primary);
    color: #000;
    box-shadow: 0 0 15px var(--primary);
}

#phone-modal {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 200;
}

.phone-case {
    width: 300px;
    height: 600px;
    background: #333;
    border-radius: 30px;
    border: 5px solid #111;
    padding: 10px;
    box-shadow: 0 0 20px rgba(0,0,0,0.5);
    position: relative;
}

.phone-screen {
    width: 100%;
    height: 100%;
    background: #fff;
    border-radius: 20px;
    color: #333;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.phone-header {
    height: 25px;
    background: #eee;
    display: flex;
    justify-content: space-between;
    padding: 0 15px;
    align-items: center;
    font-size: 12px;
}

#phone-content {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
    background: #fafafa;
}

.phone-nav {
    height: 50px;
    border-top: 1px solid #ddd;
    display: flex;
    justify-content: space-around;
    align-items: center;
    background: #fff;
}

.phone-nav button {
    border: none;
    background: none;
    font-size: 20px;
    cursor: pointer;
}

#close-phone {
    position: absolute;
    top: -15px;
    right: -15px;
    width: 30px; height: 30px;
    background: red;
    color: white;
    border-radius: 50%;
    border: none;
    cursor: pointer;
}

.story-circles { display: flex; gap: 10px; margin-bottom: 20px; }
.story-circle { width: 50px; height: 50px; border-radius: 50%; background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888); padding: 2px; }
.story-inner { width: 100%; height: 100%; background: #ddd; border-radius: 50%; border: 2px solid #fff; }
.ig-post { background: #ddd; height: 200px; margin-bottom: 10px; }

#app {
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.character-container {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 30px;
}

.arrow-btn {
    background: none;
    border: none;
    color: var(--primary);
    font-size: 3rem;
    cursor: pointer;
    transition: 0.2s;
}
.arrow-btn:hover { transform: scale(1.2); text-shadow: 0 0 10px var(--primary); }

.character-card {
    width: 300px;
    min-height: 350px;
    text-align: center;
    background: var(--card-bg);
    border: 2px solid var(--primary);
    padding: 30px 20px;
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.2);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.char-info {
    margin-top: 15px;
}

.char-visual {
    width: 200px;
    height: 200px;
    background: #333;
    margin: 0 auto 20px;
    border-radius: 50%;
    border: 3px solid var(--primary);
    overflow: hidden;
}

.game-start-wrapper {
    position: absolute;
    bottom: 30px;
    right: 30px;
    z-index: 50;
}

.corner-btn {
    background: rgba(0, 0, 0, 0.6);
    border: 2px solid #ff0055; 
    color: #ff0055;
    padding: 10px 20px;
    font-family: inherit;
    font-weight: bold;
    font-size: 2rem;
    cursor: pointer;
    clip-path: polygon(10% 0, 100% 0, 100% 80%, 90% 100%, 0 100%, 0 20%);
    transition: 0.3s;
    letter-spacing: 2px;
}

.corner-btn:hover {
    background: #ff0055;
    color: white;
    box-shadow: 0 0 15px #ff0055;
    transform: scale(1.1);
}

#go-detail.neon-btn {
    margin-top: 20px;
    font-size: 1.2rem;
    padding: 15px 50px;
    animation: pulseBtn 2s infinite;
}

@keyframes pulseBtn {
    0% { box-shadow: 0 0 10px var(--primary); }
    50% { box-shadow: 0 0 25px var(--primary); }
    100% { box-shadow: 0 0 10px var(--primary); }
}

.nav-right {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 15px;
    cursor: pointer;
}

.tri-arrow-btn {
    width: 0; 
    height: 0; 
    border-top: 10px solid transparent;
    border-bottom: 10px solid transparent;
    border-left: 15px solid #fff;
    background: none;
    padding: 0;
    cursor: pointer;
    border-right: none;
    animation: bounceRight 1s infinite;
}

@keyframes bounceRight {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(5px); }
}

.neon-btn {
    display: block;
    margin: 0 auto;
    font-size: 1.5rem;
    padding: 15px 40px;
    background: transparent;
    border: 2px solid var(--text-color);
    color: var(--text-color);
    text-transform: uppercase;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 0 10px var(--text-color);
    transition: 0.3s;
}
.neon-btn:hover {
    background: #4d4d4d;
    color: white;
}

#detail-screen {
    width: 80%;
    max-width: 800px;
    height: 80vh;
    background: rgba(0,0,0,0.8);
    border: 1px solid var(--text-color);
    padding: 20px;
    position: relative;
    overflow-y: auto;
}

.back-btn { font-size: 1.2rem; display: block; margin-bottom: 20px; }

.level-map {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 40px 0;
}
.level-node {
    width: 60px; height: 60px;
    border-radius: 50%;
    background: #333;
    border: 3px solid var(--primary);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    font-size: 0.8rem;
    transition: 0.3s;
}
.level-node:hover { background: var(--primary); color: #000; }
.level-node i { font-size: 1.2rem; margin-bottom: 5px; }
.connector { width: 50px; height: 4px; background: var(--text-color); }

.info-card {
    border: 2px dashed var(--text-color);
    padding: 20px;
    background: #222;
}

.timeline-container {
    position: relative;
    height: 100px;
    margin-bottom: 20px;
}
.timeline-bar {
    position: absolute;
    top: 50%; left: 0; width: 100%; height: 4px;
    background: var(--primary);
}
.timeline-point {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 30px; height: 30px;
    background: #000;
    border: 2px solid var(--primary);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 10px;
    cursor: pointer;
}
.timeline-point:nth-child(2) { left: 20%; }
.timeline-point:nth-child(3) { left: 50%; }
.timeline-point:nth-child(4) { left: 80%; }
.timeline-point:hover, .timeline-point.active {
    background: var(--primary);
    color: #000;
    box-shadow: 0 0 10px var(--primary);
}

.sci-fi-card {
    border: 1px solid var(--primary);
    background: rgba(0, 50, 50, 0.5);
    padding: 0;
}
.card-header { background: var(--primary); color: #000; padding: 5px 10px; font-weight: bold; }
.card-body { padding: 20px; }
.card-footer { border-top: 1px solid var(--primary); padding: 5px 10px; font-size: 0.8rem; text-align: right; }

.glitch {
    font-size: 3rem;
    position: relative;
    color: white;
    text-shadow: 2px 0 red, -2px 0 blue;
}

#game-stats-panel {
    text-align: center;
    width: 400px;
    background: #111;
    border: 2px solid var(--secondary);
    padding: 20px;
}

.stat-row {
    display: flex;
    justify-content: space-between;
    margin: 10px 0;
}

.progress-bar {
    width: 60%;
    height: 20px;
    background: #333;
    border: 1px solid #555;
}

.progress-bar div {
    height: 100%;
    background: linear-gradient(90deg, var(--secondary), #fff);
    transition: width 0.5s;
}

.game-grid {
    display: grid;
    grid-template-columns: repeat(2, 100px);
    gap: 10px;
    margin: 20px auto;
}
.game-tile {
    width: 100px; height: 100px;
    background: #444;
    cursor: pointer;
    border: 2px solid #fff;
}
.game-tile.flash {
    background: #fff;
    box-shadow: 0 0 20px #fff;
}

#intro-screen {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    background: linear-gradient(-45deg, #0f0a00, #3aa6ae, #0b484a, #000000);
    background-size: 200% 200%;
    animation: gradientBG 15s ease infinite;
    z-index: 10;
    cursor: pointer;
    text-align: center;
    position: absolute; 
    top: 0; left: 0;
}

@keyframes gradientBG {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.fade-out-anim {
    animation: fadeOutEffect 1.s forwards;
    pointer-events: none;
}

.fade-in-anim {
    animation: fadeInEffect 1.0s forwards;
    opacity: 0;
}

@keyframes fadeOutEffect {
    0% { opacity: 1; transform: scale(1); filter: blur(0px); }
    100% { opacity: 0; transform: scale(1.1); filter: blur(10px); }
}

@keyframes fadeInEffect {
    0% { opacity: 0; transform: translateY(20px); }
    100% { opacity: 1; transform: translateY(0); }
}

.intro-content {
    max-width: 800px;
    padding: 20px;
}

.typewriter-text {
    font-size: 1.5rem;
    color: var(--primary);
    overflow: hidden;
    white-space: nowrap;
    border-right: 3px solid var(--primary);
    width: 0;
    animation: 
        typing 2s steps(30, end) forwards, 
        blink-caret 0.3s step-end infinite;
}

.fade-in-text {
    font-size: 1.2rem;
    color: #fff;
    margin-top: 15px;
    opacity: 0;
    animation: fadeIn 1.5s ease-in forwards;
    animation-delay: 1.8s;
}

.press-start-blink {
    margin-top: 50px;
    font-size: 1rem;
    color: rgb(255, 243, 75);
    animation: blinkText 1s infinite;
    opacity: 0;
    animation: blinkText 1s infinite, fadeIn 1s forwards;
    animation-delay: 3s;
}

@keyframes typing {
    from { width: 0 }
    to { width: 100% }
}

@keyframes blink-caret {
    from, to { border-color: transparent }
    50% { border-color: var(--primary) }
}

@keyframes fadeIn {
    to { opacity: 1; }
}

@keyframes blinkText {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

.bg-text-animation {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 50px;
    opacity: 0.1;
    pointer-events: none;
    overflow: hidden;
}

.scroll-row {
    display: flex;
    white-space: nowrap;
    font-size: 4rem;
    font-weight: bold;
    color: var(--text-color);
    text-shadow: 0 0 10px var(--primary);
}

.row-left {
    animation: scrollLeft 20s linear infinite;
}

.row-right {
    animation: scrollRight 20s linear infinite;
}

.scroll-row span {
    padding-right: 50px;
}

@keyframes scrollLeft {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

@keyframes scrollRight {
    0% { transform: translateX(-50%); }
    100% { transform: translateX(0); }
}

.sidebar {
    position: fixed;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
    background: rgba(10, 10, 20, 0.95);
    border: 1px solid var(--primary);
    border-left: none;
    border-radius: 0 15px 15px 0;
    z-index: 150;
    transition: width 0.4s ease, box-shadow 0.4s;
    overflow: hidden;
    box-shadow: 0 0 10px rgba(0, 255, 255, 0.2);
    display: flex;
    flex-direction: column;
}

.sidebar.collapsed {
    width: 60px;
}

.sidebar.expanded {
    width: 200px;
    box-shadow: 0 0 20px var(--primary);
}

.nav-menu {
    display: flex;
    flex-direction: column;
    padding: 10px 0;
}

.sidebar-btn {
    background: none;
    border: none;
    color: var(--text-color);
    padding: 15px 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    transition: 0.3s;
    width: 200px;
    position: relative;
}

.sidebar-btn:hover {
    background: var(--primary);
    color: #000;
}

.sidebar-btn i {
    width: 60px;
    text-align: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.link-text {
    font-family: inherit;
    font-weight: bold;
    white-space: nowrap;
    opacity: 1;
    transition: opacity 0.3s;
}

.sidebar.collapsed .link-text {
    opacity: 0;
    pointer-events: none;
}

.toggle-btn {
    border-bottom: 1px solid rgba(255,255,255,0.2);
    margin-bottom: 5px;
    color: var(--primary);
}

#intro-screen:not(.hidden) ~ .sidebar { 
    display: none; 
}

#char-img-placeholder {
    width: 100%; height: 100%;
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    background-color: #333;
    transition: background-image 0.3s ease-in-out;
}

#view-student {
    display: flex;
    flex-direction: column;
    gap: 30px;
    height: 100%;
}

.id-card-container {
    display: flex;
    justify-content: center;
    perspective: 1000px;
}

.student-id-card {
    width: 450px;
    height: 250px;
    background: linear-gradient(135deg, #e0e0e0, #f5f5f5);
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    position: relative;
    overflow: hidden;
    font-family: Arial, sans-serif;
    color: #333;
    border: 1px solid #999;
    transform: rotateX(5deg);
    transition: transform 0.3s;
}

.student-id-card:hover {
    transform: rotateX(0deg) scale(1.02);
}

.card-header-band {
    background: #8d072b;
    height: 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 15px;
    color: white;
}

.uni-name {
    font-weight: bold;
    font-size: 0.8rem;
    letter-spacing: 1px;
}

.card-chip {
    font-size: 1.2rem;
    color: gold;
}

/* 卡片內容佈局 */
.card-body-flex {
    display: flex;
    padding: 20px;
    gap: 20px;
}

/* 照片區 */
.id-photo-frame {
    width: 130px;
    height: 150px;
    border: 2px solid #ddd;
    background: #ccc;
    flex-shrink: 0;
}

.actual-photo {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    filter: grayscale(20%); /* 稍微灰階更有證件感 */
}

.id-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-around;
}

.detail-row label {
    display: block;
    font-size: 0.6rem;
    color: #666;
    margin-bottom: 2px;
    margin-top: 4px;
}

.detail-row span {
    display: block;
    font-weight: bold;
    font-size: 0.9rem;
    border-bottom: 1px solid #ddd;
}

.status-active {
    color: green;
    border: none !important;
}

.digital-stamp {
    position: absolute;
    bottom: 20px;
    right: 20px;
    border: 3px double red;
    color: red;
    padding: 5px 10px;
    font-weight: bold;
    font-size: 1rem;
    transform: rotate(-15deg);
    opacity: 0.6;
    pointer-events: none;
}

.academic-record {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    color: #fff;
}

.record-column {
    flex: 1;
    min-width: 300px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 20px;
    border-radius: 10px;
}

.record-title {
    border-bottom: 2px solid var(--primary);
    padding-bottom: 10px;
    margin-top: 0;
    font-size: 1.1rem;
    color: var(--primary);
}

.stats-grid {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    margin-bottom: 20px;
}

.stat-box {
    background: rgba(0, 0, 0, 0.3);
    padding: 15px;
    border-radius: 8px;
    flex: 1;
    text-align: center;
    border: 1px solid #444;
}

.stat-label {
    font-size: 0.8rem;
    color: #aaa;
    margin-bottom: 5px;
    text-transform: uppercase;
}

.stat-value {
    font-size: 1.8rem;
    font-weight: bold;
    color: #fff;
    font-family: 'Courier New', Courier, monospace;
}

.stat-max {
    font-size: 1rem;
    color: #666;
}

.stat-desc {
    font-size: 0.8rem;
    color: var(--primary);
    margin-top: 5px;
}

.stat-bar {
    width: 100%;
    height: 4px;
    background: #333;
    margin-top: 10px;
    border-radius: 2px;
}
.stat-bar div {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), #fff);
    border-radius: 2px;
}

.legendary-achievement {
    display: flex;
    align-items: center;
    gap: 15px;
    background: linear-gradient(90deg, rgba(255, 215, 0, 0.1), transparent);
    border: 1px solid rgba(255, 215, 0, 0.5); /* 金色邊框 */
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    position: relative;
    overflow: hidden;
}

.legendary-achievement::before {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 215, 0, 0.2), transparent);
    animation: shine 3s infinite;
}

@keyframes shine {
    0% { left: -100%; }
    20% { left: 100%; }
    100% { left: 100%; }
}

.icon-box {
    font-size: 2rem;
    color: #ffd700; /* 金色 */
    text-shadow: 0 0 10px #ffd700;
}

.achieve-text {
    display: flex;
    flex-direction: column;
}

.achieve-text strong {
    color: #ffd700;
    font-size: 1.1rem;
    letter-spacing: 1px;
}

.achieve-text span {
    font-size: 0.85rem;
    color: #ddd;
}

.sub-stats {
    display: flex;
    gap: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 15px;
}

.sub-stat-item {
    font-size: 0.9rem;
    color: #ccc;
    display: flex;
    align-items: center;
    gap: 8px;
}

.highlight-text {
    color: #fff;
    font-weight: bold;
}


.quest-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
    max-height: 280px;
    overflow-y: auto;
    padding-right: 10px;
}

.quest-list::-webkit-scrollbar {
    width: 8px;
}

.quest-list::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 4px;
}

.quest-list::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 4px;
    border: 2px solid #222; 
}

.quest-list::-webkit-scrollbar-thumb:hover {
    background: #fff;
    box-shadow: 0 0 10px var(--primary);
}

.quest-item {
    display: flex;
    align-items: center;
    gap: 15px;
    background: rgba(0,0,0,0.3);
    padding: 10px;
    border-radius: 8px;
    transition: 0.2s;
    border-left: 3px solid transparent;
}

.quest-item:hover {
    background: rgba(255,255,255,0.1);
    border-left-color: var(--secondary);
}

.quest-icon {
    width: 40px;
    height: 40px;
    background: #333;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--primary);
}

.quest-info{
    width: 100%;
}

.quest-info h4 {
    margin: 0;
    font-size: 0.95rem;
    color: #fff;
}

.quest-info p {
    margin: 3px 0 0 0;
    font-size: 0.8rem;
    color: #aaa;
}

.stat-box.clickable {
    cursor: pointer;
    transition: 0.3s;
    position: relative;
}

.stat-box.clickable:hover {
    background: rgba(0, 255, 255, 0.1);
    border-color: var(--primary);
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.2);
    transform: translateY(-5px);
}

.stat-box.clickable:hover .stat-label {
    color: var(--primary);
}

/* --- 歷年成績彈出視窗 (Modal) --- */
#history-modal {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(5px); /* 背景模糊 */
    z-index: 300; /* 要比 Sidebar 高 */
    display: flex;
    justify-content: center;
    align-items: center;
}

.history-panel {
    width: 300px;
    background: #1a1a2e;
    border: 2px solid var(--primary);
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 0 30px rgba(0, 255, 255, 0.3);
    text-align: center;
    animation: popIn 0.3s ease-out;
}

@keyframes popIn {
    0% { transform: scale(0.8); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

#history-title {
    color: var(--primary);
    border-bottom: 1px solid #444;
    padding-bottom: 10px;
    margin-top: 0;
}

.history-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px dashed #444;
    font-size: 0.9rem;
    color: #fff;
}

.history-row:last-child {
    border-bottom: none;
}

.sem-name { color: #aaa; }
.sem-value { font-weight: bold; font-family: 'Courier New', monospace; }

.project-section {
    margin-top: 30px;
    padding-bottom: 20px;
}

.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.project-card {
    background: rgba(20, 30, 40, 0.8);
    border: 1px solid #444;
    border-radius: 8px;
    padding: 20px;
    position: relative;
    transition: all 0.3s ease;
    overflow: hidden;
    border-bottom: 3px solid var(--primary);
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 255, 255, 0.2);
    border-color: var(--primary);
    background: rgba(20, 30, 40, 0.95);
}

.p-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.p-date {
    font-size: 0.75rem;
    color: #888;
    font-family: 'Courier New', monospace;
    letter-spacing: 1px;
}

.p-status {
    width: 8px;
    height: 8px;
    background-color: #0f0;
    border-radius: 50%;
    box-shadow: 0 0 5px #0f0;
}

.project-card h4 {
    margin: 5px 0 10px 0;
    color: #fff;
    font-size: 1.1rem;
    line-height: 1.4;
}

.tech-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.tech-stack span {
    font-size: 0.7rem;
    background: rgba(0, 255, 255, 0.1);
    color: var(--primary);
    padding: 3px 8px;
    border-radius: 4px;
    border: 1px solid rgba(0, 255, 255, 0.3);
}

.project-card p {
    font-size: 0.85rem;
    color: #ccc;
    line-height: 1.5;
    margin: 0;
}

.project-card::before {
    content: '';
    position: absolute;
    top: 0; right: 0;
    width: 0; height: 0;
    border-top: 20px solid var(--primary);
    border-left: 20px solid transparent;
    opacity: 0.5;
}

#view-worker {
    display: flex;
    flex-direction: column;
    gap: 20px;
    height: 100%;
}

/* 1. 時間軸樣式 */
.timeline-wrapper {
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 40px;
    margin-bottom: 10px;
}

.timeline-line {
    position: absolute;
    top: 50%; left: 40px; right: 40px;
    height: 2px;
    background: #444;
    z-index: 0;
}

.timeline-node {
    position: relative;
    z-index: 1;
    cursor: pointer;
    text-align: center;
    transition: 0.3s;
}

.t-dot {
    width: 16px; height: 16px;
    background: #222;
    border: 2px solid #666;
    border-radius: 50%;
    margin: 0 auto 5px;
    transition: 0.3s;
}

.t-date {
    font-size: 0.8rem;
    color: #888;
    font-family: 'Courier New', monospace;
}

/* 激活狀態 (Active) */
.timeline-node.active .t-dot {
    background: var(--secondary); /* 使用粉紫色系 highlight */
    border-color: #fff;
    box-shadow: 0 0 15px var(--secondary);
    transform: scale(1.3);
}

.timeline-node.active .t-date {
    color: #fff;
    text-shadow: 0 0 5px var(--secondary);
}

.timeline-node:hover .t-dot {
    border-color: var(--secondary);
}

/* 2. 終端機顯示卡樣式 */
.job-terminal-container {
    flex: 1;
    background: rgba(10, 15, 20, 0.9);
    border: 1px solid var(--secondary);
    border-radius: 5px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 0 20px rgba(255, 0, 255, 0.1);
}

.terminal-header {
    background: rgba(255, 0, 255, 0.1);
    padding: 8px 15px;
    font-size: 0.8rem;
    color: var(--secondary);
    border-bottom: 1px solid var(--secondary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.blink-dot {
    width: 8px; height: 8px;
    background: var(--secondary);
    border-radius: 50%;
    animation: blink 1s infinite;
}

.terminal-body {
    padding: 20px;
    color: #ddd;
    font-family: 'Courier New', monospace; /* 強制等寬字體更有終端機感 */
    overflow-y: auto;
    line-height: 1.6;
}

/* 終端機內容排版 */
.job-title { color: #fff; font-size: 1.4rem; margin-bottom: 5px; border-bottom: 1px dashed #555; padding-bottom: 10px; }
.job-time { color: var(--secondary); font-size: 1rem; margin-bottom: 5px; display: block;}
.job-company { color: var(--secondary); font-size: 1rem; margin-bottom: 20px; display: block;}
.job-desc-list { padding-left: 20px; margin: 0; }
.job-desc-list li { margin-bottom: 10px; list-style-type: square; }
.job-tags { margin-top: 20px; display: flex; gap: 10px; flex-wrap: wrap;}
.j-tag { background: #333; color: #fff; padding: 2px 8px; font-size: 0.75rem; border-radius: 3px; }

/* 3. 快速列表按鈕 */
.job-quick-list {
    display: flex;
    justify-content: center;
    gap: 10px;
}

.job-btn {
    background: transparent;
    border: 1px solid #555;
    color: #888;
    padding: 8px 15px;
    cursor: pointer;
    transition: 0.3s;
    font-size: 0.9rem;
}

.job-btn:hover { border-color: var(--secondary); color: #fff; }

.job-btn.active {
    background: var(--secondary);
    color: #fff;
    border-color: var(--secondary);
    box-shadow: 0 0 10px var(--secondary);
}

.job-layout-grid {
    display: flex;
    gap: 30px;
    height: 100%;
}

.job-info-col {
    flex: 1; 
    min-width: 300px;
    display: flex;
    flex-direction: column;
}

.job-visual-col {
    flex: 0 0 40%;
    max-width: 400px;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding-top: 10px;
}

@media (max-width: 768px) {
    .job-layout-grid {
        flex-direction: column-reverse;
    }
    .job-visual-col {
        width: 100%;
        height: 200px;
    }
}

.visual-frame {
    width: 100%;
    height: 250px;
    border: 2px solid #333;
    position: relative;
    background: #000;
    padding: 5px;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.5);
}

.visual-img {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    filter: sepia(20%) contrast(1.1);
    opacity: 0.9;
}

.corner-decor {
    position: absolute;
    width: 15px; height: 15px;
    border: 2px solid var(--secondary);
    z-index: 3;
}

.corner-decor.top-left {
    top: -2px; left: -2px;
    border-right: none; border-bottom: none;
}

.corner-decor.bottom-right {
    bottom: -2px; right: -2px;
    border-left: none; border-top: none;
}

.img-status {
    position: absolute;
    bottom: 5px; right: 10px;
    font-size: 0.7rem;
    color: var(--secondary);
    background: rgba(0,0,0,0.7);
    padding: 2px 5px;
    z-index: 3;
    letter-spacing: 1px;
}

#view-club {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.club-interface {
    display: flex;
    flex-direction: column;
    gap: 15px;
    flex: 1;
    overflow: hidden;
}

.club-sidebar {
    width: 100%;
    display: flex;
    flex-direction: row;
    gap: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 10px;
    border-right: none;
}

.club-tab {
    flex: 1;
    padding: 12px;
    background: rgba(0,0,0,0.3);
    border: 1px solid #444;
    color: #888;
    cursor: pointer;
    border-radius: 8px 8px 0 0; 
    transition: 0.3s;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    font-size: 1rem;
}

.club-tab:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    transform: translateY(-2px);
}

.club-tab.active {
    background: var(--primary);
    color: #000;
    font-weight: bold;
    box-shadow: 0 -5px 15px rgba(0, 255, 255, 0.2); 
    border-color: var(--primary);
    border-bottom: 3px solid #000;
}

.club-tab i {
    font-size: 1.2rem;
}

.club-main-area {
    display: flex;
    flex: 1;
    gap: 20px;
    overflow: hidden;
}

.quest-selector {
    width: 250px;
    display: flex;
    flex-direction: column;
    background: rgba(20, 20, 30, 0.5);
    border-radius: 8px;
    padding: 10px;
    border: 1px solid #333;
    flex-shrink: 0; 
}

#selected-club-title {
    color: var(--primary);
    border-bottom: 2px dashed #444;
    padding-bottom: 10px;
    margin-top: 5px;
    font-size: 1rem;
    text-align: center;
}

#quest-list-container {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.quest-btn {
    padding: 12px;
    background: #222;
    border-left: 3px solid #555;
    color: #aaa;
    cursor: pointer;
    transition: 0.2s;
    font-size: 0.9rem;
    line-height: 1.4;
    text-align: left;
}

.quest-btn:hover {
    background: #333;
    color: #fff;
}

.quest-btn.active {
    background: #333;
    border-left-color: var(--secondary);
    color: #fff;
    text-shadow: 0 0 5px var(--secondary);
}

.mission-scroll-container {
    flex: 1;
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid var(--text-color);
    border-radius: 8px;
    padding: 30px;
    overflow-y: auto;
    position: relative;
    box-shadow: inset 0 0 20px rgba(0,0,0,0.8);
}

.mission-title {
    color: #fff;
    margin-top: 0;
    border-bottom: 1px solid #555;
    padding-bottom: 15px;
    margin-bottom: 20px;
    font-size: 1.5rem;
}

.mission-photo-frame {
    width: 100%;
    max-height: 350px;
    overflow: hidden;
    border-radius: 8px;
    margin-bottom: 25px;
    position: relative;
    border: 2px solid #fff;
    box-shadow: 0 10px 20px rgba(0,0,0,0.5);
}

.mission-photo-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    object-position: center;
}

.mission-desc p {
    line-height: 1.8;
    color: #ddd;
    font-size: 1.1rem;
    white-space: pre-wrap;
    text-align: justify; 
}

@media (max-width: 768px) {
    .club-interface {
        overflow-y: auto;
    }
    
    .club-sidebar {
        overflow-x: auto;
        padding-bottom: 5px;
    }
    
    .club-tab {
        min-width: 120px;
        font-size: 0.9rem;
    }

    .club-main-area {
        flex-direction: column;
    }

    .quest-selector {
        width: 100%;
        max-height: 200px;
    }
    
    .mission-scroll-container {
        min-height: 400px;
    }
}

#view-tina {
    display: flex;
    flex-direction: column; 
    justify-content: center;
    align-items: center; 
    
    height: 100%;      
    text-align: center;  
    gap: 20px;      
}

#view-tina img {
    border-radius: 15px; 
    border: 3px solid #00ff00; 
    box-shadow: 0 0 30px rgba(0, 255, 0, 0.3);
    max-width: 100%;       
    object-fit: cover;
}

#view-tina p {
    font-size: 1.2rem;
    color: #ddd;
    max-width: 600px;
    line-height: 1.6;
}

.app-screen {
    padding: 10px;
    color: #333;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* 1. 聯絡人 (Contact) */
.contact-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 20px;
}

.contact-avatar {
    width: 120px; height: 120px;
    border-radius: 50%;
    background-size: cover;
    background-position: center;
    margin-bottom: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.contact-actions {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 25px;
}

.c-btn {
    text-decoration: none;
    background: #007aff;
    color: #fff;
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 5px;
}

.contact-list .c-item {
    background: #fff;
    padding: 10px 15px;
    border-bottom: 1px solid #eee;
    display: flex;
    flex-direction: column;
}

.c-item label { font-size: 0.75rem; color: #007aff; }
.c-item span { font-size: 1rem; font-weight: 500; }

/* 2. IG 風格 */
.story-tray {
    display: flex;
    gap: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
    overflow-x: auto;
    margin-bottom: 10px;
}

.story-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 60px;
}

.story-ring {
    width: 56px; height: 56px;
    border-radius: 50%;
    padding: 2px;
    background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
}

.story-img {
    width: 100%; height: 100%;
    border-radius: 50%;
    border: 2px solid #fff;
    background-size: cover;
    background-position: center;
}

.story-item span { font-size: 0.7rem; margin-top: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; width: 100%; text-align: center;}

.ig-post-card {
    background: #fff;
    margin-bottom: 20px;
}

.ig-header {
    display: flex;
    align-items: center;
    padding: 8px 0;
}

.ig-avatar {
    width: 30px; height: 30px;
    border-radius: 50%;
    background-size: cover;
    background-position: center;
    margin-right: 10px;
}

.ig-user { font-weight: bold; font-size: 0.9rem; flex: 1; }

.ig-image {
    width: 100%;
    height: 250px;
    background-size: cover;
    background-position: center;
    background-color: #eee;
}

.ig-actions {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    font-size: 1.2rem;
}

.ig-icons-left i { margin-right: 15px; cursor: pointer; }
.ig-caption { font-size: 0.9rem; }

/* 3. GitHub / GitLab 風格 */
.app-title { margin-top: 0; border-bottom: 1px solid #ccc; padding-bottom: 10px; }

.repo-card {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.repo-left {
    flex: 1;
    padding-right: 10px;
}

.repo-link {
    text-decoration: none;
    color: #0366d6; /* GitHub Blue */
    font-size: 1rem;
    display: block;
    margin-bottom: 5px;
}

.repo-link:hover { text-decoration: underline; }

.repo-left small {
    display: inline-block;
    background: #f1f8ff;
    color: #0366d6;
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 0.75rem;
    margin-bottom: 5px;
}

.repo-left p {
    margin: 5px 0 0 0;
    font-size: 0.85rem;
    color: #586069;
}

.repo-qr img {
    width: 70px;
    height: 70px;
    display: block;
    border: 1px solid #eee;
}

.sim-container {
    width: 100%;
    max-width: 500px;
    background: #111;
    border: 2px solid var(--primary);
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 0 30px rgba(0,0,0,0.8);
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.sim-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #333;
    padding-bottom: 10px;
}

.day-counter { font-size: 1.5rem; font-weight: bold; color: #fff; }
.role-badge { background: var(--primary); color: #000; padding: 2px 8px; border-radius: 4px; font-weight: bold; }

.sim-stat-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
    color: #fff;
}
.sim-stat-row i { width: 20px; text-align: center; }
.sim-bar-bg {
    flex: 1;
    height: 10px;
    background: #333;
    border-radius: 5px;
    overflow: hidden;
}
.sim-bar-fill { height: 100%; transition: width 0.3s; }
#val-wealth { width: 40px; text-align: right; font-family: monospace; }

.sim-log-window {
    height: 120px;
    background: #000;
    border: 1px solid #444;
    padding: 10px;
    overflow-y: auto;
    font-family: 'Courier New', monospace;
    font-size: 0.85rem;
    color: #ccc;
    border-left: 3px solid var(--primary);
}
.log-entry { margin-bottom: 5px; border-bottom: 1px dashed #222; padding-bottom: 2px; }
.log-day { color: var(--primary); font-weight: bold; }
.log-bad { color: #ff4d4d; }
.log-good { color: #2ecc71; }

.sim-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}
.action-btn {
    background: #222;
    border: 1px solid #444;
    color: #fff;
    padding: 15px 5px;
    border-radius: 8px;
    cursor: pointer;
    transition: 0.2s;
}
.action-btn:hover {
    background: #333;
    border-color: var(--primary);
}
.action-btn small {
    display: block;
    font-size: 0.7rem;
    color: #888;
    margin-top: 5px;
}

#sim-end-controls {
    text-align: center;
    border-top: 1px solid #333;
    padding-top: 20px;
}
#sim-result-title { color: var(--secondary); margin: 0 0 10px 0; }

#music-toggle {
    position: absolute;
    top: 20px;
    left: 20px; 
    z-index: 100;
    width: 40px;
    height: 40px;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
}

#tutorial-modal {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.85);
    z-index: 500; 
    display: flex;
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.5s;
}

.tutorial-box {
    width: 100%;
    max-width: 600px;
    background: rgba(10, 20, 30, 0.95);
    border: 2px solid var(--primary);
    box-shadow: 0 0 30px var(--primary);
    border-radius: 10px;
    overflow: hidden;
    transform: scale(0.9);
    animation: popIn 0.3s forwards;
}

.tutorial-header {
    background: var(--primary);
    color: #000;
    padding: 10px 15px;
    font-weight: bold;
    font-size: 1.1rem;
    letter-spacing: 1px;
}

.tutorial-content {
    padding: 20px;
    color: #fff;
}

.tutorial-content h3 {
    margin-top: 0;
    color: var(--secondary);
    border-bottom: 1px dashed #555;
    padding-bottom: 10px;
}

.tutorial-content ul {
    list-style: none;
    padding: 0;
}

.tutorial-content li {
    margin-bottom: 15px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    line-height: 1.5;
}

.tutorial-content li i {
    color: var(--primary);
    margin-top: 4px;
}

.small-btn {
    font-size: 1rem;
    padding: 10px 30px;
    margin: 0 auto 20px;
    width: fit-content;
}

.top-controls {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 100;
    display: flex;
    gap: 15px; /* 按鈕之間的距離 */
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-3px); }
}

/* --- 電子新聞介面 (News Modal) --- */
#news-modal {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.6); /* 較淡的背景，突顯懸浮感 */
    backdrop-filter: blur(5px);
    z-index: 400;
    display: flex;
    justify-content: center;
    align-items: center;
}

.news-interface {
    width: 600px;
    height: 500px;
    background: rgba(10, 15, 20, 0.95);
    border: 1px solid var(--primary);
    box-shadow: 0 0 40px rgba(0, 255, 255, 0.15);
    display: flex;
    flex-direction: column;
    position: relative;
    clip-path: polygon(
        0 0, 100% 0, 
        100% 90%, 95% 100%, 
        0 100%
    ); /* 右下切角造型 */
    animation: slideDown 0.4s ease-out;
}

@keyframes slideDown {
    from { transform: translateY(-50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* Header */
.news-header {
    background: var(--primary);
    color: #000;
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid #000;
}

.live-indicator {
    font-weight: bold;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    gap: 5px;
}

.blink-red { color: red; animation: blink 1s infinite; }

.news-header h2 { margin: 0; font-family: 'Impact', sans-serif; letter-spacing: 2px; }
.news-date { font-family: monospace; font-weight: bold; }

/* Content List */
.news-body {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    background: linear-gradient(0deg, rgba(0,255,255,0.05) 1px, transparent 1px);
    background-size: 100% 20px; /* 模擬舊報紙/掃描線條紋 */
}

.news-item {
    margin-bottom: 20px;
    border-bottom: 1px dashed #444;
    padding-bottom: 15px;
}

.news-item:last-child { border-bottom: none; }

.news-tag {
    background: var(--secondary);
    color: #fff;
    padding: 2px 6px;
    font-size: 0.7rem;
    margin-right: 8px;
    border-radius: 2px;
}

.news-time { color: var(--primary); font-size: 0.8rem; font-family: monospace; }
.news-title { color: #fff; font-size: 1.1rem; margin: 5px 0; font-weight: bold; }
.news-desc { color: #aaa; font-size: 0.9rem; line-height: 1.4; margin: 0; }

/* Ticker (跑馬燈) */
.news-ticker {
    background: #000;
    color: var(--primary);
    height: 30px;
    overflow: hidden;
    display: flex;
    align-items: center;
    border-top: 1px solid var(--primary);
}

.ticker-wrap {
    width: 100%;
    overflow: hidden;
    white-space: nowrap;
}

.ticker-item {
    display: inline-block;
    padding-left: 100%;
    animation: ticker 15s linear infinite;
    font-family: monospace;
    font-weight: bold;
}

@keyframes ticker {
    0% { transform: translate3d(0, 0, 0); }
    100% { transform: translate3d(-100%, 0, 0); }
}

#system-footer {
    position: fixed;
    bottom: 15px;
    left: 15px;
    z-index: 90; /* 確保不會被背景蓋住，但比側邊欄和 Modal 低 */
    font-family: 'Courier New', monospace;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.4); /* 半透明白色，不搶眼 */
    pointer-events: none; /* 讓滑鼠可以直接穿透點擊後面的東西 */
    letter-spacing: 1px;
}

#system-footer span {
    color: var(--primary);
    font-weight: bold;
}

/* 確保新聞介面的游標是預設的，但背景是可點擊的手指 */
#news-modal {
    cursor: pointer; /* 背景變成手指，提示可點擊關閉 */
}

.news-interface {
    cursor: default; /* 內容區域變回箭頭，避免誤會點內容也會關閉 */
}

.clickable-quest {
    cursor: pointer;
    position: relative;
    padding-right: 30px; /* 留空間給箭頭 */
}

.clickable-quest:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateX(5px);
}

.arrow-indicator {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #666;
    transition: 0.3s;
}

.clickable-quest:hover .arrow-indicator {
    color: var(--primary);
    right: 10px;
}

/* --- 專案卡片互動 --- */
.clickable-project {
    cursor: pointer;
}
/* 原本已經有 hover 效果，所以不用額外加太多 */

/* --- 通用資訊 Modal --- */
#info-modal {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(3px);
    z-index: 600; /* 比 Tutorial 更高 */
    display: flex;
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.3s;
}

.info-box {
    width: 90%;
    max-width: 600px;
    background: #1a1a2e;
    border: 2px solid var(--primary);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 0 40px rgba(0,0,0,0.5);
    display: flex;
    flex-direction: column;
    max-height: 80vh; /* 防止太高超出螢幕 */
}

.info-header {
    background: var(--primary);
    color: #000;
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.info-header h3 { margin: 0; font-size: 1.1rem; }

.close-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    font-weight: bold;
    cursor: pointer;
    color: #000;
}

.info-body {
    padding: 20px;
    overflow-y: auto;
    color: #fff;
}

#info-img-container {
    width: 100%;
    margin-bottom: 20px;
    border-radius: 5px;
    overflow: hidden;
    border: 1px solid #444;
}

#info-img {
    width: 100%;
    display: block;
}

.info-text {
    font-size: 1rem;
    line-height: 1.6;
    white-space: pre-wrap; /* 保留換行 */
}

.timeline-node.is-current .t-dot {
    border-color: #00ff00; /* 亮綠色 */
    background: #003300;
    box-shadow: 0 0 5px #00ff00;
    animation: pulseCurrent 2s infinite;
}

/* 當被點選 (Active) 時的現職節點 */
.timeline-node.is-current.active .t-dot {
    background: #00ff00;
    box-shadow: 0 0 20px #00ff00;
    transform: scale(1.4);
}

.timeline-node.is-current.active .t-date {
    color: #00ff00;
    text-shadow: 0 0 5px #00ff00;
}

/* 2. 快速按鈕：變為綠色文字 */
.job-btn.is-current {
    color: #00ff00;
    border-color: rgba(0, 255, 0, 0.5);
}

.job-btn.is-current:hover {
    background: rgba(0, 255, 0, 0.1);
}

/* 當被點選 (Active) 時的現職按鈕 */
.job-btn.is-current.active {
    background: #00ff00;
    color: #000;
    border-color: #00ff00;
    box-shadow: 0 0 15px #00ff00;
}

/* 呼吸燈動畫 */
@keyframes pulseCurrent {
    0% { box-shadow: 0 0 5px #00ff00; }
    50% { box-shadow: 0 0 15px #00ff00; }
    100% { box-shadow: 0 0 5px #00ff00; }
}

/* 1. 按讚與收藏狀態 */
.ig-icons-left i, .ig-actions .fa-bookmark {
    transition: transform 0.2s;
}

.ig-icons-left i:active, .ig-actions .fa-bookmark:active {
    transform: scale(1.2);
}

.fa-heart.liked {
    color: #ed4956; /* IG 紅色 */
    font-weight: 900; /* 變成實心 */
}

.fa-bookmark.saved {
    color: #000;
    font-weight: 900; /* 變成實心 */
}

/* 2. 留言區塊 */
.ig-comments-section {
    padding: 0 15px 15px;
    font-size: 0.9rem;
}

.comment-row {
    margin-bottom: 5px;
}

.comment-user {
    font-weight: bold;
    margin-right: 5px;
}

/* 3. 限時動態播放器 (Story Viewer) */
#story-viewer {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 92%;
    background: #2b2b2b;
    z-index: 50; /* 蓋在貼文上面 */
    display: flex;
    flex-direction: column;
}

.story-progress-container {
    display: flex;
    padding: 10px 5px;
    gap: 5px;
}

.story-bar {
    flex: 1;
    height: 2px;
    background: rgba(255,255,255,0.3);
    border-radius: 2px;
    overflow: hidden;
}

.story-bar-fill {
    width: 0%;
    height: 100%;
    background: #fff;
}

/* 動畫：3秒跑完 */
.story-bar-fill.playing {
    animation: fillProgress 3s linear forwards;
}

@keyframes fillProgress {
    from { width: 0%; }
    to { width: 100%; }
}

.story-header {
    display: flex;
    align-items: center;
    padding: 15px 10px;
    color: #fff;
    z-index: 2;
    text-shadow: 0 1px 3px rgba(0,0,0,0.5);
}

.story-avatar {
    width: 30px; height: 30px;
    border-radius: 50%;
    margin-right: 10px;
    background-size: cover;
}

.story-content {
    flex: 0.6; /* 填滿剩餘空間 */
    display: flex;
    justify-content: center;
    align-items: center;
    color: #fff;
    font-size: 1.2rem;
    font-weight: bold;
    text-align: center;
    padding: 20px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    text-shadow: 0 2px 10px rgba(0,0,0,0.8);
    position: relative;
}

#story-viewer::after {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100px;
    background: linear-gradient(to bottom, rgba(0,0,0,0.5), transparent);
    pointer-events: none;
    z-index: 1;
}

.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    padding: 10px;
}

.video-card {
    background: #111;
    border: 1px solid #444;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: 0.3s;
}

.video-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.3);
}

.video-thumb {
    height: 150px;
    background-size: cover;
    background-position: center;
    position: relative;
}

.play-overlay {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: 0.3s;
}

.play-overlay i {
    font-size: 3rem;
    color: #fff;
    filter: drop-shadow(0 0 10px var(--primary));
}

.video-card:hover .play-overlay {
    opacity: 1;
}

.video-info {
    padding: 15px;
}

.video-info h4 {
    margin: 0 0 5px 0;
    color: #fff;
    font-size: 1rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.video-tag {
    font-size: 0.75rem;
    color: var(--secondary);
    border: 1px solid var(--secondary);
    padding: 2px 6px;
    border-radius: 4px;
}

/* --- 影片播放器 Modal --- */
#video-modal {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 800;
    display: flex;
    justify-content: center;
    align-items: center;
}

.video-player-frame {
    width: 90%;
    max-width: 800px;
    background: #000;
    border: 2px solid #555;
    box-shadow: 0 0 50px rgba(0, 255, 255, 0.1);
}

.video-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    background: #111;
    color: #fff;
    border-bottom: 1px solid #333;
}

.rec-dot {
    color: red;
    font-size: 0.8rem;
    animation: blink 1s infinite;
    font-weight: bold;
}

.video-screen {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 比例 */
    background: #000;
}

#youtube-embed-container iframe {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    border: none;
}

.screen-scanline {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: repeating-linear-gradient(
        0deg,
        rgba(255, 255, 255, 0.03),
        rgba(255, 255, 255, 0.03) 1px,
        transparent 1px,
        transparent 2px
    );
    pointer-events: none; /* 讓點擊穿透到影片 */
}

.close-video-btn {
    background: none;
    border: none;
    color: #fff;
    font-size: 1.2rem;
    cursor: pointer;
}

#album-modal {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.92); /* 很深的背景，凸顯照片 */
    z-index: 500;
    display: flex;
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.3s ease-out;
}

.album-viewer {
    width: 100%;
    max-width: 1000px;
    height: 80vh;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    position: relative;
}

/* 圖片容器 */
.slide-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    max-width: 800px;
    animation: zoomIn 0.3s;
}

@keyframes zoomIn {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.slide-frame {
    position: relative;
    border: 2px solid #333;
    padding: 5px;
    background: #000;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.8);
    margin-bottom: 20px;
    max-height: 60vh; /* 限制圖片高度 */
}

#album-img {
    max-width: 100%;
    max-height: 60vh; /* 確保不超出螢幕 */
    display: block;
    object-fit: contain;
}

/* 掃描線特效 (裝飾用) */
.scan-line-anim {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: linear-gradient(to bottom, transparent 50%, rgba(0, 255, 255, 0.1) 51%, transparent 51%);
    background-size: 100% 4px;
    pointer-events: none;
}

/* 文字說明 */
.slide-caption-box {
    background: rgba(255, 255, 255, 0.1);
    border-left: 3px solid var(--primary);
    padding: 10px 20px;
    color: #fff;
    font-size: 1.1rem;
    max-width: 80%;
    text-align: center;
    font-family: 'Courier New', monospace;
    line-height: 1.5;
}

.caption-icon {
    color: var(--primary);
    margin-right: 10px;
}

.slide-counter {
    margin-top: 10px;
    color: #666;
    font-size: 0.9rem;
    letter-spacing: 2px;
}

/* 左右切換按鈕 */
.nav-arrow {
    background: none;
    border: none;
    color: #666;
    font-size: 3rem;
    cursor: pointer;
    padding: 20px;
    transition: 0.2s;
}

.nav-arrow:hover {
    color: var(--primary);
    transform: scale(1.2);
    text-shadow: 0 0 15px var(--primary);
}

/* 關閉按鈕 */
.close-album-btn {
    position: absolute;
    top: 20px; right: 20px;
    background: none;
    border: none;
    color: #fff;
    font-size: 2rem;
    cursor: pointer;
    z-index: 10;
}

.close-album-btn:hover { color: red; }

/* RWD: 手機版調整 */
@media (max-width: 768px) {
    .album-viewer {
        padding: 0;
    }
    .nav-arrow {
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
        z-index: 5;
        background: rgba(0,0,0,0.3); /* 加個底色比較容易按 */
    }
    .nav-arrow.prev { left: 0; }
    .nav-arrow.next { right: 0; }
    
    .slide-caption-box {
        font-size: 0.9rem;
        width: 90%;
    }
}