:root {
    /* 主色系配置：由使用者提供之 #44ACFF 延伸 */
    --primary: #44ACFF;
    --primary-light: #70BDFF; /* 用於 hover/背景 */
    --primary-dark: #3895E0;  /* 用於 active/深色文字 */
    
    /* 基礎色調 */
    --dark: #0F172A;
    --slate: #64748B;
    --light: #F8FAFC;
    --white: #FFFFFF;
    
    /* 語意色彩 (Semantic Colors) */
    --success: #10B981;
    --error: #EF4444;
    --warning: #F59E0B;
    
    /* 視覺效果變數 */
    --glass: rgba(255, 255, 255, 0.8);
    --border: rgba(0, 0, 0, 0.1);
    --radius: 12px;
    --transition: 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'IBM Plex Sans JP', 'Inter', 'Noto Sans TC', sans-serif;
    color: var(--dark);
    line-height: 1.8; /* 優化閱讀間距 */
    background-color: var(--light);
    overflow-x: hidden;
    letter-spacing: 0.02em;
}

h1, h2, h3, h4, .logo {
    font-family: 'IBM Plex Sans JP', sans-serif;
    font-weight: 700;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Navbar */
.navbar {
    height: 80px;
    display: flex;
    align-items: center;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    background: var(--glass);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--dark);
}

.logo span {
    color: var(--primary);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-links a {
    text-decoration: none;
    color: var(--slate);
    font-weight: 500;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: var(--primary);
}

/* Hero Section */
.hero {
    padding: 160px 0 100px;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.9), rgba(15, 23, 42, 0.7)), 
                url('Images/hero-bg.png');
    background-size: cover;
    background-position: center;
    color: white;
    text-align: center;
}

.hero h1 {
    font-size: 3.5rem;
    line-height: 1.2;
    margin-bottom: 1.5rem;
}

.hero p {
    font-size: 1.25rem;
    color: var(--slate);
    max-width: 700px;
    margin: 0 auto 2.5rem;
}

.badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: rgba(59, 130, 246, 0.2);
    border: 1px solid var(--primary);
    border-radius: 50px;
    color: var(--primary);
    font-weight: 600;
    margin-bottom: 1rem;
}

/* FAQ Section */
.faq-section {
    padding: 100px 0;
    background: #fff;
}

.faq-container {
    max-width: 900px;
    margin: 0 auto;
}

.faq-item {
    border: 1px solid #E2E8F0;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    overflow: hidden;
    transition: all 0.3s;
}

.faq-question {
    width: 100%;
    padding: 1.5rem 2rem;
    background: white;
    border: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    font-size: 1.15rem;
    font-weight: 700;
    color: #1E293B;
    text-align: left;
    transition: background 0.3s;
}

.faq-question:hover {
    background: #F8FAFC;
}

.faq-icon {
    font-size: 1.5rem;
    color: #94A3B8;
    font-weight: 300;
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
    background: white;
}

.faq-answer.show {
    max-height: 1000px;
}

.faq-content {
    padding: 0 2rem 2rem;
    color: #64748B;
    line-height: 1.8;
}

.faq-content p {
    margin-bottom: 1rem;
}

.faq-content ul, .faq-content ol {
    padding-left: 1.5rem;
    margin-bottom: 1.5rem;
}

.faq-content li {
    margin-bottom: 0.5rem;
}

.faq-link {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    border-bottom: 2px solid transparent;
    transition: all 0.3s;
}

.faq-link:hover {
    border-bottom-color: var(--primary);
}

/* 按鈕與互動元素 (Buttons & Interaction) */
.btn {
    padding: 1rem 2rem;
    border-radius: var(--radius);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition); /* 統一使用微動畫變數 */
    display: inline-block;
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-gradient {
    background: linear-gradient(90deg, var(--primary), #8B5CF6);
    color: white;
}

.btn-outline {
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

/* Quiz Section */
.quiz-section {
    padding: 80px 0;
    margin-top: -80px;
}

.quiz-card {
    background: white;
    padding: 3rem;
    border-radius: 20px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--border);
    max-width: 800px;
    margin: 0 auto;
}

.glass {
    background: var(--glass);
    backdrop-filter: blur(20px);
}

.quiz-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.quiz-step h3 {
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}

.quiz-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.option-btn {
    padding: 1.5rem;
    border: 2px solid #E2E8F0;
    background: white;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.option-btn:hover {
    border-color: var(--primary);
    background: #EFF6FF;
}

/* Topics Section Redesign */
.topics-section {
    padding: 100px 0;
    background: #f8fafc;
}

.topic-tabs-nav {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
    border-bottom: 2px solid #e2e8f0;
    padding-bottom: 0;
    flex-wrap: wrap;
}

.tab-btn {
    padding: 1rem 2rem;
    border: none;
    background: transparent;
    font-size: 1.1rem;
    font-weight: 600;
    color: #64748b;
    cursor: pointer;
    position: relative;
    transition: all 0.3s;
}

.tab-btn:hover {
    color: var(--primary);
}

.tab-btn.active {
    color: var(--primary);
}

.tab-btn.active::after {
    content: "";
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--primary);
}

.topic-pane {
    display: none;
    animation: fadeIn 0.5s ease;
}

.topic-pane.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.topic-main-card {
    background: white;
    border-radius: 20px;
    padding: 0;
    border: 1px solid #e2e8f0;
    overflow: hidden;
}

.topic-body {
    display: grid;
    grid-template-columns: 1fr 350px;
}

.topic-text {
    padding: 3rem;
}

.topic-text h3 {
    font-size: 1.75rem;
    margin-bottom: 1.5rem;
    color: #1e293b;
}

.topic-text p {
    font-size: 1.1rem;
    color: #64748b;
    margin-bottom: 2rem;
    line-height: 1.8;
}

.topic-tags {
    display: flex;
    gap: 0.8rem;
    flex-wrap: wrap;
}

.t-tag {
    background: #f1f5f9;
    color: #94a3b8;
    padding: 0.4rem 1rem;
    border-radius: 6px;
    font-size: 0.9rem;
}

.topic-sidebar {
    background: #f1f5f9;
    padding: 3rem;
    border-left: 1px solid #e2e8f0;
}

.topic-sidebar h5 {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    color: #1e293b;
}

.sidebar-list {
    list-style: none;
    padding: 0;
}

.sidebar-list li {
    margin-bottom: 1.2rem;
}

.sidebar-list a {
    color: var(--primary);
    text-decoration: none;
    font-size: 0.95rem;
    line-height: 1.4;
    display: block;
    transition: opacity 0.3s;
}

.sidebar-list a:hover {
    text-decoration: underline;
    opacity: 0.8;
}

@media (max-width: 992px) {
    .topic-body { grid-template-columns: 1fr; }
    .topic-sidebar { border-left: none; border-top: 1px solid #e2e8f0; }
}

/* CFO Section */
.cfo-section {
    padding: 80px 0;
}

.cfo-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    padding: 4rem;
    border-radius: 24px;
    align-items: center;
}

.glass-dark {
    background: rgba(15, 23, 42, 0.95);
    color: white;
}

.cfo-list {
    list-style: none;
    margin: 2rem 0;
}

.cfo-list li {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

.cfo-list strong {
    color: var(--primary);
    display: block;
    margin-bottom: 0.2rem;
}

.chart-mockup {
    display: flex;
    align-items: flex-end;
    gap: 0.5rem;
    height: 150px;
}

.chart-mockup .bar {
    flex: 1;
    background: var(--primary);
    border-radius: 4px 4px 0 0;
    opacity: 0.6;
}

/* CFO Dashboard Styles */
.comparison-dashboard {
    padding: 3rem;
    border-radius: 24px;
    margin-top: 2rem;
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3rem;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.dashboard-title h3 {
    font-size: 1.4rem;
    margin-bottom: 0.5rem;
}

.dashboard-title p {
    color: var(--slate);
    font-size: 0.9rem;
}

.toggle-container {
    background: rgba(255, 255, 255, 0.1);
    padding: 5px;
    border-radius: 12px;
    display: flex;
}

.toggle-btn {
    padding: 0.8rem 1.5rem;
    border-radius: 8px;
    border: none;
    background: transparent;
    color: #94A3B8;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 0.95rem;
}

.toggle-btn.active {
    background: var(--primary);
    color: white;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

.chart-container {
    margin-bottom: 3rem;
}

.chart-legend {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
    justify-content: center;
}

.legend-box {
    width: 30px;
    height: 12px;
    border-radius: 2px;
}

.legend-box.manual { background: #EF4444; }
.legend-box.system { background: #10B981; }

.main-chart {
    display: flex;
    height: 350px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    padding-left: 60px;
}

.chart-y-axis {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    color: #94A3B8;
    font-size: 0.8rem;
    padding-bottom: 2rem;
}

.bars-area {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    width: 100%;
    height: 100%;
    padding: 0 5%;
}

.bar-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 15%;
    height: 100%;
    justify-content: flex-end;
}

.bar {
    width: 100%;
    border-radius: 4px 4px 0 0;
    transition: all 0.6s cubic-bezier(0.17, 0.67, 0.83, 0.67);
}

.bar.manual { background: #EF4444; opacity: 0.8; }
.bar.system { background: #10B981; opacity: 0.8; }

.bar-label {
    margin-top: 1rem;
    font-size: 0.85rem;
    color: #94A3B8;
    white-space: nowrap;
}

.stats-footer {
    display: flex;
    justify-content: space-between;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.stat-item {
    text-align: center;
    flex: 1;
}

.stat-item h4 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.stat-item p {
    font-size: 0.9rem;
    color: #94A3B8;
}

.stat-divider {
    width: 1px;
    background: rgba(255, 255, 255, 0.1);
    margin: 0 1rem;
}

.risk-text { color: #F87171; }
.warning-text { color: #FBBF24; }
.success-text { color: #34D399; }

/* Whitepaper Section */
.whitepaper-section {
    padding: 80px 0;
}

.whitepaper-banner {
    background: linear-gradient(rgba(0,0,0,0.7), rgba(0,0,0,0.7)), url('Images/hero-bg.png');
    background-size: cover;
    padding: 5rem;
    border-radius: 24px;
    text-align: center;
    color: white;
}

.download-form {
    margin-top: 2rem;
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.download-form input, .download-form select {
    padding: 1rem;
    border-radius: 8px;
    border: none;
    min-width: 200px;
}

/* Cases Section Updated */
.cases-section {
    padding: 100px 0;
    background-color: #F8FAFC;
}

.case-detail-card {
    background: white;
    padding: 4rem;
    border-radius: 24px;
    border: 1px solid #E2E8F0;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

.case-main-header h3 {
    font-size: 2rem;
    line-height: 1.4;
    margin-bottom: 3.5rem;
    color: #1E293B;
}

.case-columns {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 3rem;
}

.case-col {
    position: relative;
}

.num-circle {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1rem;
    margin-bottom: 1.5rem;
}

.num-circle.red { background: #fee2e2; color: #ef4444; }
.num-circle.blue { background: #E0F2FF; color: #44ACFF; }
.num-circle.green { background: #dcfce7; color: #10b981; }

.case-col h4 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: #1E293B;
}

.case-col ul {
    list-style: none;
    padding: 0;
}

.case-col li {
    font-size: 0.95rem;
    color: #64748B;
    margin-bottom: 0.8rem;
    position: relative;
    padding-left: 1.2rem;
}

.case-col li::before {
    content: "•";
    position: absolute;
    left: 0;
    color: #CBD5E1;
}

/* Final CTA */
.cta-final-section {
    padding: 100px 0;
    text-align: center;
}

.cta-box {
    background: var(--light);
    padding: 5rem;
    border-radius: 30px;
    border: 1px solid #E2E8F0;
}

.cta-box h2 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
}

.footer {
    padding: 3rem 0;
    background: white;
    border-top: 1px solid #E2E8F0;
    text-align: center;
    color: var(--slate);
}

/* Animations & Loaders */
.loader-spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.progress-bar-container {
    width: 100%;
    height: 10px;
    background: #E2E8F0;
    border-radius: 5px;
    margin-top: 1.5rem;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: var(--primary);
    width: 0%;
    transition: width 0.1s linear;
}

/* Helpers */
.hidden { display: none; }

/* Responsive */
@media (max-width: 768px) {
    .nav-links { display: none; }
    .hero h1 { font-size: 2.5rem; }
    .quiz-options { grid-template-columns: 1fr; }
    .cfo-grid { grid-template-columns: 1fr; padding: 2rem; }
    .download-form { flex-direction: column; }
    .whitepaper-banner { padding: 3rem 1.5rem; }
}
