/**
 * AI数据标注面板样式
 * 模块: ai-annotation.css
 * 
 * 风格: 仿照数据总览和调试面板的科技风格
 */

/* ========== 全局滚动条样式 ========== */
.annotation-modal *::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.annotation-modal *::-webkit-scrollbar-track {
    background: rgba(14, 252, 255, 0.05);
    border-radius: 4px;
}

.annotation-modal *::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, rgba(14, 252, 255, 0.4) 0%, rgba(14, 252, 255, 0.2) 100%);
    border-radius: 4px;
    border: 1px solid rgba(14, 252, 255, 0.3);
}

.annotation-modal *::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, rgba(14, 252, 255, 0.6) 0%, rgba(14, 252, 255, 0.4) 100%);
}

/* ========== 标注面板主容器 ========== */
.annotation-modal {
    display: none;
    position: fixed;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, rgba(10, 25, 45, 0.95) 0%, rgba(15, 35, 60, 0.92) 100%);
    border-radius: 12px;
    border: 1px solid rgba(14, 252, 255, 0.5);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3), 0 0 30px rgba(14, 252, 255, 0.15);
    width: 85vw;
    max-width: 1200px;
    height: auto;
    max-height: calc(100vh - 160px);
    overflow: hidden;
    z-index: 850;
    backdrop-filter: blur(15px) saturate(1.2);
}

.annotation-modal.active {
    display: block;
    animation: annotationSlideIn 0.3s ease-out;
}

@keyframes annotationSlideIn {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

/* ========== 面板头部 ========== */
.annotation-header {
    background: linear-gradient(90deg, rgba(14, 252, 255, 0.12) 0%, rgba(14, 252, 255, 0.04) 100%);
    padding: 12px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(14, 252, 255, 0.3);
    cursor: move;
    border-radius: 12px 12px 0 0;
}

.annotation-header h3 {
    color: #0EFCFF;
    font-size: 15px;
    font-weight: 600;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.annotation-header .annotation-icon {
    font-style: normal;
    font-size: 18px;
}

.annotation-close-btn {
    background: rgba(255, 60, 60, 0.6);
    border: none;
    color: white;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.annotation-close-btn:hover {
    background: rgba(255, 60, 60, 0.9);
    transform: scale(1.1);
}

/* ========== Tab 切换 ========== */
.annotation-tabs {
    display: flex;
    background: rgba(14, 252, 255, 0.05);
    border-bottom: 1px solid rgba(14, 252, 255, 0.2);
    padding: 0 16px;
}

.annotation-tab {
    padding: 12px 20px;
    background: transparent;
    border: none;
    color: #80E5E8;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
    display: flex;
    align-items: center;
    gap: 6px;
}

.annotation-tab:hover {
    color: #0EFCFF;
    background: rgba(14, 252, 255, 0.1);
}

.annotation-tab.active {
    color: #0EFCFF;
    background: rgba(14, 252, 255, 0.15);
}

.annotation-tab.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, #0EFCFF, #00d4ff);
}

.annotation-tab-icon {
    font-size: 16px;
}

/* ========== Tab 内容区域 ========== */
.annotation-content {
    padding: 16px;
    overflow-y: auto;
    max-height: calc(100vh - 280px);
}

.annotation-content::-webkit-scrollbar {
    width: 8px;
}

.annotation-content::-webkit-scrollbar-track {
    background: rgba(14, 252, 255, 0.05);
    border-radius: 4px;
}

.annotation-content::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, rgba(14, 252, 255, 0.4) 0%, rgba(14, 252, 255, 0.2) 100%);
    border-radius: 4px;
    border: 1px solid rgba(14, 252, 255, 0.3);
}

.annotation-content::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, rgba(14, 252, 255, 0.6) 0%, rgba(14, 252, 255, 0.4) 100%);
}

.annotation-tab-content {
    display: none;
}

.annotation-tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* ========== 截图标注区域 ========== */
.annotation-main-grid {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 16px;
}

.screenshot-gallery {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: min-content;
    gap: 8px;
    max-height: 400px;
    overflow-y: auto;
    padding-right: 8px;
}

.screenshot-gallery::-webkit-scrollbar {
    width: 8px;
}

.screenshot-gallery::-webkit-scrollbar-track {
    background: rgba(14, 252, 255, 0.05);
    border-radius: 4px;
}

.screenshot-gallery::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, rgba(14, 252, 255, 0.4) 0%, rgba(14, 252, 255, 0.2) 100%);
    border-radius: 4px;
    border: 1px solid rgba(14, 252, 255, 0.3);
}

.screenshot-gallery::-webkit-scrollbar-thumb:hover {
    background: rgba(14, 252, 255, 0.5);
}

.screenshot-card {
    background: rgba(14, 252, 255, 0.02);
    border: 1px solid rgba(14, 252, 255, 0.2);
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s;
    cursor: pointer;
    width: 100%;
    height: fit-content;
    display: flex;
    flex-direction: column;
}

.screenshot-card:hover {
    border-color: rgba(14, 252, 255, 0.5);
    box-shadow: 0 4px 15px rgba(14, 252, 255, 0.15);
    transform: translateY(-2px);
}

.screenshot-card.selected {
    border-color: #0EFCFF;
    box-shadow: 0 0 20px rgba(14, 252, 255, 0.3);
}

.screenshot-card.annotated {
    border-color: rgba(50, 205, 50, 0.5);
}

/* 分类结果标签（右下角） */
.classification-result {
    position: absolute;
    bottom: 6px;
    right: 6px;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 600;
    backdrop-filter: blur(4px);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
    z-index: 10;
}

.classification-result.correct {
    background: rgba(50, 205, 50, 0.95);
    color: #fff;
    border: 1px solid rgba(50, 205, 50, 0.8);
}

.classification-result.wrong {
    background: rgba(255, 60, 60, 0.95);
    color: #fff;
    border: 1px solid rgba(255, 60, 60, 0.8);
}

.classification-result.has-ice {
    background: rgba(30, 64, 175, 0.95);
    color: #fff;
    border: 1px solid rgba(30, 64, 175, 0.8);
}

.classification-result.no-ice {
    background: rgba(249, 115, 22, 0.95);
    color: #fff;
    border: 1px solid rgba(249, 115, 22, 0.8);
}

/* 标注状态标签（右上角） */
.annotation-status {
    position: absolute;
    top: 6px;
    right: 6px;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 600;
    backdrop-filter: blur(4px);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
    z-index: 10;
}

.annotation-status.annotated {
    background: rgba(147, 51, 234, 0.95);
    color: #fff;
}

.annotation-status.pending {
    background: rgba(255, 200, 0, 0.9);
    color: #000;
}

.screenshot-card.annotated .screenshot-status {
    background: rgba(50, 205, 50, 0.95);
    color: #fff;
    border: 1px solid rgba(50, 205, 50, 0.8);
}

/* 标注为错误/无冰的截图 - 红色样式 */
.screenshot-card.annotated-wrong {
    border-color: rgba(255, 60, 60, 0.5);
}

.screenshot-card.annotated-wrong .screenshot-status {
    background: rgba(255, 60, 60, 0.95);
    color: #fff;
    border: 1px solid rgba(255, 60, 60, 0.8);
}

/* 手动截图有冰 - 青色样式 */
.screenshot-card.annotated.manual-icy {
    border-color: rgba(14, 252, 255, 0.5);
}

.screenshot-card.annotated.manual-icy .screenshot-status {
    background: rgba(14, 252, 255, 0.95);
    color: #000;
    border: 1px solid rgba(14, 252, 255, 0.8);
}

/* 手动截图无冰 - 绿色样式 */
.screenshot-card.annotated-wrong.manual-normal {
    border-color: rgba(50, 205, 50, 0.5);
}

.screenshot-card.annotated-wrong.manual-normal .screenshot-status {
    background: rgba(50, 205, 50, 0.95);
    color: #fff;
    border: 1px solid rgba(50, 205, 50, 0.8);
}

/* 画框标注 - 紫色样式 */
.screenshot-card.bbox-annotated {
    border-color: rgba(147, 51, 234, 0.5);
}

.screenshot-card.bbox-annotated .screenshot-status {
    background: rgba(147, 51, 234, 0.95);
    color: #fff;
    border: 1px solid rgba(147, 51, 234, 0.8);
}

.screenshot-image-container {
    width: 100%;
    height: 140px;
    min-height: 140px;
    max-height: 140px;
    background: rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
    position: relative;
}

.screenshot-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: rgba(0, 0, 0, 0.3);
}

.screenshot-no-image {
    color: rgba(14, 252, 255, 0.4);
    font-size: 12px;
    text-align: center;
}

.screenshot-time {
    position: absolute;
    top: 6px;
    left: 6px;
    font-size: 10px;
    color: #fff;
    background: rgba(0, 0, 0, 0.7);
    padding: 3px 8px;
    border-radius: 4px;
    backdrop-filter: blur(4px);
    z-index: 10;
    font-weight: 500;
}

/* 截图来源标签（左下角） */
.screenshot-source {
    position: absolute;
    bottom: 6px;
    left: 6px;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 600;
    backdrop-filter: blur(4px);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
    z-index: 10;
}

.screenshot-source.manual {
    background: rgba(14, 252, 255, 0.85);
    color: #000;
}

.screenshot-source.auto {
    background: rgba(50, 205, 50, 0.85);
    color: #000;
}

/* ========== 标注详情面板 ========== */
.annotation-detail-panel {
    background: rgba(14, 252, 255, 0.02);
    border: 1px solid rgba(14, 252, 255, 0.2);
    border-radius: 8px;
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.detail-section {
    margin-bottom: 12px;
}

.detail-section-title {
    color: #0EFCFF;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 10px;
    padding-bottom: 6px;
    border-bottom: 1px solid rgba(14, 252, 255, 0.15);
    display: flex;
    align-items: center;
    gap: 6px;
}

.detail-preview {
    width: 100%;
    height: 150px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 6px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(14, 252, 255, 0.15);
    position: relative;
    cursor: pointer;
    transition: all 0.2s;
}

.detail-preview:hover {
    border-color: rgba(14, 252, 255, 0.5);
    box-shadow: 0 0 10px rgba(14, 252, 255, 0.2);
}

.detail-preview::after {
    content: '🔲 点击画框标注';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.7);
    color: #0EFCFF;
    font-size: 11px;
    padding: 4px;
    text-align: center;
    opacity: 0;
    transition: opacity 0.2s;
}

.detail-preview:hover::after {
    opacity: 1;
}

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

.detail-preview-placeholder {
    color: #80E5E8;
    font-size: 12px;
    text-align: center;
}

.detail-info-row {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    border-bottom: 1px solid rgba(14, 252, 255, 0.08);
    font-size: 12px;
}

.detail-info-label {
    color: rgba(255, 255, 255, 0.7);
}

.detail-info-value {
    color: #0EFCFF;
    font-weight: 500;
}

/* ========== 标注操作按钮 ========== */
.annotation-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 8px;
}

.annotation-btn {
    padding: 10px 16px;
    border-radius: 6px;
    border: 1px solid rgba(14, 252, 255, 0.3);
    cursor: pointer;
    font-size: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.3s;
}

.annotation-btn-correct {
    background: rgba(50, 205, 50, 0.15);
    color: #32CD32;
    border-color: rgba(50, 205, 50, 0.4);
}

.annotation-btn-correct:hover {
    background: rgba(50, 205, 50, 0.25);
    border-color: rgba(50, 205, 50, 0.7);
    box-shadow: 0 0 15px rgba(50, 205, 50, 0.2);
}

.annotation-btn-wrong {
    background: rgba(255, 60, 60, 0.15);
    color: #FF6B6B;
    border-color: rgba(255, 60, 60, 0.4);
}

.annotation-btn-wrong:hover {
    background: rgba(255, 60, 60, 0.25);
    border-color: rgba(255, 60, 60, 0.7);
    box-shadow: 0 0 15px rgba(255, 60, 60, 0.2);
}

.annotation-btn-save {
    background: rgba(14, 252, 255, 0.15);
    color: #0EFCFF;
    border-color: rgba(14, 252, 255, 0.4);
}

.annotation-btn-save:hover {
    background: rgba(14, 252, 255, 0.25);
    border-color: rgba(14, 252, 255, 0.7);
    box-shadow: 0 0 15px rgba(14, 252, 255, 0.2);
}

.annotation-btn-delete {
    background: rgba(128, 128, 128, 0.15);
    color: #999;
    border-color: rgba(128, 128, 128, 0.4);
}

.annotation-btn-delete:hover {
    background: rgba(255, 60, 60, 0.25);
    color: #FF6B6B;
    border-color: rgba(255, 60, 60, 0.5);
}

/* ========== 统计卡片 ========== */
.annotation-stats {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 12px;
    margin-bottom: 16px;
}

.stat-card {
    background: rgba(14, 252, 255, 0.02);
    border: 1px solid rgba(14, 252, 255, 0.2);
    border-radius: 8px;
    padding: 12px;
    text-align: center;
    transition: all 0.3s;
}

.stat-card:hover {
    border-color: rgba(14, 252, 255, 0.4);
    background: rgba(14, 252, 255, 0.05);
}

.stat-card-value {
    font-size: 24px;
    font-weight: 700;
    color: #0EFCFF;
    margin-bottom: 4px;
}

.stat-card-label {
    font-size: 11px;
    color: #80E5E8;
}

.stat-card.stat-icy .stat-card-value {
    color: #00D9FF;
}

.stat-card.stat-normal .stat-card-value {
    color: #00E676;
}

.stat-card.stat-correct .stat-card-value {
    color: #32CD32;
}

.stat-card.stat-wrong .stat-card-value {
    color: #FF6B6B;
}

.stat-card.stat-accuracy .stat-card-value {
    color: #FFD700;
}

/* ========== 模型性能Tab ========== */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.metrics-card {
    background: rgba(14, 252, 255, 0.02);
    border: 1px solid rgba(14, 252, 255, 0.2);
    border-radius: 8px;
    padding: 16px;
}

.metrics-card-title {
    color: #0EFCFF;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.metrics-bar-container {
    margin-bottom: 12px;
}

.metrics-bar-label {
    display: flex;
    justify-content: space-between;
    margin-bottom: 6px;
    font-size: 12px;
}

.metrics-bar-name {
    color: #80E5E8;
}

.metrics-bar-value {
    color: #0EFCFF;
    font-weight: 600;
}

.metrics-bar {
    height: 8px;
    background: rgba(14, 252, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
}

.metrics-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #0EFCFF, #00d4ff);
    border-radius: 4px;
    transition: width 0.5s ease;
}

.metrics-bar-fill.high {
    background: linear-gradient(90deg, #32CD32, #00FF7F);
}

.metrics-bar-fill.medium {
    background: linear-gradient(90deg, #FFD700, #FFA500);
}

.metrics-bar-fill.low {
    background: linear-gradient(90deg, #FF6B6B, #FF4444);
}

/* ========== 混淆矩阵样式 ========== */
.confusion-matrix {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.matrix-header {
    display: grid;
    grid-template-columns: 90px 1fr 1fr;
    gap: 4px;
    margin-bottom: 4px;
}

.matrix-corner {
    background: transparent;
}

.matrix-label {
    background: rgba(14, 252, 255, 0.1);
    color: #80E5E8;
    font-size: 11px;
    padding: 8px 4px;
    text-align: center;
    border-radius: 4px;
}

.matrix-row {
    display: grid;
    grid-template-columns: 90px 1fr 1fr;
    gap: 4px;
}

.matrix-label-left {
    background: rgba(14, 252, 255, 0.1);
    color: #80E5E8;
    font-size: 11px;
    padding: 8px 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
}

.matrix-cell {
    padding: 10px 6px;
    text-align: center;
    border-radius: 6px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    transition: all 0.3s;
}

.matrix-cell .cell-value {
    font-size: 18px;
    font-weight: 700;
}

.matrix-cell .cell-label {
    font-size: 9px;
    opacity: 0.8;
}

.matrix-cell.tp {
    background: linear-gradient(135deg, rgba(50, 205, 50, 0.3) 0%, rgba(50, 205, 50, 0.15) 100%);
    border: 1px solid rgba(50, 205, 50, 0.5);
    color: #32CD32;
}

.matrix-cell.tn {
    background: linear-gradient(135deg, rgba(14, 252, 255, 0.2) 0%, rgba(14, 252, 255, 0.1) 100%);
    border: 1px solid rgba(14, 252, 255, 0.4);
    color: #0EFCFF;
}

.matrix-cell.fp {
    background: linear-gradient(135deg, rgba(255, 165, 0, 0.3) 0%, rgba(255, 165, 0, 0.15) 100%);
    border: 1px solid rgba(255, 165, 0, 0.5);
    color: #FFA500;
}

.matrix-cell.fn {
    background: linear-gradient(135deg, rgba(255, 100, 100, 0.3) 0%, rgba(255, 100, 100, 0.15) 100%);
    border: 1px solid rgba(255, 100, 100, 0.5);
    color: #FF6B6B;
}

/* ========== 图表容器样式 ========== */
.chart-card {
    min-height: 180px;
}

.chart-container {
    position: relative;
    width: 100%;
    height: 140px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 6px;
    padding: 8px;
    box-sizing: border-box;
}

.chart-container canvas {
    display: block;
    width: 100% !important;
    height: 124px !important;
}

/* ========== 类别统计样式 ========== */
.class-stats-grid {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.class-stat-item {
    display: grid;
    grid-template-columns: 50px 1fr 200px;
    gap: 16px;
    align-items: center;
    padding: 12px;
    background: rgba(14, 252, 255, 0.02);
    border: 1px solid rgba(14, 252, 255, 0.15);
    border-radius: 8px;
    transition: all 0.3s;
}

.class-stat-item:hover {
    border-color: rgba(14, 252, 255, 0.4);
    background: rgba(14, 252, 255, 0.05);
}

.class-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
}

.class-icon.ice {
    background: linear-gradient(135deg, rgba(14, 252, 255, 0.3) 0%, rgba(14, 252, 255, 0.15) 100%);
    border: 1px solid rgba(14, 252, 255, 0.4);
}

.class-icon.normal {
    background: linear-gradient(135deg, rgba(50, 205, 50, 0.3) 0%, rgba(50, 205, 50, 0.15) 100%);
    border: 1px solid rgba(50, 205, 50, 0.4);
}

.class-info {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.class-name {
    color: #fff;
    font-size: 14px;
    font-weight: 600;
}

.class-metrics {
    display: flex;
    gap: 16px;
    font-size: 12px;
    color: #80E5E8;
}

.class-metrics strong {
    color: #0EFCFF;
}

.class-bar {
    height: 10px;
    background: rgba(14, 252, 255, 0.1);
    border-radius: 5px;
    overflow: hidden;
}

.class-bar-fill {
    height: 100%;
    border-radius: 5px;
    transition: width 0.5s ease;
}

.class-bar-fill.ice {
    background: linear-gradient(90deg, #0EFCFF, #00d4ff);
}

.class-bar-fill.normal {
    background: linear-gradient(90deg, #32CD32, #00FF7F);
}

/* ========== 数据集Tab ========== */
.dataset-section {
    background: rgba(14, 252, 255, 0.02);
    border: 1px solid rgba(14, 252, 255, 0.2);
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 16px;
}

.dataset-section-title {
    color: #0EFCFF;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.dataset-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 16px;
}

.dataset-actions {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.dataset-btn {
    padding: 14px 20px;
    border-radius: 8px;
    border: 1px solid rgba(14, 252, 255, 0.3);
    background: rgba(14, 252, 255, 0.1);
    color: #0EFCFF;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s;
}

.dataset-btn:hover {
    background: rgba(14, 252, 255, 0.2);
    border-color: rgba(14, 252, 255, 0.5);
    box-shadow: 0 0 20px rgba(14, 252, 255, 0.2);
    transform: translateY(-2px);
}

.dataset-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.dataset-btn-primary {
    background: linear-gradient(135deg, rgba(14, 252, 255, 0.2), rgba(0, 212, 255, 0.15));
    border-color: rgba(14, 252, 255, 0.5);
}

.dataset-btn-danger {
    background: rgba(255, 60, 60, 0.1);
    border-color: rgba(255, 60, 60, 0.3);
    color: #FF6B6B;
}

.dataset-btn-danger:hover {
    background: rgba(255, 60, 60, 0.2);
    border-color: rgba(255, 60, 60, 0.5);
    box-shadow: 0 0 20px rgba(255, 60, 60, 0.2);
}

/* ========== 困难样本网格 ========== */
.hard-samples-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 10px;
    margin-top: 12px;
}

.hard-sample-card {
    background: rgba(255, 200, 0, 0.05);
    border: 1px solid rgba(255, 200, 0, 0.3);
    border-radius: 6px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s;
}

.hard-sample-card:hover {
    border-color: rgba(255, 200, 0, 0.6);
    box-shadow: 0 4px 15px rgba(255, 200, 0, 0.15);
}

.hard-sample-image {
    width: 100%;
    height: 80px;
    object-fit: cover;
    background: rgba(0, 0, 0, 0.3);
}

.hard-sample-conf {
    padding: 6px;
    text-align: center;
    font-size: 11px;
    color: #FFC800;
}

/* ========== 空状态 ========== */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #80E5E8;
}

.empty-state-icon {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.6;
}

.empty-state-text {
    font-size: 14px;
    margin-bottom: 8px;
}

.empty-state-hint {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
}

/* ========== 响应式适配 ========== */
@media (max-width: 1200px) {
    .annotation-modal {
        width: 92vw;
    }
    
    .annotation-main-grid {
        grid-template-columns: 1fr;
    }
    
    .annotation-detail-panel {
        order: -1;
    }
    
    .metrics-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .annotation-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .screenshot-gallery {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .dataset-actions {
        grid-template-columns: 1fr;
    }
}

/* ========== 画框标注按钮 ========== */
.annotation-btn.annotation-btn-bbox {
    background: linear-gradient(135deg, rgba(0, 150, 255, 0.3), rgba(0, 200, 255, 0.15));
    border-color: rgba(0, 180, 255, 0.5);
}

.annotation-btn.annotation-btn-bbox:hover:not(:disabled) {
    background: linear-gradient(135deg, rgba(0, 150, 255, 0.5), rgba(0, 200, 255, 0.3));
    border-color: rgba(0, 200, 255, 0.8);
}

/* ========== 画框标注模态框 ========== */
.bbox-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    z-index: 10001;
    display: none;
    justify-content: center;
    align-items: center;
}

.bbox-modal.active {
    display: flex;
}

.bbox-modal-content {
    background: linear-gradient(180deg, #1a2a3a 0%, #0d1520 100%);
    border: 1px solid rgba(14, 252, 255, 0.3);
    border-radius: 12px;
    width: 90%;
    max-width: 1400px;
    height: 85vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* 主区域：左侧画布 + 右侧边栏 */
.bbox-main-area {
    display: flex;
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

.bbox-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: rgba(14, 252, 255, 0.05);
    border-bottom: 1px solid rgba(14, 252, 255, 0.2);
}

.bbox-modal-header h3 {
    margin: 0;
    color: #0EFCFF;
    font-size: 16px;
}

.bbox-close-btn {
    background: transparent;
    border: none;
    color: #80E5E8;
    font-size: 20px;
    cursor: pointer;
    padding: 4px 8px;
    transition: all 0.2s;
}

.bbox-close-btn:hover {
    color: #FF6B6B;
}

.bbox-canvas-container {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #1a1a1a;
    overflow: hidden;
    padding: 10px;
    flex: 1;
    min-width: 0;
}

/* 右侧边栏 */
.bbox-sidebar {
    width: 280px;
    min-width: 280px;
    background: rgba(14, 252, 255, 0.02);
    border-left: 1px solid rgba(14, 252, 255, 0.2);
    display: flex;
    flex-direction: column;
    padding: 16px;
}

.bbox-sidebar-header {
    color: #0EFCFF;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(14, 252, 255, 0.2);
}

#bboxCanvas {
    display: block;
    cursor: crosshair;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
}

.bbox-instructions {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 20px;
    background: rgba(0, 0, 0, 0.7);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 12px;
    color: #80E5E8;
}

/* 侧边栏中的标签输入 */
.bbox-sidebar .bbox-label-input {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 12px;
}

.bbox-sidebar .bbox-label-input label {
    color: #80E5E8;
    font-size: 12px;
}

.bbox-sidebar .bbox-label-input input {
    width: 100%;
    max-width: none;
    background: rgba(14, 252, 255, 0.05);
    border: 1px solid rgba(14, 252, 255, 0.3);
    border-radius: 6px;
    padding: 8px 12px;
    color: #0EFCFF;
    font-size: 13px;
}

.bbox-sidebar .bbox-label-input input:focus {
    outline: none;
    border-color: #0EFCFF;
}

/* 侧边栏中的按钮 */
.bbox-sidebar .bbox-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: auto;
    padding-top: 12px;
    border-top: 1px solid rgba(14, 252, 255, 0.2);
}

.bbox-sidebar .bbox-btn {
    width: 100%;
    justify-content: center;
}

.bbox-label-input {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.bbox-label-input label {
    color: #80E5E8;
    font-size: 13px;
}

.bbox-label-input input {
    flex: 1;
    background: rgba(14, 252, 255, 0.05);
    border: 1px solid rgba(14, 252, 255, 0.3);
    border-radius: 6px;
    padding: 8px 12px;
    color: #0EFCFF;
    font-size: 13px;
    max-width: 200px;
}

.bbox-label-input input:focus {
    outline: none;
    border-color: #0EFCFF;
}

.bbox-list {
    flex: 1;
    overflow-y: auto;
    margin-bottom: 12px;
    min-height: 0;
}

/* 自定义滚动条样式 */
.bbox-list::-webkit-scrollbar {
    width: 8px;
}

.bbox-list::-webkit-scrollbar-track {
    background: rgba(14, 252, 255, 0.05);
    border-radius: 4px;
}

.bbox-list::-webkit-scrollbar-thumb {
    background: rgba(14, 252, 255, 0.3);
    border-radius: 4px;
}

.bbox-list::-webkit-scrollbar-thumb:hover {
    background: rgba(14, 252, 255, 0.5);
}

.bbox-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 10px;
    background: rgba(14, 252, 255, 0.05);
    border-radius: 4px;
    margin-bottom: 4px;
    font-size: 12px;
}

.bbox-item-label {
    color: #0EFCFF;
    font-weight: 500;
}

.bbox-item-coords {
    color: #80E5E8;
}

.bbox-item-delete {
    background: transparent;
    border: none;
    color: #FF6B6B;
    cursor: pointer;
    padding: 2px 6px;
    font-size: 14px;
}

.bbox-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.bbox-btn {
    padding: 10px 20px;
    border-radius: 6px;
    border: 1px solid;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
}

.bbox-btn-clear {
    background: rgba(255, 100, 100, 0.1);
    border-color: rgba(255, 100, 100, 0.3);
    color: #FF6B6B;
}

.bbox-btn-clear:hover {
    background: rgba(255, 100, 100, 0.2);
}

.bbox-btn-save {
    background: linear-gradient(135deg, rgba(14, 252, 255, 0.3), rgba(14, 252, 255, 0.1));
    border-color: rgba(14, 252, 255, 0.5);
    color: #0EFCFF;
}

.bbox-btn-save:hover {
    background: linear-gradient(135deg, rgba(14, 252, 255, 0.5), rgba(14, 252, 255, 0.2));
}
