body {
    background-color: #f0f2f5; /* 更柔和的背景色 */
    font-family: 'Noto Sans TC', 'Microsoft JhengHei', sans-serif; /* 優先使用 Noto Sans TC */
    color: #333;
    padding-bottom: 3rem; /* 底部留白 */
}

.container {
    max-width: 1200px; /* 稍微加寬容器 */
}

h1 {
    color: #1a3b5d; /* 深藍色標題 */
    font-weight: 600;
}

.content-card {
    background-color: #fff;
    border: none; /* 移除邊框 */
    border-radius: 8px; /* 更大的圓角 */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08); /* 更明顯的陰影 */
    height: 100%; 
    display: flex; /* 確保 flex 佈局 */
    flex-direction: column;
}

.content-card .card-header {
    background-color: #fff;
    border-bottom: 1px solid #e9ecef; /* 淺灰色分隔線 */
    padding: 0.75rem 1.25rem; 
    font-weight: 500;
    color: #495057;
}

.content-card .card-header .btn-sm {
    padding: 0.3rem 0.6rem;
    font-size: 0.8rem;
    margin-left: 0.5rem;
    border-radius: 5px; /* 按鈕圓角 */
    transition: background-color 0.2s ease, box-shadow 0.2s ease;
}

.content-card .card-header .btn-primary {
    background-color: #007bff; 
    border-color: #007bff;
}
.content-card .card-header .btn-primary:hover {
    background-color: #0056b3;
    border-color: #0056b3;
    box-shadow: 0 2px 4px rgba(0, 123, 255, 0.3);
}
.content-card .card-header .btn-secondary {
    background-color: #6c757d;
    border-color: #6c757d;
}
.content-card .card-header .btn-secondary:hover {
    background-color: #5a6268;
    border-color: #545b62;
    box-shadow: 0 2px 4px rgba(108, 117, 125, 0.3);
}

.content-card .card-body {
    padding: 1.25rem;
    /* height: calc(100% - 58px); */ /* 自動高度，因為 card 是 flex column */
    flex-grow: 1; /* 讓 body 填滿剩餘空間 */
    overflow-y: auto; /* Body 內部滾動 */
}

.content-area {
    /* min-height: 300px; - 由 flex 控制高度 */
    font-size: 1rem;
    line-height: 1.7; /* 增加行高提高可讀性 */
    white-space: pre-wrap;
    word-wrap: break-word;
    width: 100%; /* 確保填滿 */
    outline: none; /* 移除預設 outline */
    color: #495057; /* 輸入文字顏色 */
}

.editable-area {
    border: 1px solid #d1d9e6;
    border-radius: 6px;
    padding: 1rem;
    background-color: #fff;
    cursor: text;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.editable-area:focus {
    border-color: #80bdff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.editable-area[placeholder]:empty::before {
    content: attr(placeholder);
    color: #adb5bd; /* Placeholder 顏色調淺 */
    cursor: text;
}

#analysisResult {
    font-size: 0.9rem;
}

#analysisResult .analysis-summary > p {
    font-weight: 500;
    margin-bottom: 1rem; /* 標題與列表間距 */
    color: #6c757d;
}
#analysisResult .analysis-summary > p i {
    margin-right: 0.5rem;
}

#analysisResult .list-group-item {
    border-top: none; /* 移除 list-group 預設上邊框 */
    border-left: none;
    border-right: none;
    border-bottom: 1px solid #f1f3f5; /* 更淺的列表分隔線 */
    padding: 0.8rem 0.2rem; /* 調整列表項 padding */
}
#analysisResult .list-group-item:last-child {
    border-bottom: none;
}

#analysisResult .risk-word {
    color: #343a40; /* 敏感詞文字顏色 */
}

#analysisResult .suggestion {
    font-size: 0.85rem;
    color: #868e96; /* 建議文字顏色 */
}

#analysisResult .text-success i {
    color: #198754;
}

.highlight {
    padding: 0.15em 0.4em;
    border-radius: 4px;
    font-weight: 500; /* 稍細一點 */
    cursor: pointer; /* 改為 pointer */
    transition: background-color 0.2s ease;
    margin: 0 1px; /* 輕微間隔避免黏在一起 */
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.highlight-high {
    background-color: rgba(220, 53, 69, 0.15); /* 更淡的背景，帶透明度 */
    color: #dc3545;
    border: 1px solid rgba(220, 53, 69, 0.3);
}
.highlight-high:hover {
    background-color: rgba(220, 53, 69, 0.3);
}

.highlight-medium {
    background-color: rgba(255, 193, 7, 0.15);
    color: #ffc107;
    border: 1px solid rgba(255, 193, 7, 0.3);
}
.highlight-medium:hover {
    background-color: rgba(255, 193, 7, 0.3);
}

.highlight-low {
    background-color: rgba(13, 202, 240, 0.15);
    color: #0dcaf0;
    border: 1px solid rgba(13, 202, 240, 0.3);
}
.highlight-low:hover {
    background-color: rgba(13, 202, 240, 0.3);
}

.btn-info {
    background-color: #17a2b8;
    border-color: #17a2b8;
    color: #fff;
    transition: background-color 0.2s ease, box-shadow 0.2s ease;
}
.btn-info:hover {
    background-color: #138496;
    border-color: #117a8b;
    color: #fff;
    box-shadow: 0 2px 4px rgba(23, 162, 184, 0.3);
}
.btn-info i {
    margin-right: 0.3rem;
}

.modal-content {
    border-radius: 8px;
    border: none;
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
}

.modal-header {
    background-color: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
    padding: 1rem 1.5rem;
}

.modal-title {
    font-weight: 500;
    color: #343a40;
}

.modal-body {
    padding: 1.5rem;
    max-height: 70vh;
}

.modal-footer {
    background-color: #f8f9fa;
    border-top: 1px solid #dee2e6;
    padding: 0.75rem 1.5rem;
}

#sensitiveWordsTableBody td {
    vertical-align: middle;
    word-break: break-word; /* 改為 break-word */
    font-size: 0.9rem;
    color: #495057;
}
#sensitiveWordsTableBody .badge {
    font-weight: 500;
}
#sensitiveWordsTableBody .btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.8rem;
    margin: 0 2px; /* 微調按鈕間距 */
}

#editWordForm .form-label {
    font-weight: 500;
    color: #495057;
    margin-bottom: 0.3rem;
}
#editWordForm .form-control, 
#editWordForm .form-select {
    border-radius: 5px;
    border-color: #d1d9e6;
}
#editWordForm .form-control:focus, 
#editWordForm .form-select:focus {
     border-color: #80bdff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

#editWordMessage .alert {
    margin-bottom: 0;
    padding: 0.8rem 1rem;
    border-radius: 5px;
}

.badge {
    font-size: 0.75rem;
    padding: 0.4em 0.7em;
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* 風險等級文字 (分析列表用 - 不再需要單獨的 risk-*, 使用 badge) */
/* .risk-high, .risk-medium, .risk-low { ... } */ 