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

body {
    font-family: "Work Sans", "Noto Sans", sans-serif;
    background-color: #ffffff;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

.layout-container {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    height: 100%;
}

/* Header 樣式 */
.main-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    white-space: nowrap;
    border-bottom: 1px solid #f0f2f5;
    padding: 12px 40px;
    position: relative;
    z-index: 100;
}

.header-left-section {
    display: flex;
    align-items: center;
    gap: 32px;
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 16px;
    color: #111418;
}

.logo-icon {
    width: 16px;
    height: 16px;
}

.logo-title {
    color: #111418;
    font-size: 18px;
    font-weight: 700;
    line-height: 28px;
    letter-spacing: -0.015em;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 36px;
}

.nav-links a {
    color: #111418;
    font-size: 14px;
    font-weight: 500;
    line-height: 20px;
    text-decoration: none;
    padding: 5px 0;
}

.header-right-section {
    display: flex;
    flex: 1;
    justify-content: flex-end;
    align-items: center;
}

/* Profile Image 樣式 */
.profile-image {
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    aspect-ratio: 1 / 1;
    border-radius: 9999px;
    width: 40px;
    height: 40px;
}

/* Hamburger Menu 樣式 */
.hamburger-menu {
    display: none;
    flex-direction: column;
    cursor: pointer;
    padding: 10px;
}

.hamburger-menu .bar {
    width: 25px;
    height: 3px;
    background-color: #111418;
    margin: 4px 0;
    transition: 0.4s;
}

/* Hamburger Animation */
.hamburger-menu.active .bar:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.hamburger-menu.active .bar:nth-child(2) {
    opacity: 0;
}

.hamburger-menu.active .bar:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* 漢堡選單關閉按鈕樣式 */
.hamburger-menu-close {
    position: absolute;
    top: 25px;
    right: 20px;
    width: 30px;
    height: 30px;
    cursor: pointer;
    z-index: 1000;
    display: none;
}

.hamburger-menu-close::before,
.hamburger-menu-close::after {
    content: '';
    position: absolute;
    width: 25px;
    height: 3px;
    background-color: #111418;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(45deg);
}

.hamburger-menu-close::after {
    transform: translate(-50%, -50%) rotate(-45deg);
}

/* Dropdown Nav 樣式 */
.nav-dropdown {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #ffffff;
    border-top: 1px solid #f0f2f5;
    flex-direction: column;
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
    z-index: 999;
    overflow-y: auto;
}

.nav-dropdown.active {
    display: flex;
}

.nav-dropdown a {
    padding: 15px 0;
    height: 100px;
    color: #111418;
    text-decoration: none;
    font-size: 20px;
    border-bottom: 1px solid #f0f2f5;
    cursor: pointer;
    margin-bottom: 20px;
    font-weight: 500;
}

.nav-dropdown a:hover {
    background-color: #f0f2f5;
}

.nav-dropdown a:active {
    transform: scale(0.98);
}

.nav-dropdown a:last-child {
    border-bottom: none;
}

/* Content Area 樣式 */
.content-area {
    flex: 1;
    padding: 20px;
    background-color: #f8f9fa;
    display: flex; /* 將 content-area 設為 Flex 容器 */
    justify-content: center; /* 主軸（橫向）置中 */
    align-items: center; /* 交叉軸（縱向）置中 */
    flex-direction: column; /* 如果是單個區塊，且希望垂直堆疊 */
}

/* Search Block 樣式 */
.search-block {
    background-color: #ffffff;
    padding: 3px;
    border-radius: 8px;
    margin-bottom: 20px;

}

.search-bar-div {
    display: flex;
    align-items: center;
    gap: 10px;
}

.search-bar-title {
    font-size: 16px;
    font-weight: 500;
    color: #111418;
}

.search-bar {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    font-size: 14px;
}

.search_icon {
    width: 24px;
    height: 24px;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%23111418"><path d="M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"/></svg>');
    background-repeat: no-repeat;
    background-position: center;
    cursor: pointer;
}

/* Container 樣式 */
.container {
    background-color: #ffffff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    max-width: 1100px;
    margin: 0 auto;
    width: 100%;
    box-sizing: border-box;
}

/* Loading Indicator 樣式 */
.loading-indicator {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 200px;
    width: 100vw;
    display: none;
    font-size: 20px;
    font-weight: 700;
    color: rgba(221, 177, 44, 0.574);
    margin-top: 50px;
    margin-bottom: 50px;
}

.spinner {
    border: 8px solid rgba(255, 255, 255, 0.3);
    border-top: 8px solid rgba(221, 177, 44, 0.574);
    border-radius: 50%;
    width: 60px;
    height: 60px;
    animation: spin 1s linear infinite;
    margin-bottom: 15px;
}

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

/* Stock Header 樣式 */
#stock-header {
    margin-bottom: 20px;
}

.stock-title {
    font-size: 24px;
    font-weight: 700;
    color: #111418;
    margin: 0;
}



/* Stock Info 樣式 */
#stock-info {
    margin-bottom: 20px;
}

.stock-info-table {
    width: 100%;
    border-collapse: collapse;
}

.stock-info-table th,
.stock-info-table td {
    padding: 12px;
    border: 1px solid #e0e0e0;
    text-align: left;
}

.stock-info-table th {
    background-color: #f8f9fa;
    font-weight: 500;
    color: #111418;
    width: 20%;
}

.stock-info-table td {
    color: #333;
}

/* Error Message 樣式 */
.error-message {
    color: #dc3545;
    padding: 10px;
    margin: 10px 0;
    border: 1px solid #dc3545;
    border-radius: 4px;
    background-color: #fff;
}

/* Footer 樣式 */
.footer {
    background-color: #f0f2f5; 
    padding: 20px 40px;
    text-align: center;
    border-top: 1px solid #e0e4e8; 
    margin-top: auto; 
}

.footer_text {
    color: #60748a; 
    font-size: 14px;
    line-height: 1.6;
    max-width: 960px; 
    margin: 0 auto; 
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    align-items: center;
}
.footer-link {
    display: inline-block;
    padding: 0 6px;
    background: none;
    color: #0056b3;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    border: none;
    border-radius: 0;
    margin: 0 2px;
    transition: color 0.2s;
    text-decoration: underline;
    box-shadow: none;
}
.footer-link:hover, .footer-link:focus {
    color: #333;
    background: none;
    text-decoration: underline;
    box-shadow: none;
}
.footer-link:active {
    color: #111418;
    background: none;
    text-decoration: underline;
    box-shadow: none;
}

.stock-financial-report-container {
    max-width: 1200px;
    margin: 0 auto;
    background-color: #fff;
    
    border-radius: 8px;
    
}
/* ========== 財報排名區塊 ========== */
.ranking-block {
    margin: 40px auto 32px auto;
    background: #f7fafd;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    padding: 32px 24px 24px 24px;
    margin-bottom: 32px;
}
.ranking-block-title {
    font-size: 26px;
    font-weight: 800;
    color: #0056b3;
    margin-bottom: 8px;
    text-align: left;
}
.ranking-block-subtitle {
    font-size: 20px;
    font-weight: 700;
    color: #1a355e;
    margin-bottom: 18px;
    text-align: left;
}
.ranking-controls {
    display: flex;
    gap: 18px;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 18px;
}
.ranking-controls label {
    font-weight: 600;
    color: #0056b3;
}
.ranking-controls select {
    padding: 6px 12px;
    border-radius: 4px;
    border: 1px solid #b0c4de;
    font-size: 15px;
    background: #fff;
    margin-right: 8px;
}
.ranking-controls select:disabled {
    background: #f0f2f5;
    color: #aaa;
}
.ranking-sector {
    font-size: 16px;
    color: #60748a;
    margin-bottom: 10px;
}
.ranking-sector span {
    font-weight: 700;
    color: #0056b3;
    margin-right: 18px;
    margin-left: 15px;
}
.ranking-sector .ranking-currency {
    color: #60748a;
    font-size: 15px;
    font-weight: 500;
    margin-left: 25px;
    margin-right: 0;
    display: inline;
}
.ranking-sector .ranking-label {
    color: #0056b3;
    font-size: 15px;
    font-weight: 500;
    margin-left: 49px;
    margin-right: 0;
    display: inline;
}

.ranking-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.ranking-item {
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 14px 0;
    border-bottom: 1px solid #e0e4e8;
    font-size: 17px;
    transition: background 0.2s;
}
.ranking-item:last-child {
    border-bottom: none;
}
.ranking-item:hover {
    background: #eaf3fa;
}
.ranking-metric {
    font-weight: 700;
    color: #1a355e;
    min-width: 220px;
}
.ranking-value {
    color: #007bff;
    font-weight: 700;
    min-width: 120px;
}
.ranking-rank {
    color: #e67e22;
    font-weight: 600;
    min-width: 90px;
}
.ranking-total {
    color: #60748a;
    font-size: 15px;
    min-width: 110px;
}
.ranking-quarter {
    display: inline-block;
    margin-left: 18px;
    padding: 3px 12px;
    background: #eaf3fa;
    color: #0056b3;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.5px;
    vertical-align: middle;
    box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}

#financial-report-title {
    font-size: 30px;
    font-weight: 700;
    color: #0056b3;
    text-align: center;
}
#tableTitle{
    font-size: 18px;
    font-weight: 700;
    color: #0056b3;
    text-align: center; 
}
.controls {
    margin-bottom: 20px;
    display: flex;
    gap: 15px;
    align-items: center;
    flex-wrap: wrap;
    justify-content: center;
}
.controls label {
    font-weight: bold;
}
.controls select, .controls input[type="text"], .controls button {
    padding: 8px 12px;
    border-radius: 4px;
    border: 1px solid #ddd;
    font-size: 16px;
}
.controls button {
    background-color: #007bff;
    color: white;
    cursor: pointer;
    transition: background-color 0.3s ease;
}
.controls button:hover {
    background-color: #0056b3;
}
.chart-options {
    margin-top: 20px;
    margin-bottom: 20px;
    padding: 15px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background-color: #f9f9f9;
    text-align: center;
}
.chart-options h3 {
    margin-top: 0;
    color: #0056b3;
}
.checkbox-group {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px 20px; /* row-gap column-gap */
}
.checkbox-group label {
    display: flex;
    align-items: center;
    font-weight: normal; /* 取消粗體 */
    cursor: pointer;
}
.checkbox-group input[type="checkbox"] {
    margin-right: 5px;
    transform: scale(1.2); /* 讓勾選框大一點 */
}
.chart-container {
    position: relative;
    height: 500px;
    width: 100%;
}
#loading {
    text-align: center;
    margin-top: 20px;
    font-size: 1.1em;
    color: #666;
    display: none; /* 預設隱藏 */
}
#error {
    text-align: center;
    margin-top: 20px;
    font-size: 1.1em;
    color: #dc3545;
    display: none; /* 預設隱藏 */
}
.data-table-container {
    margin-top: 30px;
    overflow-x: auto; /* 允許表格橫向滾動 */
}
.table-header {
    text-align: center;
    font-weight: bold;
    margin-bottom: 10px;
}
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}
table, th, td {
    border: 1px solid #ddd;
}
th, td {
    padding: 10px;
    text-align: right;
    white-space: nowrap; /* 防止單元格內容換行 */
}
th {
    background-color: #f2f2f2;
    font-weight: bold;
    text-align: center;
}
/* 讓第一列 (指標名稱) 固定靠左 */
td:first-child, th:first-child {
    text-align: left;
    position: sticky;
    left: 0;
    background-color: #f2f2f2; /* 與標題列背景色一致 */
    z-index: 1; /* 確保在滾動時置頂 */
    left: -2px;
}
/* 對固定列的背景色進行調整，使其在滾動時不會被內容覆蓋 */
.data-table-container table {
    position: relative;
}
.data-source{
    color: #60748a;
    padding-top: 10px;
    text-align: right;
    
}

/* 報表分頁切換樣式 */
.report-tab-bar {
    display: flex;
    gap: 8px;
    margin-bottom: 10px;
}
.report-tab-btn {
    padding: 12px 34px;
    font-size: 16px;
    border: none;
    background: #fff;           /* 預設白底 */
    color: #0056b3;             /* 預設藍色字 */
    font-weight: 500;
    border-radius: 6px 6px 0 0;
    cursor: pointer;
    outline: none;
    transition: background 0.2s, color 0.2s;
    border-bottom: 1px solid #a8bace; /* 預設有藍色底線 */
}
.report-tab-btn.active {
    background: #e0e4e8;        /* 選中時灰色底 */
    color: #333;                /* 選中時深色字 */
    border-bottom: 2px solid transparent; /* 選中時無底線 */
    font-weight: 700;
}
#report-explain-section {
    background: #fff;
    border-radius: 0 0 8px 8px;
    padding: 24px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.04);
}
.explain-block {
    margin-bottom: 24px;
    border: 1.5px solid #e0e4e8;   /* 灰色邊框 */
    border-radius: 8px;
    padding: 16px 20px;
    background: #fff;
}
.explain-block h3 {
    font-size: 18px;
    color: #0056b3;
    margin-bottom: 6px;
}
.explain-block-desc {
    padding-top: 12px;
    padding-bottom: 12px;
    font-size: 17px;
    font-weight: 600;
    color: #333;
    margin-bottom: 4px;
}
.explain-more {
    color: #4e5e70;
    font-weight: 400;
    font-size: 16px;
    margin-top: 2px;
}

.ranking-explain-section {
    background: #fff;
    border-radius: 0 0 8px 8px;
    padding: 24px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.04);
}
.ranking-explain-block {
    margin-bottom: 24px;
    border: 1.5px solid #e0e4e8;
    border-radius: 8px;
    padding: 16px 20px;
    background: #fff;
}
.ranking-explain-block h3 {
    font-size: 18px;
    color: #0056b3;
    margin-bottom: 6px;
}
.ranking-explain-block .explain-block-desc {
    padding-top: 12px;
    padding-bottom: 12px;
    font-size: 17px;
    font-weight: 600;
    color: #333;
    margin-bottom: 4px;
}

.ai-analysis-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 32px 0 16px 0;
}
.ai-analysis-title {
    font-size: 24px;
    font-weight: 700;
    color: #0056b3;
    margin: 0;
}
.ai-analysis-toggle {
    display: flex;
    gap: 8px;
}
.ai-analysis-btn {
    padding: 8px 18px;
    font-size: 15px;
    border-radius: 6px;
    border: 1px solid #b0c4de;
    background: #fff;
    color: #0056b3;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}
.ai-analysis-btn.active {
    background: #eaf3fa;
    color: #333;
}
.ai-analysis-list {
    display: flex;
    flex-direction: column;
    gap: 24px;
    margin-bottom: 18px;
}
.ai-analysis-block {
    background: #f7fafd;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    padding: 18px 18px 12px 18px;
    transition: background 0.2s;
    max-width: 1100px; /* 與 .container、.ranking-block 一致 */
    margin: 0 auto;
    word-break: break-word;
    box-sizing: border-box;
}
/* 新增：AI分析相關新聞按鈕區塊 */
.ai-analysis-source-news-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 8px;
    margin-top: 4px;
}
.ai-analysis-source-news-btn {
    padding: 4px 14px;
    font-size: 14px;
    border-radius: 5px;
    border: 1px solid #b0c4de;
    background: #fff;
    color: #0056b3;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
    margin-bottom: 4px;
    margin-right: 4px;
    /* max-width: 320px;  // 移除最大寬度限制 */
    /* overflow: hidden;  // 允許自動換行 */
    /* text-overflow: ellipsis;  // 不再省略 */
    white-space: normal; /* 允許自動換行 */
    display: inline-block;
    text-align: left;
}
.ai-analysis-source-news-btn:hover {
    background: #eaf3fa;
    color: #333;
}
.ai-analysis-article-title {
    font-size: 18px;
    font-weight: 700;
    color: #1a355e;
    margin-bottom: 8px;
}
.ai-analysis-section-title {
    font-size: 15px;
    font-weight: 600;
    color: #386e7c;
    margin-top: 8px;
    margin-bottom: 2px;
}
.ai-analysis-summary,
.ai-analysis-important-news,
.ai-analysis-sentiment,
.ai-analysis-potential {
    font-size: 15px;
    color: #333;
    margin-bottom: 4px;
    white-space: pre-line;
    overflow: hidden;
    text-overflow: ellipsis;
}
.ai-analysis-stock-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 4px;
}
.ai-analysis-stock-btn {
    padding: 4px 12px;
    font-size: 14px;
    border-radius: 5px;
    border: 1px solid #b0c4de;
    background: #fff;
    color: #0056b3;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}
.ai-analysis-stock-btn:hover {
    background: #eaf3fa;
    color: #333;
}
.ai-analysis-industry-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 4px;
}
.ai-analysis-industry-item {
    padding: 2px 10px;
    font-size: 13px;
    border-radius: 4px;
    background: #eaf3fa;
    color: #0056b3;
    font-weight: 500;
}
.ai-analysis-pagination {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-bottom: 24px;
}
.ai-analysis-btn-page {
    padding: 8px 22px;
    font-size: 15px;
    border-radius: 6px;
    border: 1px solid #b0c4de;
    background: #fff;
    color: #0056b3;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}
.ai-analysis-btn-page:hover {
    background: #eaf3fa;
    color: #333;
}
.publishAtDiv{
    color: #333;
    font-size: 14px;
    padding-left: 2px;
}


.related-news-title {
    font-size: 24px;
    font-weight: 700;
    color: #0056b3;
    margin: 32px 0 16px 0;
    text-align: left;
}
.related-news-list {
    display: flex;
    flex-direction: column;
    gap: 18px;
    margin-bottom: 18px;
}
.related-news-block {
    background: #f7fafd;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    padding: 18px 18px 12px 18px;
    transition: background 0.2s;
    cursor: pointer;
}
.related-news-block:hover {
    background: #eaf3fa;
}
.related-news-session {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.related-news-title-text {
    font-size: 18px;
    font-weight: 600;
    color: #1a355e;
    margin-bottom: 4px;
}
.related-news-content {
    font-size: 16px;
    color: #333;
    margin-bottom: 4px;
    white-space: pre-line;
    overflow: hidden;
    text-overflow: ellipsis;
}
.related-news-publishAt {
    font-size: 14px;
    color: #60748a;
}
.related-news-category, .related-news-source {
    font-size: 13px;
    color: #888;
    margin-right: 12px;
}
.related-news-url { display: none; }
.related-news-pagination {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-bottom: 24px;
}
.related-news-btn {
    padding: 8px 22px;
    font-size: 15px;
    border-radius: 6px;
    border: 1px solid #b0c4de;
    background: #fff;
    color: #0056b3;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}
.related-news-btn:hover {
    background: #eaf3fa;
    color: #333;
}

@media (max-width: 900px) {
    .ranking-block { padding: 18px 6px; }
    .ranking-metric { min-width: 120px; font-size: 15px; }
    .ranking-value, .ranking-rank, .ranking-total { min-width: 60px; font-size: 14px; }
    .ai-analysis-title { font-size: 20px; }
    .ai-analysis-block { max-width: 100vw; padding: 10px 6px; }
    .ai-analysis-source-news-btn { font-size: 13px; padding: 4px 8px; max-width: 180px; }
    .ai-analysis-article-title { font-size: 15px; }
    .ai-analysis-section-title { font-size: 13px; }
    .ai-analysis-summary,
    .ai-analysis-important-news,
    .ai-analysis-sentiment,
    .ai-analysis-potential { font-size: 14px; }
    .related-news-title { font-size: 20px; }
    .related-news-block { padding: 10px 6px; }
    .related-news-title-text { font-size: 15px; }
    .related-news-content { font-size: 14px; }
    .container { padding: 8px;width: 100%;max-width: 100vw;overflow-x: auto;}
    .data-table-container,
    .chart-container,
    .ranking-block {
        max-width: 100vw;
        overflow-x: auto;
    }
    .stock-info-table,
    table {
        min-width: 600px;
    }
    th{
        font-size: 14px;
    }
    td {
        font-size: 12px;
    }
    .explain-block h3 {
        font-size: 16px;
    }
    .explain-block-desc {
        font-size: 15px;
    }
    .explain-more {
        font-size: 14px;
    }
}
@media (max-width: 600px) {
    .ranking-block { padding: 8px 2px; }
    .ranking-controls { gap: 8px; font-size: 13px; }
    .ranking-metric { min-width: 80px; font-size: 13px; }
    .ranking-value, .ranking-rank, .ranking-total { min-width: 40px; font-size: 12px; }
    .ranking-quarter {
        display: block;
        margin: 8px 0 0 0;
        font-size: 13px;
        padding: 2px 8px;
    }
    .ai-analysis-title { font-size: 18px; }
    .ai-analysis-block { max-width: 100vw; padding: 6px 2px; }
    .ai-analysis-source-news-btn { font-size: 12px; padding: 3px 4px; max-width: 120px; }
    .ai-analysis-article-title { font-size: 14px; }
    .ai-analysis-section-title { font-size: 13px; }
    .ai-analysis-summary,
    .ai-analysis-important-news,
    .ai-analysis-sentiment,
    .ai-analysis-potential { font-size: 12px; }
    .ai-analysis-pagination { gap: 6px; }
    .ai-analysis-btn-page { font-size: 14px; padding: 6px 12px; }
    .publishAtDiv{font-size: 10px;padding-left: 2px;}
    .related-news-title { font-size: 17px; }
    .related-news-block { padding: 6px 2px; }
    .related-news-title-text { font-size: 13px; }
    .related-news-content { font-size: 12px; }
    .related-news-pagination { gap: 6px; }
    .related-news-btn { font-size: 13px; padding: 6px 12px; }
    .container { padding: 2px;width: 100%;max-width: 100vw;overflow-x: auto;}
    .data-table-container,
    .chart-container,
    .ranking-block {
        max-width: 100vw;
        overflow-x: auto;
    }
    .stock-info-table,
    table { min-width: 480px;}
    .chart-container { min-width: 320px;}
    .checkbox-group label {
        font-size: 13px;
    }
    .ranking-explain-block h3 {
        font-size: 16px;

    }
    .ranking-explain-block .explain-block-desc {
        font-size: 15px;
    }

}


/* RWD 樣式 */
@media (max-width: 768px) {
    .main-header {
        padding: 12px 20px;
    }

    .header-left-section {
        gap: 16px;
    }

    .nav-links {
        display: none;
    }

    .header-right-section {
        gap: 16px;
    }

    .user-page-button {
        display: none;
    }

    .profile-image {
        width: 32px;
        height: 32px;
    }

    .hamburger-menu {
        display: flex;
    }

    .nav-dropdown {
        padding-top: 60px;
    }

    .nav-dropdown.active {
        display: flex;
    }

    .nav-dropdown a {
        width: 100%; 
        justify-content: flex-start;
        padding: 15px 20px; 
    }

    .hamburger-menu-close {
        display: block;
    }

    .content-area {
        padding: 10px;
    }


    .container {
        padding: 15px;
    }

    .stock-title {
        font-size: 20px;
    }

    .stock-info-table th,
    .stock-info-table td {
        padding: 8px;
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .main-header {
        padding: 10px;
    }

    .nav-dropdown {
        padding-top: 50px;
    }

    .nav-dropdown a {
        padding: 10px 15px;
        font-size: 15px;
    }

    .hamburger-menu-close {
        top: 15px;
        right: 15px;
    }
    .stock-info-table th,
    .stock-info-table td {
        padding: 8px;
        font-size: 10px;
    }
} 







