/* Lucas Futures Design System Colors - Slate Dark Mode (與 Trading Dashboard 統一) */
:root {
    /* Dark Mode (預設) - 使用 Tailwind Slate 深色系 */
    --bg-primary: #020617;       /* slate-950 主背景 */
    --bg-secondary: #0f172a;     /* slate-900 卡片背景 */
    --bg-tertiary: #1e293b;      /* slate-800 輸入框、hover 背景 */
    --border-default: #334155;   /* slate-700 邊框 */
    --border-muted: #1e293b;     /* slate-800 淡邊框 */
    --text-primary: #f8fafc;     /* slate-50 主要文字 */
    --text-secondary: #94a3b8;   /* slate-400 次要文字 */
    --text-muted: #64748b;       /* slate-500 淡化文字 */
    --accent-blue: #38bdf8;      /* sky-400 藍色強調 */
    --accent-green: #22c55e;     /* green-500 綠色 (專業會員) */
    --accent-purple: #a855f7;    /* purple-500 紫色 (VIP) */
    --accent-amber: #f59e0b;     /* amber-500 琥珀色 */
    --accent-red: #ef4444;       /* red-500 紅色 (錯誤) */
}

body {
    font-family: 'Inter', 'Noto Sans TC', sans-serif;
    background-color: #020617; /* slate-950 - 與 Trading Dashboard 統一 */
}
.chart-container {
    width: 100%;
    height: 500px; /* 為每個圖表設定固定高度 */
}
.loader {
    border: 8px solid #f3f3f3;
    border-radius: 50%;
    border-top: 8px solid #3498db;
    width: 60px;
    height: 60px;
    animation: spin 1s linear infinite;
}
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Styles for Gemini Analysis Report (prose) */
.prose {
    color: #e5e7eb; /* text-gray-200 */
}
.prose h1,
.prose h2,
.prose h3,
.prose h4,
.prose h5,
.prose h6 {
    color: #38bdf8; /* text-sky-400 */
    margin-top: 1.5em;
    margin-bottom: 0.5em;
}
.prose h2 {
    font-size: 1.75em; /* text-2xl */
}
.prose h3 {
    font-size: 1.5em; /* text-xl */
}
.prose p {
    margin-bottom: 1em;
    line-height: 1.6;
}
.prose ul,
.prose ol {
    margin-top: 0.5em;
    margin-bottom: 1em;
    padding-left: 1.5em;
}
.prose li {
    margin-bottom: 0.5em;
}
.prose strong {
    color: #facc15; /* text-yellow-400 */
}
.prose code {
    background-color: #374151; /* bg-gray-700 */
    color: #e5e7eb;
    padding: 0.2em 0.4em;
    border-radius: 0.3em;
}
.prose pre {
    background-color: #1f2937; /* bg-gray-800 */
    color: #e5e7eb;
    padding: 1em;
    border-radius: 0.5em;
    overflow-x: auto;
}

/* 列印樣式 - 保持深色主題 */
@media print {
    /* 啟用背景顏色列印 */
    * {
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
        color-adjust: exact !important;
    }
    
    body {
        background-color: #0d1117 !important; /* GitHub Dark background */
        color: #e5e7eb !important; /* 保持淺色文字 */
    }
    
    /* 隱藏不需要列印的元素 */
    #fetch-button,
    #save-api-key-button,
    #analyze-button,
    #copy-report-btn,
    #export-pdf-btn,
    #login-notice,
    .g_id_signin,
    #user-info,
    #sign-out-btn,
    #loader-overlay,
    #initial-message-overlay,
    select,
    input,
    label {
        display: none !important;
    }
    
    /* 保持容器的深色樣式 */
    .bg-gray-800 {
        background-color: #1f2937 !important;
    }
    
    .bg-gray-900 {
        background-color: #111827 !important;
    }
    
    /* 保持文字顏色 */
    .text-white {
        color: #ffffff !important;
    }
    
    .text-gray-400 {
        color: #9ca3af !important;
    }
    
    .text-gray-300 {
        color: #d1d5db !important;
    }
    
    .text-gray-500 {
        color: #6b7280 !important;
    }
    
    .text-blue-400 {
        color: #60a5fa !important;
    }
    
    .text-emerald-400 {
        color: #34d399 !important;
    }
    
    .text-purple-400 {
        color: #c084fc !important;
    }
    
    .text-yellow-400 {
        color: #facc15 !important;
    }
    
    /* 確保圖表正確顯示 */
    .chart-container {
        page-break-inside: avoid;
        width: 100% !important;
        height: 400px !important;
        background-color: #1f2937 !important;
    }
    
    /* 調整網格佈局 */
    .grid {
        display: grid !important;
    }
    
    /* 調整頁面邊距 */
    .max-w-screen-2xl {
        max-width: 100% !important;
    }
    
    .p-4,
    .p-8 {
        padding: 20px !important;
    }
    
    /* 防止內容被截斷 */
    #gemini-analysis-container {
        page-break-before: always;
    }
    
    #rs-container {
        page-break-before: auto;
    }
    
    /* 保持陰影效果 */
    .shadow-lg {
        box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.5) !important;
    }
    
    /* 調整prose樣式 - 保持深色主題 */
    .prose {
        color: #e5e7eb !important;
    }
    
    .prose h1,
    .prose h2,
    .prose h3,
    .prose h4,
    .prose h5,
    .prose h6 {
        color: #38bdf8 !important;
    }
    
    .prose strong {
        color: #facc15 !important;
    }
    
    .prose code {
        background-color: #374151 !important;
        color: #e5e7eb !important;
    }
    
    .prose pre {
        background-color: #1f2937 !important;
        color: #e5e7eb !important;
    }
    
    /* 移除連結的底線 */
    a {
        text-decoration: none !important;
    }
}
