/* ====================================
   通用樣式 (Common Styles)
   ==================================== */
body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f5f5f5;
}

.btn {
    padding: 5px 15px;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s;
}

.btn:hover {
    opacity: 0.9;
}

.btn-primary {
    background: #2196F3;
    color: white;
}

.btn-success {
    background: #4CAF50;
    color: white;
}

.btn-danger {
    background: #f44336;
    color: white;
}

.btn-warning {
    background: #ff9800;
    color: white;
}

/* ====================================
   登入頁面樣式 (Login Page)
   ==================================== */
.login-body {
    max-width: 400px;
    margin: 100px auto;
    padding: 20px;
}

.login-container {
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.login-container h2 {
    text-align: center;
    color: #333;
    margin-bottom: 30px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    color: #555;
    font-weight: bold;
}

.form-group input[type="text"] {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    box-sizing: border-box;
    font-size: 16px;
}

.form-group input[type="text"]:focus {
    border-color: #4CAF50;
    outline: none;
}

.login-btn {
    width: 100%;
    padding: 12px;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.login-btn:hover {
    background-color: #45a049;
}

.error-message {
    color: #d32f2f;
    text-align: center;
    margin-top: 10px;
    display: none;
}

.loading {
    display: none;
    text-align: center;
    margin-top: 10px;
    color: #666;
}

/* ====================================
   主頁面樣式 (Dashboard)
   ==================================== */
.header {
    background: white;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
}

.welcome-message {
    color: #333;
    font-size: 18px;
}

.user-info {
    background: #4CAF50;
    color: white;
    padding: 10px 20px;
    border-radius: 5px;
}

.logout-btn {
    background: #f44336;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    margin-left: 10px;
}

.logout-btn:hover {
    background: #d32f2f;
}

/* 頁籤樣式 */
.main-container {
    margin-top: 80px;
    padding: 20px 70px;
}

.tab-container {
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    overflow: hidden;
}

.tab-nav {
    display: flex;
    background: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
}

.tab-btn {
    flex: 1;
    padding: 15px 20px;
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: #6c757d;
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent;
}

.tab-btn:hover {
    background: #e9ecef;
    color: #495057;
}

.tab-btn.active {
    background: white;
    color: #4CAF50;
    border-bottom-color: #4CAF50;
}

.tab-content {
    padding: 0;
    min-height: 450px;
    position: relative;
}

.tab-iframe {
    width: 100%;
    height: 500px;
    min-height: 800px;
    border: none;
    display: none;
}

.tab-iframe.active {
    display: block;
}

/* ====================================
   專案資訊頁面 (Project Info)
   ==================================== */
.project-container {
    max-width: 100%;
    margin: 0 auto;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    padding: 30px;
}

.project-info {
    background: #e3f2fd;
    padding: 20px;
    border-radius: 5px;
    margin-bottom: 30px;
}

.project-info h3 {
    margin-top: 0;
    color: #1976d2;
}

/* Token 使用統計樣式 */
.token-usage {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 1px solid #e9ecef;
}

.token-usage h3 {
    margin-top: 0;
    color: #495057;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.refresh-btn {
    background: #17a2b8;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s;
}

.refresh-btn:hover {
    background: #138496;
}

.stats-container {
    margin-top: 15px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.stat-card {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    border-left: 4px solid #007bff;
    transition: transform 0.2s;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.stat-card h4 {
    margin: 0 0 10px 0;
    color: #333;
    font-size: 16px;
}

.stat-value {
    font-size: 28px;
    font-weight: bold;
    color: #007bff;
    margin: 10px 0;
}

.stat-label {
    color: #666;
    font-size: 14px;
    margin-bottom: 5px;
}

.stat-time {
    color: #999;
    font-size: 12px;
    margin-top: 10px;
}

.loading {
    text-align: center;
    color: #666;
    padding: 20px;
    font-style: italic;
}

.error {
    color: #dc3545;
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    padding: 10px;
    border-radius: 4px;
    text-align: center;
}

.no-data {
    text-align: center;
    color: #666;
    padding: 20px;
    font-style: italic;
    background: #f8f9fa;
    border-radius: 4px;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.info-card {
    background: #fafafa;
    padding: 20px;
    border-radius: 5px;
    border: 1px solid #ddd;
}

.info-card h4 {
    margin: 0 0 10px 0;
    color: #333;
}

.info-value {
    font-size: 18px;
    font-weight: bold;
    color: #4CAF50;
}

.session-data {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 5px;
    margin-top: 20px;
}

.session-data h4 {
    margin-top: 0;
}

.session-data pre {
    background: white;
    padding: 15px;
    border-radius: 3px;
    border: 1px solid #ddd;
    overflow-x: auto;
}

/* ====================================
   對話框頁面 (Chat)
   ==================================== */
.chat-container {
    max-width: 800px;
    margin: 0 auto;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    height: calc(100vh - 40px);
    display: flex;
    flex-direction: column;
}

.chat-header {
    padding: 20px;
    background: #4CAF50;
    color: white;
    border-radius: 10px 10px 0 0;
}

.chat-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
}

.chat-input {
    padding: 20px;
    border-top: 1px solid #ddd;
    display: flex;
    gap: 10px;
}

.chat-input input {
    flex: 1;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
}

.chat-input button {
    padding: 10px 20px;
    background: #4CAF50;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

.message {
    margin-bottom: 15px;
    padding: 10px;
    border-radius: 5px;
}

.user-message {
    background: #e3f2fd;
    margin-left: 20%;
}

.bot-message {
    background: #f5f5f5;
    margin-right: 20%;
}

/* ====================================
   對話紀錄頁面 (Chat History)
   ==================================== */
.history-container {
    max-width: 100%;
    margin: 0 auto;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    padding: 30px;
}

.history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 1px solid #ddd;
}

.search-bar {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.search-bar input {
    flex: 1;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
}

.search-bar button {
    padding: 10px 20px;
    background: #4CAF50;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

.history-item {
    border: 1px solid #ddd;
    border-radius: 5px;
    margin-bottom: 15px;
    padding: 20px;
    background: #fafafa;
}

.history-item h4 {
    margin: 0 0 10px 0;
    color: #333;
}

.history-meta {
    font-size: 0.9rem;
    color: #666;
    margin: 4px 0 8px;
}

.history-preview {
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.6;
}

.view-btn {
    background: #2196F3;
    color: white;
    border: none;
    padding: 5px 15px;
    border-radius: 3px;
    cursor: pointer;
    margin-top: 10px;
}

/* ====================================
   Prompt設定頁面 (Prompt Settings)
   ==================================== */
.prompt-container {
    max-width: 1000px;
    margin: 0 auto;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    padding: 30px;
}

.prompt-header {
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 1px solid #ddd;
}

.prompt-section {
    margin-bottom: 30px;
}

.prompt-section h3 {
    color: #333;
    margin-bottom: 15px;
}

.prompt-template {
    border: 1px solid #ddd;
    border-radius: 5px;
    margin-bottom: 15px;
    padding: 20px;
    background: #fafafa;
}

.template-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.template-name {
    font-weight: bold;
    color: #333;
}

.template-actions {
    display: flex;
    gap: 10px;
}

.btn-edit {
    background: #2196F3;
    color: white;
}

.btn-delete {
    background: #f44336;
    color: white;
}

.btn-add {
    background: #4CAF50;
    color: white;
    padding: 10px 20px;
    margin-bottom: 20px;
}

.template-content {
    background: white;
    padding: 15px;
    border-radius: 3px;
    border-left: 4px solid #4CAF50;
    font-family: monospace;
    white-space: pre-wrap;
    line-height: 1.5;
}

.template-usage {
    margin-top: 10px;
    color: #666;
    font-size: 14px;
}

/* ====================================
   文件上傳頁面 (File Upload)
   ==================================== */
.upload-container {
    max-width: 100%;
    margin: 0 auto;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    padding: 1em;
}

.upload-header {
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 1px solid #ddd;
}

.upload-area {
    border: 2px dashed #4CAF50;
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    background: #f9fff9;
    margin-bottom: 30px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.upload-area:hover {
    background: #f0fff0;
}

.upload-area.dragover {
    background: #e8f5e8;
    border-color: #2e7d32;
}

.upload-icon {
    font-size: 48px;
    color: #4CAF50;
    margin-bottom: 15px;
}

.upload-text {
    font-size: 18px;
    color: #333;
    margin-bottom: 10px;
}

.upload-hint {
    color: #666;
    font-size: 14px;
}

.file-input {
    display: none;
}

.file-list {
    margin-top: 20px;
}

.file-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    margin-bottom: 10px;
    background: #fafafa;
}

.file-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.file-icon {
    font-size: 24px;
}

.file-details {
    display: flex;
    flex-direction: column;
}

.file-name {
    font-weight: bold;
    color: #333;
}

.file-size {
    color: #666;
    font-size: 14px;
}

.file-actions {
    display: flex;
    gap: 10px;
}

.btn-remove {
    background: #f44336;
    color: white;
}

.btn-upload {
    background: #4CAF50;
    color: white;
    padding: 10px 30px;
    font-size: 16px;
}

.file-description {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.file-description label {
    display: block;
    font-weight: bold;
    color: #555;
    margin-bottom: 5px;
    font-size: 14px;
}

.file-description textarea {
    width: 100%;
    margin-top: 5px;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    resize: vertical;
    font-family: inherit;
    font-size: 14px;
    line-height: 1.4;
    box-sizing: border-box;
}

.file-description textarea:focus {
    outline: none;
    border-color: #4CAF50;
    box-shadow: 0 0 0 2px rgba(76, 175, 80, 0.2);
}

.file-description textarea::placeholder {
    color: #999;
    font-style: italic;
}

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

.progress-fill {
    height: 100%;
    background: #4CAF50;
    width: 0%;
    transition: width 0.3s;
}

/* ====================================
   文件查閱頁面 (File View)
   ==================================== */
.view-container {
    max-width: 100%;
    margin: 0 auto;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    padding: 30px;
}

.view-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 1px solid #ddd;
}

.view-header h2 {
    margin: 0;
    color: #333;
}

.view-header p {
    margin: 5px 0 0 0;
    color: #666;
    font-size: 14px;
}

/* 文件選擇器樣式 */
.file-selector {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.file-selector label {
    font-weight: bold;
    color: #495057;
    white-space: nowrap;
}

.file-selector select {
    flex: 1;
    padding: 10px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    background: white;
    font-size: 14px;
}

.file-selector select:focus {
    outline: none;
    border-color: #4CAF50;
    box-shadow: 0 0 0 2px rgba(76, 175, 80, 0.2);
}

.btn-refresh {
    background: #17a2b8;
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    white-space: nowrap;
}

.btn-refresh:hover {
    background: #138496;
}

/* 資料表格樣式 */
.data-table-container {
    margin-top: 20px;
}

.data-table-container h3 {
    margin: 0 0 15px 0;
    color: #333;
}

.table-info {
    margin-bottom: 15px;
    color: #666;
    font-size: 14px;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.data-table thead {
    background: #495057;
    color: white;
}

.data-table th,
.data-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #dee2e6;
}

.data-table th {
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.data-table tr:hover {
    background: #f8f9fa;
}

.data-table tr:last-child td {
    border-bottom: none;
}

.text-content {
    max-width: 300px;
    word-wrap: break-word;
    line-height: 1.4;
}

.metadata-content {
    max-width: 200px;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    background: #f8f9fa;
    padding: 8px;
    border-radius: 4px;
    word-wrap: break-word;
}

.type-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    text-transform: capitalize;
}

.type-paragraph {
    background: #d4edda;
    color: #155724;
}

.type-requirement {
    background: #cce5ff;
    color: #004085;
}

.type-technical {
    background: #fff3cd;
    color: #856404;
}

.type-design {
    background: #f8d7da;
    color: #721c24;
}

.no-data {
    text-align: center;
    color: #666;
    font-style: italic;
    padding: 40px;
}

.search-filter {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.search-filter input, .search-filter select {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
}

.search-filter input {
    flex: 1;
    min-width: 200px;
}

.file-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.file-card {
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    background: #fafafa;
    transition: box-shadow 0.3s;
    cursor: pointer;
}

.file-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.file-card-header {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.file-title {
    font-weight: bold;
    color: #333;
    margin: 0;
}

.file-meta {
    color: #666;
    font-size: 14px;
    margin-bottom: 10px;
}

.file-description {
    color: #555;
    font-size: 14px;
    line-height: 1.4;
    margin-bottom: 15px;
}

.btn-view {
    background: #2196F3;
    color: white;
}

.btn-download {
    background: #4CAF50;
    color: white;
}

.file-stats {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 5px;
    margin-bottom: 20px;
}

.stats-item {
    text-align: center;
}

.stats-number {
    font-size: 24px;
    font-weight: bold;
    color: #333;
}

.stats-label {
    color: #666;
    font-size: 14px;
}

/* ====================================
   響應式設計 (Responsive Design)
   ==================================== */
@media (max-width: 768px) {
    .main-container {
        margin-top: 70px;
        padding: 20px 70px;
    }
    
    .tab-nav {
        flex-wrap: wrap;
    }
    
    .tab-btn {
        flex: none;
        min-width: 120px;
    }
    
    .header {
        padding: 15px;
        flex-direction: column;
        gap: 10px;
    }
    
    .welcome-message {
        font-size: 16px;
    }
    
    .search-filter {
        flex-direction: column;
    }
    
    .file-grid {
        grid-template-columns: 1fr;
    }
    
    .info-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .login-body {
        margin: 50px auto;
        padding: 10px;
    }
    
    .login-container {
        padding: 20px;
    }
    
    .tab-iframe {
        height: 500px;
    }
}

/* ====================================
   模型設定頁面樣式 (Model Settings)
   ==================================== */

/* 統一表單樣式 */
.card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    overflow: hidden;
    margin-bottom: 20px;
    border: 1px solid #e9ecef;
}

.card-header {
    background: linear-gradient(135deg, #4CAF50, #45a049);
    color: white;
    padding: 20px 30px;
    border-bottom: none;
}

.card-title {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.card-body {
    padding: 30px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-weight: 600;
    font-size: 14px;
}

.form-control, .form-select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
    background: white;
    box-sizing: border-box;
}

.form-control:focus, .form-select:focus {
    outline: none;
    border-color: #4CAF50;
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.1);
}

.form-control[readonly] {
    background-color: #f8f9fa;
    color: #6c757d;
}

textarea.form-control {
    resize: vertical;
    min-height: 15em;
}

/* 網格系統 */
.row {
    display: flex;
    margin: 0 -10px;
}

.col-md-6 {
    flex: 0 0 calc(50% - 20px);
    margin: 0 10px;
}

.mb-4 {
    margin-bottom: 1.5rem;
}

/* 拉桿樣式 */
.form-range {
    width: 100%;
    height: 6px;
    padding: 0;
    background: #e9ecef;
    border: none;
    outline: none;
    appearance: none;
    -webkit-appearance: none;
    margin: 15px 0;
    border-radius: 3px;
}

/* Webkit 瀏覽器 (Chrome, Safari) */
.form-range::-webkit-slider-track {
    width: 100%;
    height: 6px;
    background: #e9ecef;
    border-radius: 3px;
    border: none;
}

.form-range::-webkit-slider-thumb {
    appearance: none;
    -webkit-appearance: none;
    height: 20px;
    width: 20px;
    border-radius: 50%;
    background: #4CAF50;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
}

.form-range::-webkit-slider-thumb:hover {
    background: #45a049;
    transform: scale(1.1);
}

/* Firefox 瀏覽器 */
.form-range::-moz-range-track {
    width: 100%;
    height: 6px;
    background: #e9ecef;
    border-radius: 3px;
    border: none;
}

.form-range::-moz-range-thumb {
    height: 20px;
    width: 20px;
    border-radius: 50%;
    background: #4CAF50;
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

/* Edge/IE 瀏覽器 */
.form-range::-ms-track {
    width: 100%;
    height: 6px;
    background: #e9ecef;
    border-color: transparent;
    color: transparent;
    border-radius: 3px;
}

.form-range::-ms-fill-lower {
    background: #4CAF50;
    border-radius: 3px;
}

.form-range::-ms-fill-upper {
    background: #e9ecef;
    border-radius: 3px;
}

.form-range::-ms-thumb {
    height: 20px;
    width: 20px;
    border-radius: 50%;
    background: #4CAF50;
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

/* Switch 樣式 */
.form-check {
    padding-left: 0;
    margin-bottom: 10px;
}

.form-check-input {
    width: 50px;
    height: 25px;
    margin: 0;
    border-radius: 25px;
    background-color: #e9ecef;
    border: none;
    position: relative;
    appearance: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.form-check-input:checked {
    background-color: #4CAF50;
}

.form-check-input::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 21px;
    height: 21px;
    background: white;
    border-radius: 50%;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.form-check-input:checked::after {
    transform: translateX(25px);
}

.form-check-label {
    margin-left: 15px;
    color: #333;
    font-weight: 500;
    cursor: pointer;
}

/* Badge 樣式 */
.badge {
    display: inline-block;
    padding: 4px 8px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 6px;
    margin-left: 10px;
}

.bg-primary {
    background-color: #4CAF50;
    color: white;
}

/* 按鈕樣式增強 */
.btn-primary {
    background: linear-gradient(135deg, #4CAF50, #45a049);
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #45a049, #3d8b40);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(108, 117, 125, 0.3);
}

/* 輔助類別 */
.d-flex {
    display: flex;
}

.gap-2 {
    gap: 0.5rem;
}

.mt-4 {
    margin-top: 1.5rem;
}

/* Mine Type 區域樣式 */
#mimeTypeSection {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

#mimeTypeSection .form-check {
    margin-bottom: 15px;
}

#mimeTypeSection .form-check-input {
    width: 18px;
    height: 18px;
    border-radius: 4px;
    background-color: white;
    border: 2px solid #e9ecef;
}

#mimeTypeSection .form-check-input:checked {
    background-color: #4CAF50;
    border-color: #4CAF50;
}

#mimeTypeSection .form-check-input::after {
    content: '✓';
    position: absolute;
    top: -2px;
    left: 2px;
    font-size: 12px;
    color: white;
    width: auto;
    height: auto;
    background: none;
    border-radius: 0;
    transform: none;
    box-shadow: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

#mimeTypeSection .form-check-input:checked::after {
    opacity: 1;
    transform: none;
}

#mimeTypeSection .form-check-label {
    margin-left: 10px;
}

.hidden {
    display: none;
}
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}
th,td {
    border: 1px solid #ccc;
    padding: 8px;
    text-align: left;
    vertical-align: top;
}
td textarea {
    width: 100%;
    resize: vertical;
}
td button {
    padding: 4px 8px;
}
.thumb {
    cursor: pointer;
    font-size: 1.2em;
}
.thumb {
    cursor: not-allowed; /* 預設不能點 */
    font-size: 1.2em;
    margin-right: 6px;
    opacity: 0.3;
}
.thumb.enabled {
    cursor: pointer;
    opacity: 0.5;
}
.thumb.enabled.active {
    opacity: 1;
    font-weight: bold;
}
.review {
    width: 100%;
    resize: vertical;
    display: none; /* 預設隱藏 */
}
/* 響應式設計 */
@media (max-width: 768px) {
    .row {
        flex-direction: column;
        margin: 0;
    }
    
    .col-md-6 {
        flex: none;
        margin: 0 0 20px 0;
    }
    
    .card-body {
        padding: 20px;
    }
    
    .d-flex {
        flex-direction: column;
    }
    
    .d-flex .btn {
        margin-bottom: 10px;
    }
}
