/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: #f8f9fa; /* 淡淡的灰色背景 */
    min-height: 100vh;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header Styles */
.header {
    background: #ffffff;
    backdrop-filter: none;
    border-bottom: 1px solid #e5e5e5;
    padding: 12px 0;
    margin-bottom: 20px;
    border-radius: 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    min-height: 60px;
}

.logo h1 {
    font-size: 22px;
    font-weight: 600;
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin: 0;
}

.logo .subtitle {
    font-size: 14px;
    color: #666666;
    font-weight: 400;
    margin: 4px 0 0 0;
    display: block;
}

.welcome-text {
    font-size: 16px;
    color: #555;
    font-weight: 500;
}

/* Main Content */
.main-content {
    flex: 1;
    padding: 20px 0;
}

/* Main Header */
.main-header {
    background: #ffffff;
    backdrop-filter: none;
    border-radius: 12px;
    margin-bottom: 30px;
    border: 1px solid #e0e0e0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.main-header .header-content {
    padding: 30px;
}

.title-section {
    text-align: center;
    margin-bottom: 30px;
}

.title-section h1 {
    font-size: 32px;
    font-weight: 700;
    color: #374151;
    margin-bottom: 10px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.title-section p {
    font-size: 16px;
    color: #333333;
    margin: 0;
}

/* Controls Section */
.controls-section {
    display: flex;
    gap: 20px;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
}

.search-container {
    position: relative;
    min-width: 300px;
}

.search-container input {
    width: 100%;
    padding: 12px 45px 12px 15px;
    border: 2px solid #dddddd;
    border-radius: 25px;
    background: #ffffff;
    color: #333333;
    font-size: 14px;
    backdrop-filter: none;
    transition: all 0.3s ease;
}

.search-container input::placeholder {
    color: #777777;
}

.search-container input:focus {
    outline: none;
    border-color: #888888;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.search-container .search-icon {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    color: #777777;
    pointer-events: none;
}


.filter-container select {
    padding: 12px 15px;
    border: 2px solid #d1d5db;
    border-radius: 25px;
    background: #ffffff;
    color: #374151;
    font-size: 14px;
    backdrop-filter: blur(10px);
    min-width: 180px;
    cursor: pointer;
}

.filter-container select option {
    background: #ffffff;
    color: #374151;
}

.display-mode-container {
    display: flex;
    align-items: center;
    gap: 8px;
}

.display-mode-container label {
    font-size: 14px;
    font-weight: 500;
    color: #333333;
    white-space: nowrap;
}

#display-mode {
    padding: 8px 12px;
    background: #ffffff;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
    color: #374151;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 120px;
}

#display-mode:hover {
    background: #f9fafb;
    border-color: #9ca3af;
}

#display-mode:focus {
    outline: none;
    box-shadow: 0 0 0 2px #3b82f650;
}

#display-mode option {
    background: #ffffff;
    color: #374151;
}



/* System Groups */
.system-group {
    margin-bottom: 50px;
}

.group-header {
    text-align: center;
    margin-bottom: 30px;
    padding: 0 20px;
}

.group-title {
    font-size: 28px;
    font-weight: 700;
    color: #374151;
    margin-bottom: 10px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.group-description {
    font-size: 16px;
    color: #555555;
    margin: 0;
    font-weight: 400;
}

/* 原有群組隱藏 */
.system-group {
    display: none;
}

/* 統一系統網格 */
.unified-systems-container {
    margin-top: 30px;
}

.display-section {
    width: 100%;
}

/* 分組顯示樣式 */
.group-section {
    margin-bottom: 40px;
}

.group-section .group-header {
    background: #ffffff;
    backdrop-filter: none;
    border-radius: 10px;
    padding: 12px 16px;
    margin-bottom: 15px;
    border: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    transition: all 0.3s ease;
    user-select: none;
}

.group-section .group-header:hover {
    background: #f9fafb;
    transform: translateY(-1px);
}

.group-section .group-header-content {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.group-section .group-title {
    font-size: 16px;
    font-weight: 600;
    color: #374151;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.group-section .group-description {
    font-size: 12px;
    color: #6b7280;
    margin: 0;
    background: #f3f4f6;
    padding: 2px 8px;
    border-radius: 12px;
    font-weight: 500;
}

.group-section .group-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #e5e7eb;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.group-section .group-toggle svg {
    width: 12px;
    height: 12px;
    stroke: #374151;
    transition: transform 0.3s ease;
}

.group-section.collapsed .group-toggle svg {
    transform: rotate(-90deg);
}

.group-section .group-content {
    transition: all 0.3s ease;
    overflow: hidden;
}

.group-section.collapsed .group-content {
    max-height: 0;
    opacity: 0;
    margin-top: 0;
    padding-top: 0;
}

/* 表格顯示樣式 */
.table-container {
    background: #ffffff;
    backdrop-filter: none;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border: 1px solid #e0e0e0;
    overflow-x: auto;
}

.systems-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.systems-table th {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
    padding: 15px 12px;
    text-align: left;
    font-weight: 600;
    border: none;
    position: sticky;
    top: 0;
    z-index: 10;
}

.systems-table th:first-child {
    border-radius: 8px 0 0 8px;
}

.systems-table th:last-child {
    border-radius: 0 8px 8px 0;
}

.systems-table td {
    padding: 12px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    vertical-align: middle;
}

.systems-table tr:hover {
    background: rgba(102, 126, 234, 0.05);
}

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

.table-system-name {
    font-weight: 600;
    color: #333;
    display: flex;
    align-items: center;
    gap: 10px;
}

.table-system-icon {
    width: 24px;
    height: 24px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.table-system-icon svg {
    width: 14px;
    height: 14px;
}

.table-group-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
}

.table-status-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.table-status-badge.active {
    background: linear-gradient(135deg, #56ab2f 0%, #a8e6cf 100%);
    color: #ffffff;
}

.table-status-badge.mcp {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
}

.table-status-badge.開發中,
.table-status-badge.developing {
    background: linear-gradient(135deg, #ffa726 0%, #ff9800 100%);
    color: #ffffff;
}

.table-status-badge.transparent {
    background: transparent;
    color: transparent;
    border: none;
}

.table-description {
    max-width: 300px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #666;
    line-height: 1.4;
}

.table-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.table-favorite-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    border-radius: 6px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.table-favorite-btn svg {
    width: 16px;
    height: 16px;
    stroke: #ccc;
    fill: none;
    transition: all 0.3s ease;
}

.table-favorite-btn:hover svg {
    stroke: #ffd700;
}

.table-favorite-btn.active svg {
    stroke: #ffd700;
    fill: #ffd700;
}

.table-link-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
    border: none;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.table-link-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.table-link-btn svg {
    width: 12px;
    height: 12px;
}

.systems-grid-unified {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 15px;
    margin-bottom: 40px;
    padding-top: 60px; /* 為第一行 tooltip 預留空間 */
}

/* Services Grid (舊版) */
.services-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
    margin-bottom: 40px;
}

/* Group-specific styling */
.development-group {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1));
    border-radius: 20px;
    padding: 20px;
    border: 1px solid rgba(102, 126, 234, 0.2);
}

.business-group {
    background: linear-gradient(135deg, rgba(33, 150, 243, 0.1), rgba(3, 169, 244, 0.1));
    border-radius: 20px;
    padding: 20px;
    border: 1px solid rgba(33, 150, 243, 0.2);
}

.employee-group {
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.1), rgba(139, 195, 74, 0.1));
    border-radius: 20px;
    padding: 20px;
    border: 1px solid rgba(76, 175, 80, 0.2);
}

.mcp-group {
    background: linear-gradient(135deg, rgba(156, 39, 176, 0.1), rgba(233, 30, 99, 0.1));
    border-radius: 20px;
    padding: 20px;
    border: 1px solid rgba(156, 39, 176, 0.2);
}

.energy-group {
    background: linear-gradient(135deg, rgba(255, 193, 7, 0.1), rgba(255, 152, 0, 0.1));
    border-radius: 20px;
    padding: 20px;
    border: 1px solid rgba(255, 193, 7, 0.2);
}

.external-group {
    background: linear-gradient(135deg, rgba(0, 188, 212, 0.1), rgba(76, 175, 80, 0.1));
    border-radius: 20px;
    padding: 20px;
    border: 1px solid rgba(0, 188, 212, 0.2);
}

/* 響應式設計 */
@media (max-width: 1400px) {
    .systems-grid-unified {
        grid-template-columns: repeat(5, 1fr);
    }
    .services-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 1100px) {
    .systems-grid-unified {
        grid-template-columns: repeat(4, 1fr);
    }
    .services-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 800px) {
    .systems-grid-unified {
        grid-template-columns: repeat(3, 1fr);
        gap: 12px;
    }
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    .controls-section {
        flex-direction: column;
        gap: 15px;
    }
    .search-container {
        min-width: 100%;
    }
}

@media (max-width: 500px) {
    .systems-grid-unified {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    .services-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    .title-section h1 {
        font-size: 24px;
    }
    .service-card {
        min-height: 100px;
        max-height: 120px;
    }
}

/* 我的最愛和無結果樣式 */
.favorites-section {
    margin-top: 30px;
}

.no-results {
    text-align: center;
    padding: 60px 20px;
    color: #777777;
}

.no-results svg {
    width: 60px;
    height: 60px;
    margin-bottom: 20px;
    opacity: 0.5;
}

.no-results h3 {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 10px;
    color: #666666;
}

.no-results p {
    font-size: 16px;
    color: #888888;
}

/* 卡片標題和最愛按鈕 */
.card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 8px;
}

.card-actions {
    display: flex;
    align-items: center;
    gap: 4px;
}

.favorite-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    border-radius: 50%;
    transition: all 0.3s ease;
    color: rgba(0, 0, 0, 0.3);
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.favorite-btn svg {
    width: 14px;
    height: 14px;
}

.favorite-btn:hover {
    background: rgba(255, 193, 7, 0.1);
    color: #FFC107;
    transform: scale(1.1);
}

.favorite-btn.active {
    color: #FFC107;
    background: rgba(255, 193, 7, 0.1);
}

.favorite-btn.active svg {
    fill: currentColor;
}

/* 教學按鈕樣式 */
.tutorial-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    border-radius: 50%;
    transition: all 0.3s ease;
    color: rgba(0, 0, 0, 0.3);
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tutorial-btn svg {
    width: 14px;
    height: 14px;
}

.tutorial-btn:hover {
    background: rgba(33, 150, 243, 0.1);
    color: #2196F3;
    transform: scale(1.1);
}

/* 無最愛樣式 */
.no-favorites {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: #777777;
}

.no-favorites svg {
    width: 60px;
    height: 60px;
    margin-bottom: 20px;
    opacity: 0.5;
    color: #999999;
}

.no-favorites h3 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 10px;
    color: #666666;
}

.no-favorites p {
    font-size: 14px;
    color: #888888;
}

/* Tooltip 樣式 */
.tooltip-wrapper {
    position: relative;
    width: 100%;
    z-index: 999998; /* 確保 wrapper 也在高層級 */
}

/* 當 tooltip 顯示時，確保 wrapper 有最高層級 */
.tooltip-wrapper:hover {
    z-index: 999999;
}

/* 預設 tooltip（右側顯示） */
.tooltip {
    visibility: hidden;
    opacity: 0;
    position: absolute;
    top: 50%;
    left: 100%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.98); /* 增加不透明度 */
    color: #333;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 13px;
    line-height: 1.5;
    white-space: normal;
    max-width: 280px;
    min-width: 180px;
    z-index: 999999; /* 提高到更高的層級 */
    transition: all 0.3s ease;
    pointer-events: none;
    margin-left: 12px; /* 增加間距避免被遮擋 */
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3); /* 增強陰影使其更突出 */
    border: 2px solid rgba(255, 255, 255, 0.8); /* 增強邊框 */
    backdrop-filter: blur(10px); /* 背景模糊確保可讀性 */
}

/* 右側 tooltip 箭頭 */
.tooltip::after {
    content: "";
    position: absolute;
    top: 50%;
    right: 100%;
    transform: translateY(-50%);
    border: 8px solid transparent;
    border-right-color: rgba(255, 255, 255, 0.98); /* 配合背景色 */
    z-index: 1000000; /* 確保箭頭也在最上層 */
}

/* 左側 tooltip（給最右邊的卡片使用） */
.tooltip-left {
    left: auto;
    right: 100%;
    margin-left: 0;
    margin-right: 12px;
}

/* 左側 tooltip 箭頭 */
.tooltip-left::after {
    right: auto;
    left: 100%;
    border-right-color: transparent;
    border-left-color: rgba(255, 255, 255, 0.98); /* 配合背景色 */
    z-index: 1000000; /* 確保箭頭也在最上層 */
}

.service-card:hover .tooltip,
.tooltip-wrapper:hover .tooltip {
    visibility: visible;
    opacity: 1;
    transform: translateY(-50%) translateX(5px); /* 向右移動 */
}

/* 左側 tooltip hover 效果 */
.service-card:hover .tooltip-left,
.tooltip-wrapper:hover .tooltip-left {
    transform: translateY(-50%) translateX(-5px); /* 向左移動 */
}

.service-card {
    background: #ffffff;
    backdrop-filter: none;
    border-radius: 12px;
    padding: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid #e0e0e0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08), 0 4px 16px rgba(0, 0, 0, 0.08);
    position: relative;
    overflow: visible; /* 改為 visible 讓 tooltip 可以顯示 */
    min-height: 120px;
    max-height: 140px;
    display: flex;
    flex-direction: column;
    z-index: 1; /* 預設層級 */
    
    /* 預設為可見狀態，避免重新渲染時的跳動 */
    opacity: 1;
    transform: translateY(0);
}

.service-card-compact {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 10px;
    padding: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
    height: 90px;
    display: flex;
    flex-direction: column;
}

.service-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12), 0 8px 24px rgba(0, 0, 0, 0.12);
    background: #ffffff;
    border-color: #d0d0d0;
    z-index: 999990; /* 當 hover 時提高層級，確保 tooltip 不被遮擋 */
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.service-card:hover::before {
    opacity: 1;
}

.service-icon {
    width: 35px;
    height: 35px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
    transition: all 0.3s ease;
}

.service-icon svg {
    width: 18px;
    height: 18px;
    transition: all 0.3s ease;
}

/* 讓以 <img> 呈現的品牌 SVG 與 svg 尺寸一致 */
.service-icon img {
    width: 18px;
    height: 18px;
    display: block;
}

.service-card:hover .service-icon svg {
    transform: scale(1.1);
}

/* Service Icon Colors */
.company-search {
    background: linear-gradient(135deg, #FF6B6B, #FF8E8E);
    color: #ffffff;
}

.gitlab {
    background: linear-gradient(135deg, #FFA726, #FFB74D);
    color: #ffffff;
}

.redmine {
    background: linear-gradient(135deg, #42A5F5, #64B5F6);
    color: #ffffff;
}

.apollo-ai {
    background: linear-gradient(135deg, #AB47BC, #BA68C8);
    color: #ffffff;
}

.bugzilla {
    background: linear-gradient(135deg, #26A69A, #4DB6AC);
    color: #ffffff;
}

.figma {
    background: linear-gradient(135deg, #66BB6A, #81C784);
    color: #ffffff;
}

.jira {
    background: linear-gradient(135deg, #5C6BC0, #7986CB);
    color: #ffffff;
}

.github {
    background: linear-gradient(135deg, #424242, #616161);
    color: #ffffff;
}

.google-drive {
    background: linear-gradient(135deg, #4285F4, #34A853, #FBBC05);
    color: #ffffff;
}

.sharepoint {
    background: linear-gradient(135deg, #0078D4, #106EBE);
    color: #ffffff;
}

.energy-analysis {
    background: linear-gradient(135deg, #FF6B35, #F7931E, #FFD23F);
    color: #ffffff;
}

.confluence {
    background: linear-gradient(135deg, #172B4D, #0052CC);
    color: #ffffff;
}

.jenkins {
    background: linear-gradient(135deg, #D33833, #335061);
    color: #ffffff;
}

.grafana {
    background: linear-gradient(135deg, #F46800, #FFA500);
    color: #ffffff;
}

.prometheus {
    background: linear-gradient(135deg, #E6522C, #FF6B35);
    color: #ffffff;
}

.sonarqube {
    background: linear-gradient(135deg, #4E9BCD, #549DD2);
    color: #ffffff;
}

.nexus {
    background: linear-gradient(135deg, #00C7B7, #4CAF50);
    color: #ffffff;
}

.elasticsearch {
    background: linear-gradient(135deg, #FEC514, #F39800);
    color: #ffffff;
}

.kibana {
    background: linear-gradient(135deg, #00BFB3, #005571);
    color: #ffffff;
}

.postman {
    background: linear-gradient(135deg, #FF6C37, #FF4500);
    color: #ffffff;
}

.docker {
    background: linear-gradient(135deg, #2496ED, #0DB7ED);
    color: #ffffff;
}

.minio {
    background: linear-gradient(135deg, #C72E29, #FF5722);
    color: #ffffff;
}

.portainer {
    background: linear-gradient(135deg, #13BEF9, #0085A1);
    color: #ffffff;
}

.vault {
    background: linear-gradient(135deg, #FFD814, #FF6B35);
    color: #ffffff;
}

.consul {
    background: linear-gradient(135deg, #CA2171, #E91E63);
    color: #ffffff;
}

.slack {
    background: linear-gradient(135deg, #4A154B, #611f69);
    color: #ffffff;
}

.teams {
    background: linear-gradient(135deg, #6264A7, #464775);
    color: #ffffff;
}

/* 會議助手圖示色系 */
.meeting {
    background: linear-gradient(135deg, #1E88E5, #43A047);
    color: #ffffff;
}

/* 電將群組圖示樣式 */
.solar-energy {
    background: linear-gradient(135deg, #FFD54F, #FF9800);
    color: #ffffff;
}

.green-trading {
    background: linear-gradient(135deg, #4CAF50, #8BC34A);
    color: #ffffff;
}

.green-contract {
    background: linear-gradient(135deg, #2E7D32, #43A047);
    color: #ffffff;
}

.green-config {
    background: linear-gradient(135deg, #66BB6A, #81C784);
    color: #ffffff;
}

.storage-config {
    background: linear-gradient(135deg, #42A5F5, #1E88E5);
    color: #ffffff;
}

.storage-revenue {
    background: linear-gradient(135deg, #26C6DA, #00ACC1);
    color: #ffffff;
}

.carbon-master {
    background: linear-gradient(135deg, #4CAF50, #2E7D32);
    color: #ffffff;
}

.storage-business {
    background: linear-gradient(135deg, #AB47BC, #8E24AA);
    color: #ffffff;
}

.sharepoint-package {
    background: linear-gradient(135deg, #FF7043, #FF5722);
    color: #ffffff;
}

.bpm {
    background: linear-gradient(135deg, #795548, #8D6E63);
    color: #ffffff;
}

/* 數位孿生儲能系統圖示色系 */
.digital-twin {
    background: linear-gradient(135deg, #00BCD4, #3F51B5);
    color: #ffffff;
}

.service-card h3 {
    font-size: 13px;
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
    line-height: 1.2;
}

.service-card p {
    font-size: 10px;
    color: #666;
    line-height: 1.3;
    margin-bottom: 10px;
    flex-grow: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
}

.service-status {
    display: flex;
    justify-content: flex-end;
}

.status-badge {
    font-size: 12px;
    padding: 6px 12px;
    border-radius: 20px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-badge.active {
    background: linear-gradient(135deg, #4CAF50, #66BB6A);
    color: #ffffff;
}

.status-badge.mcp {
    background: linear-gradient(135deg, #9C27B0, #E91E63);
    color: #ffffff;
    animation: mcpPulse 2s infinite;
}

.status-badge.開發中,
.status-badge.developing {
    background: linear-gradient(135deg, #ffa726, #ff9800);
    color: #ffffff;
}

.dev-status {
    display: inline-block;
    background: linear-gradient(135deg, #ffa726, #ff9800);
    color: #ffffff;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
    margin-left: 8px;
    vertical-align: middle;
}

/* 資訊按鈕樣式 */
.info-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    color: #666;
}

.info-btn:hover {
    background-color: rgba(0, 0, 0, 0.1);
    color: #333;
}

.info-btn svg {
    width: 16px;
    height: 16px;
}

/* 資訊彈出框 */
.info-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.info-modal.active {
    opacity: 1;
    visibility: visible;
}

.info-modal-content {
    background: white;
    border-radius: 12px;
    padding: 24px;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    transform: scale(0.8);
    transition: transform 0.3s ease;
}

.info-modal.active .info-modal-content {
    transform: scale(1);
}

.info-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.info-modal-title {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin: 0;
}

.info-modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #666;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.info-modal-close:hover {
    color: #333;
}

.info-modal-description {
    color: #555;
    line-height: 1.5;
    margin: 0;
}

/* 手機模式優化 */
@media (max-width: 768px) {
    .info-btn {
        width: 28px;
        height: 28px;
        background-color: rgba(0, 0, 0, 0.05);
    }
    
    .info-btn svg {
        width: 18px;
        height: 18px;
    }
    
    .info-modal-content {
        padding: 20px;
        margin: 16px;
        max-width: none;
        width: auto;
    }
    
    .info-modal-title {
        font-size: 16px;
    }
    
    .info-modal-description {
        font-size: 14px;
    }
}

@keyframes mcpPulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(156, 39, 176, 0.4);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 0 0 10px rgba(156, 39, 176, 0);
    }
}

/* MCP Service Special Styling */
.mcp-service {
    position: relative;
}

.mcp-service::after {
    content: 'MCP';
    position: absolute;
    top: 10px;
    right: 10px;
    background: linear-gradient(135deg, #9C27B0, #E91E63);
    color: #ffffff;
    font-size: 10px;
    font-weight: bold;
    padding: 3px 8px;
    border-radius: 12px;
    letter-spacing: 0.5px;
    opacity: 0.9;
}

/* Footer */
.footer {
    background: #ffffff;
    backdrop-filter: none;
    padding: 30px 0;
    margin-top: 40px;
    border-radius: 0;
    border-top: 1px solid #e5e5e5;
    box-shadow: 0 -2px 4px rgba(0, 0, 0, 0.05);
}

.footer-content {
    text-align: center;
}

.footer-content p {
    color: #666666;
    font-size: 14px;
    margin: 5px 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }
    
    .header-content {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    
    .intro-section {
        padding: 30px 20px;
        margin-bottom: 30px;
    }
    
    .intro-section h2 {
        font-size: 28px;
    }
    
    .intro-section p {
        font-size: 16px;
    }
    
    .services-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .service-card {
        padding: 25px;
    }
}

@media (max-width: 480px) {
    .logo h1 {
        font-size: 24px;
    }
    
    .intro-section h2 {
        font-size: 24px;
    }
    
    .intro-section p {
        font-size: 14px;
    }
    
    .service-card {
        padding: 20px;
    }
    
    .service-icon {
        width: 50px;
        height: 50px;
    }
    
    .service-icon svg {
        width: 25px;
        height: 25px;
    }
}

/* Loading Animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 只有初次載入的卡片才使用載入動畫 */
.service-card.initial-load {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.6s ease forwards;
}

/* 動畫延遲設定（只適用於初次載入） */
.service-card.initial-load:nth-child(1) { animation-delay: 0.1s; }
.service-card.initial-load:nth-child(2) { animation-delay: 0.2s; }
.service-card.initial-load:nth-child(3) { animation-delay: 0.3s; }
.service-card.initial-load:nth-child(4) { animation-delay: 0.4s; }
.service-card.initial-load:nth-child(5) { animation-delay: 0.5s; }
.service-card.initial-load:nth-child(6) { animation-delay: 0.6s; }
.service-card.initial-load:nth-child(7) { animation-delay: 0.7s; }
.service-card.initial-load:nth-child(8) { animation-delay: 0.8s; }

/* 語言選擇器樣式 */
.language-selector {
    position: relative;
    z-index: 2147483646; /* 僅比下拉選單低一層 */
    isolation: isolate; /* 創建新的堆疊上下文 */
}

.language-btn {
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 6px;
    padding: 6px 10px;
    color: #333;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.3s ease;
    min-width: 80px;
    backdrop-filter: blur(10px);
}

.language-btn:hover {
    background: #ffffff;
    border-color: rgba(0, 0, 0, 0.2);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.language-globe {
    width: 16px;
    height: 16px;
    color: #666;
}

.language-code {
    color: #333;
    font-weight: 600;
    font-size: 12px;
    line-height: 1;
}

.language-arrow {
    width: 12px;
    height: 12px;
    color: #666;
    transition: transform 0.3s ease;
}

.language-btn:hover .language-arrow {
    transform: rotate(180deg);
}

.language-dropdown {
    position: fixed !important; /* 強制 fixed 定位 */
    top: calc(100% + 8px);
    right: 0;
    background: white !important;
    border: 2px solid rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    padding: 8px;
    min-width: 150px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3) !important;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 2147483647 !important; /* 使用最大可能的 z-index */
    isolation: isolate; /* 創建新的堆疊上下文 */
    contain: layout style paint; /* 防止被其他元素影響 */
}

.language-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.language-option {
    background: none;
    border: none;
    width: 100%;
    padding: 8px 10px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #333;
    transition: all 0.2s ease;
    text-align: left;
}

.language-option:hover {
    background: #f5f5f5;
    color: #333;
}

.language-option.active {
    background: #667eea;
    color: #ffffff;
}

.language-option.active:hover {
    background: #5a6fd8;
}

.language-code-option {
    font-weight: 600;
    font-size: 12px;
    min-width: 24px;
    color: inherit;
}

.language-option .language-name {
    flex: 1;
    font-weight: 400;
    font-size: 12px;
}

/* 響應式設計 */
@media (max-width: 768px) {
    .language-selector {
        margin-left: 0;
        margin-top: 10px;
    }
    
    .language-btn {
        width: 100%;
        justify-content: center;
        min-width: auto;
    }
    
    .language-dropdown {
        right: auto;
        left: 0;
        width: 100%;
    }
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #5a6fd8, #6a4190);
}

/* Google 登入區域樣式 */
.google-auth-container {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: 20px;
}

.auth-status {
    font-size: 12px;
    color: #666;
    padding: 5px 10px;
    border-radius: 15px;
    background: #f3f4f6;
    backdrop-filter: blur(10px);
}

.google-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border: none;
    border-radius: 20px;
    background: #ffffff;
    color: #333;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.google-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.google-btn.signout {
    background: #ea4335;
    color: #ffffff;
}

.google-btn.signout:hover {
    background: #d73925;
}

.google-btn.switch {
    background: #1976d2;
    color: #ffffff;
}

.google-btn.switch:hover {
    background: #1565c0;
}

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

.auth-status.authenticated {
    background: rgba(52, 168, 83, 0.2);
    color: #34a853;
}

.auth-status.authenticated::before {
    content: "✅ ";
}

.auth-status.unauthenticated {
    background: rgba(234, 67, 53, 0.2);
    color: #ea4335;
}

.auth-status.unauthenticated::before {
    content: "❌ ";
}

@media (max-width: 768px) {
    .google-auth-container {
        margin-left: 0;
        margin-top: 10px;
        justify-content: center;
    }
    
    .auth-status {
        font-size: 11px;
        padding: 4px 8px;
    }
    
    .google-btn {
        font-size: 13px;
        padding: 6px 12px;
    }
}

/* MCP 工具結果顯示彈窗 */
.tool-result-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    backdrop-filter: blur(5px);
}

.tool-result-content {
    background: white;
    border-radius: 15px;
    max-width: 90%;
    max-height: 80%;
    min-width: 400px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

.tool-result-header {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #ffffff;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.tool-result-header h3 {
    margin: 0;
    font-size: 18px;
}

.close-btn {
    background: none;
    border: none;
    color: #ffffff;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease;
}

.close-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.tool-result-body {
    padding: 20px;
    max-height: 60vh;
    overflow-y: auto;
}

.tool-result-body pre {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 15px;
    margin: 0;
    white-space: pre-wrap;
    word-wrap: break-word;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 14px;
    line-height: 1.5;
    color: #333;
}

.tool-result-footer {
    padding: 15px 20px;
    border-top: 1px solid #e9ecef;
    text-align: right;
    background: #f8f9fa;
}

.tool-result-footer .btn-primary {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #ffffff;
    border: none;
    padding: 10px 20px;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
}

.tool-result-footer .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.3);
}

@media (max-width: 768px) {
    .tool-result-content {
        min-width: 300px;
        max-width: 95%;
    }
    
    .tool-result-header h3 {
        font-size: 16px;
    }
    
    .tool-result-body {
        padding: 15px;
    }
    
    .tool-result-body pre {
        font-size: 12px;
        padding: 10px;
    }
}

/* Google Drive 檔案管理樣式 */
.google-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.google-btn.manager {
    background: linear-gradient(135deg, #34a853, #28a745);
    color: #ffffff;
    border: none;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
}

.google-btn.manager:hover {
    background: linear-gradient(135deg, #2e9349, #228b3b);
    transform: translateY(-1px);
}

.google-btn.manager .icon {
    width: 16px;
    height: 16px;
}

.gdrive-manager {
    background: white;
    border-radius: 15px;
    box-shadow: 0 4px 25px rgba(0, 0, 0, 0.1);
    margin-top: 20px;
    overflow: hidden;
}

.gdrive-header {
    background: linear-gradient(135deg, #4285f4, #34a853);
    color: #ffffff;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.gdrive-breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
}

.breadcrumb-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: #ffffff;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    transition: background 0.2s ease;
}

.breadcrumb-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

.breadcrumb-btn .icon {
    width: 16px;
    height: 16px;
}

#breadcrumb-trail {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.gdrive-toolbar {
    display: flex;
    gap: 8px;
}

.toolbar-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: #ffffff;
    padding: 8px;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.toolbar-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

.toolbar-btn svg {
    width: 18px;
    height: 18px;
}

.gdrive-controls {
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.search-bar {
    flex: 1;
    max-width: 400px;
    position: relative;
    display: flex;
    align-items: center;
}

.search-bar .search-icon {
    position: absolute;
    left: 12px;
    width: 14px;
    height: 14px;
    color: #6c757d;
    pointer-events: none;
}

#file-search {
    width: 100%;
    padding: 10px 12px 10px 40px;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s ease;
}

#file-search:focus {
    border-color: #4285f4;
    box-shadow: 0 0 0 2px rgba(66, 133, 244, 0.1);
}

.clear-btn {
    position: absolute;
    right: 8px;
    background: none;
    border: none;
    padding: 4px;
    cursor: pointer;
    color: #6c757d;
    border-radius: 4px;
    transition: background 0.2s ease;
}

.clear-btn:hover {
    background: #e9ecef;
}

.clear-btn svg {
    width: 16px;
    height: 16px;
}

.file-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

.control-select {
    padding: 8px 12px;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    font-size: 14px;
    background: white;
    cursor: pointer;
    outline: none;
    transition: border-color 0.2s ease;
}

.control-select:focus {
    border-color: #4285f4;
}

.gdrive-content {
    padding: 20px;
}

.files-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px;
    margin-top: 20px;
}

/* 檔案管理器列表視圖 - 使用 !important 覆蓋任何衝突規則 */
.gdrive-file-list {
    width: 100% !important;
    border-collapse: collapse !important;
    border: 1px solid #d1d5db !important;
    font-size: 13px !important;
    margin: 0 !important;
    padding: 0 !important;
    display: table !important;
}

.gdrive-file-list th {
    background: #f3f4f6 !important;
    padding: 8px 12px !important;
    text-align: left !important;
    border-right: 1px solid #d1d5db !important;
    font-weight: 600 !important;
    color: #374151 !important;
    cursor: pointer !important;
    margin: 0 !important;
    display: table-cell !important;
}

.gdrive-file-list th:last-child {
    border-right: none !important;
}

.gdrive-file-list td {
    padding: 6px 12px !important;
    border-right: 1px solid #e5e7eb !important;
    border-bottom: 1px solid #f3f4f6 !important;
    vertical-align: middle !important;
    color: #374151 !important;
    margin: 0 !important;
    display: table-cell !important;
}

.gdrive-file-list td:last-child {
    border-right: none !important;
}

.gdrive-file-list tr,
.gdrive-file-list .gdrive-file-row {
    display: table-row !important;
}

.gdrive-file-list tr:hover,
.gdrive-file-list .gdrive-file-row:hover {
    background: #f8fafc !important;
}

.gdrive-file-list .file-name {
    display: flex !important;
    align-items: center !important;
    flex-direction: row !important;
    gap: 0 !important;
    white-space: nowrap !important;
    margin: 0 !important;
    margin-bottom: 0 !important;
    font-weight: normal !important;
}

.gdrive-file-list .file-icon {
    width: 16px !important;
    height: 16px !important;
    margin-right: 8px !important;
    flex-shrink: 0 !important;
    margin-bottom: 0 !important;
    margin-top: 0 !important;
    margin-left: 0 !important;
    display: inline-block !important;
    vertical-align: middle !important;
}

.gdrive-file-list .file-text {
    flex: 1 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    max-width: 300px !important;
}

.gdrive-file-list .file-extension {
    font-size: 11px !important;
    color: #9ca3af !important;
    background: #f3f4f6 !important;
    padding: 2px 4px !important;
    border-radius: 2px !important;
    margin-left: 8px !important;
    text-transform: uppercase !important;
}

.gdrive-file-list .size-col {
    text-align: right !important;
    width: 120px !important;
}

.gdrive-file-list .type-col {
    width: 150px !important;
}

.gdrive-file-list .date-col {
    width: 140px !important;
}

.gdrive-file-list .actions-col {
    width: 80px !important;
    text-align: center !important;
}

.gdrive-file-list .action-btn {
    background: transparent !important;
    border: 1px solid transparent !important;
    border-radius: 3px !important;
    padding: 4px 6px !important;
    margin: 0 1px !important;
    cursor: pointer !important;
    color: #6b7280 !important;
}

.gdrive-file-list .action-btn:hover {
    background: #e5e7eb !important;
    border-color: #d1d5db !important;
}

.gdrive-file-list .action-btn svg {
    width: 12px !important;
    height: 12px !important;
}

/* Google Drive 風格表格檢視 */
.gdrive-table-container {
    display: block !important;
    width: 100% !important;
    overflow-x: auto !important;
}

.gdrive-table {
    width: 100% !important;
    border-collapse: collapse !important;
    background: white !important;
    font-size: 14px !important;
}

.gdrive-table thead {
    background: #f8f9fa !important;
    border-bottom: 1px solid #e9ecef !important;
}

.gdrive-table th {
    padding: 12px 16px !important;
    text-align: left !important;
    font-weight: 500 !important;
    color: #5f6368 !important;
    font-size: 13px !important;
    border-bottom: 1px solid #dadce0 !important;
}

.gdrive-table .name-col {
    width: 40% !important;
    min-width: 200px !important;
}

.gdrive-table .owner-col {
    width: 15% !important;
    min-width: 100px !important;
}

.gdrive-table .modified-col {
    width: 20% !important;
    min-width: 140px !important;
}

.gdrive-table .size-col {
    width: 15% !important;
    min-width: 80px !important;
}

.gdrive-table .actions-col {
    width: 10% !important;
    min-width: 60px !important;
    text-align: center !important;
}

.gdrive-file-row {
    border-bottom: 1px solid #f1f3f4 !important;
    cursor: pointer !important;
    transition: background-color 0.2s ease !important;
}

.gdrive-file-row:hover {
    background-color: #f8f9fa !important;
}

.gdrive-file-row td {
    padding: 8px 16px !important;
    vertical-align: middle !important;
    color: #3c4043 !important;
}

.file-name-cell {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
}

.file-type-icon {
    width: 20px !important;
    height: 20px !important;
    flex-shrink: 0 !important;
    font-size: 16px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.file-name-text {
    flex: 1 !important;
    font-weight: 400 !important;
    color: #1a73e8 !important;
    text-decoration: none !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

.gdrive-table .action-btn {
    background: none !important;
    border: none !important;
    color: #5f6368 !important;
    cursor: pointer !important;
    padding: 4px 8px !important;
    border-radius: 4px !important;
    font-size: 16px !important;
    transition: background-color 0.2s ease !important;
}

.gdrive-table .action-btn:hover {
    background-color: #f1f3f4 !important;
}

/* 舊的 files-grid.list-view 規則已移除，現在使用 .gdrive-file-list */

.file-item {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
}

.file-item:hover {
    background: #e3f2fd;
    border-color: #4285f4;
    transform: translateY(-1px);
    box-shadow: 0 2px 10px rgba(66, 133, 244, 0.15);
}

.file-item.selected {
    background: #e8f5e8;
    border-color: #34a853;
    box-shadow: 0 0 0 2px rgba(52, 168, 83, 0.2);
}

/* 舊的 file-item 規則已移除 */

.file-icon {
    width: 20px;
    height: 20px;
    margin-bottom: 4px;
    color: #6c757d;
    flex-shrink: 0;
}

/* 檔案圖示樣式 */
.file-icon {
    width: 20px;
    height: 20px;
    margin-bottom: 4px;
    color: #6c757d;
    flex-shrink: 0;
}

.file-icon.folder {
    color: #4285f4;
}

.file-icon.document {
    color: #4285f4;
}

.file-icon.spreadsheet {
    color: #34a853;
}

.file-icon.presentation {
    color: #ff6d01;
}

.file-icon.image {
    color: #ea4335;
}

.file-icon.video {
    color: #ff6d01;
}

.file-icon.audio {
    color: #9c27b0;
}

.file-icon.pdf {
    color: #d32f2f;
}

.file-info {
    flex: 1;
}

.file-name {
    font-weight: 500;
    color: #333;
    margin-bottom: 4px;
    word-break: break-word;
    line-height: 1.3;
    font-size: 14px;
}

/* 網格模式的檔案名稱樣式 */
.files-grid:not(.list-view) .file-name {
    word-break: break-word;
    overflow-wrap: break-word;
    white-space: normal;
    max-width: none;
}

.file-meta {
    font-size: 12px;
    color: #6c757d;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

/* 所有舊的 files-grid.list-view 規則已清理完畢，現在只使用 .file-list */

.file-extension {
    font-size: 11px;
    color: #868e96;
    text-transform: uppercase;
    font-weight: 600;
    background: #f1f3f4;
    padding: 2px 6px;
    border-radius: 3px;
    display: inline-block;
}

.file-size {
    font-weight: 500;
}

.file-modified {
    opacity: 0.8;
}

.file-actions {
    position: absolute;
    top: 10px;
    right: 10px;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.file-item:hover .file-actions {
    opacity: 1;
}

.action-btn {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 4px;
    cursor: pointer;
    margin-left: 4px;
    transition: all 0.2s ease;
}

.action-btn:hover {
    background: #4285f4;
    color: #ffffff;
    border-color: #4285f4;
}

.action-btn svg {
    width: 14px;
    height: 14px;
}

.loading-spinner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    color: #6c757d;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #4285f4;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 15px;
}

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

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    color: #6c757d;
    text-align: center;
}

.empty-state svg {
    width: 64px;
    height: 64px;
    margin-bottom: 15px;
    opacity: 0.5;
}

.empty-state h3 {
    margin-bottom: 8px;
    color: #333;
}

.empty-state p {
    font-size: 14px;
    opacity: 0.8;
}

/* 檔案選擇模式 */
.file-item.selectable {
    user-select: none;
}

.file-item.selectable::before {
    content: '';
    position: absolute;
    top: 8px;
    left: 8px;
    width: 18px;
    height: 18px;
    border: 2px solid #ddd;
    border-radius: 3px;
    background: white;
    transition: all 0.2s ease;
}

.file-item.selected::before {
    background: #4285f4;
    border-color: #4285f4;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" viewBox="0 0 24 24" fill="white"><path d="M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"/></svg>');
    background-repeat: no-repeat;
    background-position: center;
    background-size: 12px;
}

/* 行動裝置響應式設計 */
@media (max-width: 768px) {
    .gdrive-header {
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
    }
    
    .gdrive-breadcrumb {
        justify-content: center;
    }
    
    .gdrive-toolbar {
        justify-content: center;
    }
    
    .files-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 10px;
    }
    
    .google-actions {
        flex-direction: column;
        gap: 8px;
    }
    
    .google-btn.manager {
        font-size: 12px;
        padding: 6px 10px;
    }
}

/* 彈窗樣式 */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(5px);
}

.modal-content {
    background: white;
    border-radius: 12px;
    max-width: 600px;
    max-height: 80vh;
    width: 90%;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    overflow: hidden;
}

.modal-header {
    background: linear-gradient(135deg, #4285f4, #34a853);
    color: #ffffff;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.modal-close {
    background: none;
    border: none;
    color: #ffffff;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.2s ease;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.modal-body {
    padding: 20px;
    max-height: 400px;
    overflow-y: auto;
}

.modal-body pre {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    padding: 15px;
    white-space: pre-wrap;
    word-wrap: break-word;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    line-height: 1.4;
    margin: 0;
    color: #333;
}

/* 錯誤訊息樣式 */
.error-message {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    color: #6c757d;
    text-align: center;
}

.error-message h3 {
    margin-bottom: 8px;
    color: #ea4335;
}

.error-message p {
    font-size: 14px;
    opacity: 0.8;
    margin-bottom: 20px;
}

/* 右鍵選單樣式 */
.context-menu {
    position: absolute;
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    padding: 8px 0;
    min-width: 160px;
    font-size: 14px;
}

.context-menu-item {
    display: flex;
    align-items: center;
    padding: 8px 16px;
    cursor: pointer;
    transition: background 0.2s ease;
    gap: 10px;
}

.context-menu-item:hover {
    background: #f8f9fa;
}

.context-menu-item svg {
    width: 16px;
    height: 16px;
    color: #6c757d;
}

.context-menu-separator {
    height: 1px;
    background: #e9ecef;
    margin: 4px 0;
}

/* 簡單通知樣式 */
.simple-notification {
    animation: slideInRight 0.3s ease;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* 多檔案管理器樣式 */
.multi-file-manager {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 95vw;
    max-width: 1400px;
    height: 90vh;
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    z-index: 10000;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.multi-manager-header {
    background: linear-gradient(135deg, #4285f4, #34a853);
    color: #ffffff;
    padding: 12px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

.multi-manager-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.multi-manager-tabs {
    display: flex;
    gap: 8px;
}

.tab-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: #ffffff;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.tab-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
}

.tab-btn.active {
    background: rgba(255, 255, 255, 0.95);
    color: #333;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.tab-btn svg {
    width: 16px;
    height: 16px;
}

.multi-manager-header .close-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: #ffffff;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease;
}

.multi-manager-header .close-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

.tab-content {
    flex: 1;
    display: none;
    overflow: hidden;
    background: #f8f9fa;
}

.tab-content.active {
    display: flex;
    flex-direction: column;
}

.service-status {
    background: #ffffff;
    border-bottom: 1px solid #e9ecef;
    padding: 8px 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.status-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
}

.status-indicator.connecting {
    background: #ffa726;
    animation: pulse 1.5s infinite;
}

.status-indicator.connected {
    background: #4caf50;
}

.status-indicator.disconnected {
    background: #9e9e9e;
}

.status-indicator.error {
    background: #f44336;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.service-connect-btn {
    background: linear-gradient(135deg, #4285f4, #34a853);
    color: #ffffff;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.3s ease;
    margin-left: auto;
}

.service-connect-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(66, 133, 244, 0.3);
}

.service-connect-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.tab-file-content {
    flex: 1;
    overflow: hidden;
    background: white;
}

.file-browser {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.file-browser-header {
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    padding: 8px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

.navigation-section {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.nav-btn {
    background: white;
    border: 1px solid #ddd;
    color: #666;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.nav-btn:hover:not(:disabled) {
    background: #f0f0f0;
    border-color: #ccc;
    color: #333;
}

.nav-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    background: #f8f9fa;
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 14px;
    color: #666;
    flex: 1;
    overflow: hidden;
}

.breadcrumb-item {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 6px 10px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.breadcrumb-item:hover:not(.active) {
    background: #e9ecef;
}

.breadcrumb-item.active {
    background: #4285f4;
    color: #ffffff;
    cursor: default;
}

.breadcrumb-item svg {
    flex-shrink: 0;
}

.breadcrumb-separator {
    color: #999;
    font-size: 12px;
    margin: 0 2px;
}

.view-controls {
    display: flex;
    gap: 4px;
}

.view-btn {
    background: #ffffff;
    border: 1px solid #e9ecef;
    color: #666;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.view-btn:hover {
    background: #f8f9fa;
    border-color: #d6d9dc;
}

.view-btn.active {
    background: #4285f4;
    border-color: #4285f4;
    color: #ffffff;
}

.file-list-container {
    flex: 1;
    overflow-y: auto;
    padding: 12px;
    max-height: calc(90vh - 120px); /* 增加整體高度和檔案顯示空間 */
}

.file-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
}

.file-list {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.file-item {
    background: #ffffff;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    min-height: 90px;
}

.file-item:hover {
    background: #f8f9fa;
    border-color: #4285f4;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(66, 133, 244, 0.15);
}

.file-item .file-icon {
    font-size: 20px;
    margin-bottom: 4px;
}

.file-item .file-name {
    font-size: 13px;
    font-weight: 500;
    color: #333;
    margin-bottom: 2px;
    word-break: break-word;
    line-height: 1.3;
}

.file-item .file-meta {
    font-size: 12px;
    color: #666;
}

.file-row {
    background: #ffffff;
    border: 1px solid #e9ecef;
    padding: 12px 16px;
    display: grid;
    grid-template-columns: 1fr 100px 140px 80px;
    align-items: center;
    gap: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.file-row:hover {
    background: #f8f9fa;
    border-color: #4285f4;
}

.file-name-cell {
    display: flex;
    align-items: center;
    gap: 12px;
}

.file-name-cell .file-icon {
    font-size: 16px;
    flex-shrink: 0;
}

.file-name-cell .file-name {
    font-size: 14px;
    font-weight: 500;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.file-size-cell,
.file-modified-cell {
    font-size: 13px;
    color: #666;
    text-align: center;
}

.file-actions-cell {
    display: flex;
    justify-content: center;
}

.file-actions-cell .action-btn {
    background: none;
    border: 1px solid transparent;
    color: #666;
    width: 28px;
    height: 28px;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.file-actions-cell .action-btn:hover {
    background: #4285f4;
    border-color: #4285f4;
    color: #ffffff;
}

/* 檔案選擇功能 */
.file-item.selected,
.file-row.selected {
    background: #e3f2fd;
    border-color: #4285f4;
}

.file-item {
    position: relative;
}

.file-row {
    position: relative;
}

.file-item .select-checkbox,
.file-row .select-checkbox {
    position: absolute;
    top: 8px;
    left: 8px;
    width: 18px;
    height: 18px;
    border: 2px solid #ddd;
    border-radius: 3px;
    background: white;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: #4285f4;
    z-index: 5;
}

.file-item:hover .select-checkbox,
.file-row:hover .select-checkbox,
.file-item.selected .select-checkbox,
.file-row.selected .select-checkbox {
    display: flex;
}

.file-item.selected .select-checkbox,
.file-row.selected .select-checkbox {
    background: #4285f4;
    border-color: #4285f4;
    color: white;
}

/* 右鍵功能表 */
.context-menu {
    position: fixed;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    padding: 8px 0;
    z-index: 10001;
    min-width: 180px;
    display: none;
}

.context-menu-item {
    padding: 10px 16px;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #333;
    transition: background 0.2s ease;
}

.context-menu-item:hover {
    background: #f5f5f5;
}

.context-menu-item.disabled {
    color: #999;
    cursor: not-allowed;
}

.context-menu-item.disabled:hover {
    background: transparent;
}

.context-menu-separator {
    height: 1px;
    background: #e0e0e0;
    margin: 4px 0;
}

/* 檔案工具列 */
.file-toolbar {
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.toolbar-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.toolbar-btn {
    background: white;
    border: 1px solid #ddd;
    color: #666;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
}

.toolbar-btn:hover {
    background: #f0f0f0;
    border-color: #ccc;
}

.toolbar-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.toolbar-btn svg {
    width: 14px;
    height: 14px;
}

/* 搜尋框 */
.search-box {
    flex: 1;
    max-width: 300px;
    position: relative;
    margin-left: auto;
}

.search-input {
    width: 100%;
    padding: 8px 12px 8px 36px;
    border: 1px solid #ddd;
    border-radius: 20px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s ease;
}

.search-input:focus {
    border-color: #4285f4;
}


/* 排序表頭 */
.file-list-header {
    background: #f8f9fa;
    border-bottom: 2px solid #e9ecef;
    padding: 12px 16px;
    display: grid;
    grid-template-columns: 1fr 100px 140px 80px;
    align-items: center;
    gap: 16px;
    font-weight: 600;
    font-size: 13px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: sticky;
    top: 0;
    z-index: 10;
}

.sort-header {
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
    user-select: none;
    transition: color 0.2s ease;
}

.sort-header:hover {
    color: #4285f4;
}

.sort-header.active {
    color: #4285f4;
}

.sort-icon {
    width: 12px;
    height: 12px;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.sort-header.active .sort-icon {
    opacity: 1;
}

/* 檔案預覽面板 */
.file-preview-panel {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80vw;
    max-width: 900px;
    height: 80vh;
    background: white;
    border-radius: 15px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    z-index: 10002;
    display: none;
    flex-direction: column;
    overflow: hidden;
}

.preview-header {
    background: #f8f9fa;
    padding: 15px 20px;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.preview-title {
    font-weight: 600;
    color: #333;
    font-size: 16px;
}

.preview-header .close-btn {
    background: none;
    border: none;
    color: #666;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.preview-header .close-btn:hover {
    background: #f5f5f5;
    color: #333;
}

.preview-header .close-btn svg {
    width: 20px;
    height: 20px;
}

.preview-content {
    flex: 1;
    padding: 20px;
    overflow: auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

.preview-content img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.preview-content iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.preview-action-btn {
    background: #4285f4;
    color: white;
    border: none;
    padding: 10px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
    text-decoration: none;
}

.preview-action-btn:hover {
    background: #3367d6;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(66, 133, 244, 0.3);
}

.preview-action-btn.download-btn {
    background: #34a853;
}

.preview-action-btn.download-btn:hover {
    background: #2d8f47;
    box-shadow: 0 4px 8px rgba(52, 168, 83, 0.3);
}

/* 載入和錯誤狀態 */
.loading-state,
.error-state,
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #666;
    font-size: 16px;
}

.loading-state::before {
    content: '⏳';
    display: block;
    font-size: 32px;
    margin-bottom: 16px;
}

.error-state::before {
    content: '❌';
    display: block;
    font-size: 32px;
    margin-bottom: 16px;
}

.empty-state::before {
    content: '📁';
    display: block;
    font-size: 32px;
    margin-bottom: 16px;
}

.loading-state,
.error-state,
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    color: #666;
    font-size: 16px;
    text-align: center;
    grid-column: 1 / -1;
}

.error-state {
    color: #f44336;
}

.empty-state {
    color: #999;
}

/* 響應式設計 */
@media (max-width: 768px) {
    .multi-file-manager {
        width: 98vw;
        height: 95vh;
        border-radius: 8px;
    }
    
    .multi-manager-header {
        padding: 10px 12px;
        flex-direction: column;
        gap: 8px;
        align-items: stretch;
    }
    
    .multi-manager-tabs {
        justify-content: center;
    }
    
    .file-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 12px;
    }
    
    .file-row {
        grid-template-columns: 1fr 80px 60px;
        gap: 8px;
    }
    
    .file-modified-cell {
        display: none;
    }
    
    .file-browser-header {
        padding: 10px 15px;
        flex-direction: column;
        gap: 10px;
        align-items: stretch;
    }
    
    .file-list-container {
        padding: 15px;
    }
}

/* 上傳區域樣式 */
.upload-section {
    display: flex;
    gap: 8px;
    padding: 8px 16px;
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    align-items: center;
}

.upload-btn,
.create-folder-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #fff;
    color: #333;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.upload-btn:hover,
.create-folder-btn:hover {
    background: #f8f9fa;
    border-color: #007bff;
    color: #007bff;
}

.upload-btn svg,
.create-folder-btn svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.upload-btn:active,
.create-folder-btn:active {
    transform: translateY(1px);
}

@media (max-width: 768px) {
    .upload-section {
        flex-direction: column;
        gap: 8px;
        padding: 12px 15px;
    }
    
    .upload-btn,
    .create-folder-btn {
        width: 100%;
        justify-content: center;
    }
}
}