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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #1f2937;
    background: linear-gradient(135deg, #f8fafc 0%, #e0f2fe 100%);
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Header */
.header {
    background: white;
    border-bottom: 1px solid #e5e7eb;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    padding: 1.5rem 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo-icon {
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    padding: 0rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    border: 1px solid #e5e7eb;
    overflow: hidden;
}

.logo-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 0.5rem;
}

.logo-text h1 {
    font-size: 1.875rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 0.25rem;
}

.logo-text p {
    color: #6b7280;
    font-size: 0.875rem;
}

/* Main Content */
.main {
    padding: 1rem 0;
}

/* Introduction Section */
.intro-section {
    margin-bottom: 1rem;
}

.intro-content {
    background: white;
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border: 1px solid #e5e7eb;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.intro-icon {
    font-size: 1.5rem;
    background: #dcfce7;
    color: #16a34a;
    width: 3rem;
    height: 3rem;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.intro-text h2 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #111827;
}

.intro-text p {
    color: #374151;
    margin-bottom: 1rem;
    line-height: 1.5;
}

/* 新功能说明特殊样式 */
.intro-text p:has(strong) {
    background: linear-gradient(135deg, #dcfce7 0%, #f0f9ff 100%);
    padding: 0.75rem;
    border-radius: 0.5rem;
    border-left: 4px solid #10b981;
    font-size: 0.9rem;
}

.intro-text strong {
    color: #10b981;
}

.features {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    font-size: 0.875rem;
    color: #6b7280;
}

.feature {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Content Grid */
.content-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    align-items: start;
}

/* Cards */
.card {
    background: white;
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border: 1px solid #e5e7eb;
    margin-bottom: 1.5rem;
}

.card h2 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #111827;
}

.card h3 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #111827;
}

/* Card Header */
.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.card-header h2 {
    margin-bottom: 0;
}

/* Sample Button */
.btn-sample {
    background: #10b981;
    color: white;
    border: none;
    padding: 0.25rem 0.5rem;
    border-radius: 0.5rem;
    font-size: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-height: auto;
}

.btn-sample:hover {
    background: #059669;
    transform: translateY(-1px);
}

.btn-sample .btn-icon {
    font-size: 1rem;
}

/* Tab Navigation */
.input-method-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.tab-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    background: #f9fafb;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.875rem;
    font-weight: 500;
}

.tab-btn:hover {
    background: #f3f4f6;
    border-color: #9ca3af;
}

.tab-btn.active {
    background: #2563eb;
    color: white;
    border-color: #2563eb;
}

.tab-icon {
    font-size: 1rem;
}

/* Input Sections */
.input-section {
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: #f8fafc;
    border-radius: 0.75rem;
    border: 1px solid #e2e8f0;
}

.input-section h3 {
    color: #1e293b;
    margin-bottom: 1rem;
    font-size: 1rem;
    font-weight: 600;
}

/* Data Section */
.data-section {
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: #f8fafc;
    border-radius: 0.75rem;
    border: 1px solid #e2e8f0;
}

.data-section h3 {
    color: #1e293b;
    margin-bottom: 1rem;
    font-size: 1rem;
    font-weight: 600;
}

/* Calculate Section */
.calculate-section {
    padding: 1rem;
    background: #f8fafc;
    border-radius: 0.75rem;
    border: 1px solid #e2e8f0;
    text-align: center;
}

/* Inline Fitting Method Selection */
.fitting-method-inline {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
    padding: 0.5rem;
    font-size: 0.9rem;
    color: #475569;
}

.fitting-label {
    font-weight: 500;
    color: #334155;
}

.checkbox-inline {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    transition: background-color 0.2s;
}

.checkbox-inline:hover {
    background-color: #e2e8f0;
}

.checkbox-inline input[type="checkbox"] {
    cursor: pointer;
    accent-color: #3b82f6;
    width: 16px;
    height: 16px;
}

.checkbox-inline span {
    user-select: none;
}

.fitting-tip {
    color: #64748b;
    font-size: 0.85rem;
}

/* Image Upload */
.upload-area {
    border: 2px dashed #d1d5db;
    border-radius: 0.75rem;
    padding: 0.5rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #fafafa;
    position: relative;
    outline: none;
    min-height: 80px;
}

.upload-area:hover {
    border-color: #2563eb;
    background: #f8fafc;
}

.upload-area.drag-over {
    border-color: #2563eb;
    background: #eff6ff;
}

.upload-area.focused {
    border-color: #10b981;
    background: #f0fdf4;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

.upload-area.focused .upload-text {
    color: #10b981;
    font-weight: 600;
}

.upload-area.focused .upload-hint {
    color: #10b981;
}

.upload-area.focused .upload-icon {
    background: #dcfce7;
    color: #10b981;
}

.upload-area.focused .paste-tip {
    background: #dcfce7;
    border-color: #10b981;
    color: #10b981;
    font-weight: 500;
}

.upload-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.2rem;
}

.upload-icon {
    font-size: 1.2rem;
    color: #6b7280;
}

.upload-text {
    font-size: 0.8rem;
    font-weight: 500;
    color: #374151;
}

.upload-hint {
    color: #9ca3af;
    font-size: 0.7rem;
    margin: 0;
}

/* 粘贴提示样式 */
.paste-tip {
    color: #6b7280;
    font-size: 0.7rem;
    margin: 0.2rem 0 0.3rem 0;
    padding: 0.2rem;
    background: #f3f4f6;
    border-radius: 0.375rem;
    border: 1px solid #e5e7eb;
    transition: all 0.3s ease;
}

.btn-upload {
    background: #2563eb;
    color: white;
    border: none;
    padding: 0.4rem 0.8rem;
    border-radius: 0.5rem;
    font-size: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-upload:hover {
    background: #1d4ed8;
}

/* Image Preview */
.image-preview {
    margin-top: 1.5rem;
}

.preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.preview-header h4 {
    font-size: 1rem;
    font-weight: 600;
    color: #111827;
}

#previewImg {
    width: 100%;
    max-height: 300px;
    object-fit: contain;
    border-radius: 0.5rem;
    border: 1px solid #e5e7eb;
    margin-bottom: 1rem;
}

.extract-controls {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.extract-status {
    font-size: 0.875rem;
    padding: 0.5rem;
    border-radius: 0.375rem;
}

.status-loading {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fde68a;
}

.status-success {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.status-error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

/* Extracted Data */
.extracted-data-section {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e5e7eb;
}

.extracted-data-section h4 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #111827;
}

.extracted-data-table {
    margin-bottom: 1rem;
}

.extracted-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

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

.btn-secondary:hover {
    background: #4b5563;
}

/* Input Form */
.input-form {
    margin-bottom: 0rem;
}

.input-group {
    margin-bottom: 1rem;
}

.input-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
    margin-bottom: 0.5rem;
}

.input-group input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    transition: all 0.2s ease;
}

.input-group input:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    min-height: 2.75rem;
}

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

.btn-primary {
    background: #16a34a;
    color: white;
    width: 100%;
}

.btn-primary:hover:not(:disabled) {
    background: #15803d;
    transform: translateY(-1px);
}

.btn-calculate {
    background: #2563eb;
    color: white;
    width: 100%;
    font-size: 1rem;
    padding: 1rem 1.5rem;
}

.btn-calculate:hover:not(:disabled) {
    background: #1d4ed8;
    transform: translateY(-1px);
}

.btn-small {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    min-height: auto;
}

.btn-edit {
    background: #3b82f6;
    color: white;
}

.btn-edit:hover {
    background: #2563eb;
}

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

.btn-delete:hover {
    background: #dc2626;
}

.btn-save {
    background: #16a34a;
    color: white;
}

.btn-save:hover {
    background: #15803d;
}

.btn-cancel {
    background: #6b7280;
    color: white;
}

.btn-cancel:hover {
    background: #4b5563;
}

/* Loading Spinner */
.loading-spinner {
    width: 1.25rem;
    height: 1.25rem;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Table */
.table-container {
    overflow-x: auto;
    border-radius: 0.5rem;
    border: 1px solid #e5e7eb;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.data-table th,
.data-table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
}

.data-table th {
    background: #f9fafb;
    font-weight: 500;
    color: #374151;
}

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

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

/* 操作列样式 - 让按钮在同一行显示 */
.data-table td:last-child {
    white-space: nowrap;
}

.data-table td:last-child .btn-small {
    margin-right: 0rem;
}

.data-table td:last-child .btn-small:last-child {
    margin-right: 0;
}

.percentage-high {
    color: #16a34a;
    font-weight: 500;
}

.percentage-medium {
    color: #ea580c;
    font-weight: 500;
}

.percentage-low {
    color: #dc2626;
    font-weight: 500;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: #6b7280;
}

.empty-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

/* Messages */
.message {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    border: 1px solid;
    margin-bottom: 1rem;
    transition: all 0.3s ease;
    animation: slideIn 0.3s ease;
}

.message-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #b91c1c;
}

.message-success {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #16a34a;
}

/* Results */
.result-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.result-card {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    padding: 1.5rem;
    border-radius: 0.75rem;
    text-align: center;
}

.result-label {
    font-size: 0.875rem;
    color: #374151;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.result-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #111827;
}

.confidence-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
    margin-bottom: 1rem;
}

.confidence-high {
    background: #dcfce7;
    color: #16a34a;
    border: 1px solid #bbf7d0;
}

.confidence-medium {
    background: #fef3c7;
    color: #d97706;
    border: 1px solid #fde68a;
}

.confidence-low {
    background: #fee2e2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

/* Technical Details */
.tech-details {
    background: #f9fafb;
    border-radius: 0.5rem;
    padding: 1rem;
    margin: 1rem 0;
}

.tech-details h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: #111827;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.tech-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.tech-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}

.tech-label {
    color: #6b7280;
}

.tech-value {
    font-family: 'Courier New', monospace;
    font-weight: 500;
    color: #111827;
}

.equation-box {
    background: #f3f4f6;
    border-radius: 0.5rem;
    padding: 0.75rem;
    font-family: 'Courier New', monospace;
    font-size: 0.75rem;
    word-break: break-all;
    color: #374151;
}

/* Chart */
.chart-container {
    margin: 1.5rem 0;
    background: #f9fafb;
    border-radius: 0.5rem;
    padding: 1rem;
}

.chart-svg {
    width: 100%;
    height: 20rem;
    background: white;
    border-radius: 0.5rem;
}

.chart-legend {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 1rem;
    font-size: 0.875rem;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.legend-color {
    width: 1rem;
    height: 0.25rem;
    border-radius: 0.125rem;
}

.legend-color.data-points {
    width: 0.75rem;
    height: 0.75rem;
    border-radius: 50%;
    background: #ef4444;
}

.legend-color.fitting-curve {
    background: #3b82f6;
}

.legend-color.target-line {
    background: #f59e0b;
    border: 1px dashed #f59e0b;
    height: 0.125rem;
}

.legend-color.ccm-point {
    width: 0.75rem;
    height: 0.75rem;
    border-radius: 50%;
    background: #16a34a;
}

/* Chart Labels */
.chart-label {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.chart-axis-label {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Confidence Analysis */
.confidence-analysis {
    margin-top: 1.5rem;
}

.confidence-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 1rem;
    font-size: 0.875rem;
}

.confidence-dot {
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 50%;
    margin-top: 0.5rem;
    flex-shrink: 0;
}

.confidence-dot.blue {
    background: #3b82f6;
}

.confidence-dot.green {
    background: #16a34a;
}

.confidence-dot.orange {
    background: #f59e0b;
}

.confidence-item strong {
    color: #111827;
    display: block;
    margin-bottom: 0.25rem;
}

.confidence-item p {
    color: #6b7280;
    line-height: 1.4;
}

/* Footer */
.footer {
    background: white;
    border-top: 1px solid #e5e7eb;
    margin-top: 4rem;
}

.footer-content {
    text-align: center;
    padding: 2rem 0;
    color: #6b7280;
    font-size: 0.875rem;
}

.footer-content p:first-child {
    margin-bottom: 0.5rem;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .content-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .result-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .tech-grid {
        grid-template-columns: 1fr;
    }
    
    .extracted-actions {
        flex-direction: column;
    }
    
    .extracted-actions .btn {
        width: 100%;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 0.75rem;
    }
    
    .header-content {
        padding: 1rem 0;
    }
    
    .logo {
        flex-direction: column;
        text-align: center;
        gap: 0.75rem;
    }
    
    .logo-text h1 {
        font-size: 1.5rem;
    }
    
    .intro-content {
        flex-direction: column;
        text-align: center;
    }
    
    .features {
        justify-content: center;
    }
    
    .card {
        padding: 1rem;
    }
    
    .main {
        padding: 1rem 0;
    }
    
    .chart-legend {
        gap: 1rem;
        font-size: 0.75rem;
    }
    
    .data-table {
        font-size: 0.75rem;
    }
    
    .data-table th,
    .data-table td {
        padding: 0.5rem 0.25rem;
    }
    
    .input-method-tabs {
        flex-direction: column;
    }
    
    .tab-btn {
        width: 100%;
        justify-content: center;
    }
    
    .chart-svg {
        height: 250px;
    }
    
    .card-header {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }
    
    .btn-sample {
        align-self: flex-end;
        width: auto;
    }
}

@media (max-width: 480px) {
    .logo-text h1 {
        font-size: 1.25rem;
    }
    
    .logo-text p {
        font-size: 0.75rem;
    }
    
    .result-value {
        font-size: 1.25rem;
    }
    
    .btn {
        font-size: 0.75rem;
        padding: 0.625rem 1rem;
    }
    
    .btn-calculate {
        font-size: 0.875rem;
        padding: 0.875rem 1rem;
    }
    
    .upload-area {
        padding: 1.5rem 1rem;
    }
    
    .upload-icon {
        font-size: 2rem;
    }
    
    .chart-svg {
        height: 14rem;
    }
}

/* Message Styles */
.message {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    border: 1px solid;
    margin-bottom: 1rem;
    transition: all 0.3s ease;
    animation: slideIn 0.3s ease;
}

/* 粘贴消息特殊样式 */
.paste-message {
    margin-bottom: 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(-10px);
    }
}

/* 错误情况的样式 */
.error-card {
    border-left: 4px solid #ef4444;
    background: linear-gradient(135deg, #fef2f2 0%, #fff 100%);
}

.error-value {
    color: #ef4444 !important;
    font-weight: 600;
}

.error-message {
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 0.5rem;
    padding: 1rem;
    margin-top: 1rem;
    font-size: 0.875rem;
    line-height: 1.5;
    color: #7f1d1d;
}

.analysis-notes {
    margin-top: 1.5rem;
    padding: 1rem;
    background: #fafafa;
    border-radius: 0.5rem;
    border: 1px solid #e5e7eb;
}

.analysis-notes h4 {
    margin: 0 0 0.75rem 0;
    color: #374151;
    font-size: 0.875rem;
    font-weight: 600;
}

.analysis-notes ul {
    margin: 0;
    padding-left: 1.25rem;
    list-style-type: disc;
}

.analysis-notes li {
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    line-height: 1.5;
    color: #6b7280;
}

.analysis-notes li:last-child {
    margin-bottom: 0;
}

/* 图片裁剪相关样式 */
.preview-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.image-container {
    position: relative;
    max-width: 100%;
    margin: 1rem 0;
}

/* 裁剪模态框样式 */
.crop-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(5px);
}

.crop-modal-content {
    background: white;
    border-radius: 1rem;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    max-width: 90vw;
    max-height: 90vh;
    width: 800px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.crop-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid #e5e7eb;
}

.crop-modal-header h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #111827;
    margin: 0;
}

.crop-container {
    flex: 1;
    padding: 1.5rem;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 400px;
    max-height: 500px;
    overflow: hidden;
}

.crop-container img {
    max-width: 100%;
    max-height: 100%;
    display: block;
}

.crop-modal-footer {
    display: flex;
    gap: 1rem;
    padding: 1.5rem;
    border-top: 1px solid #e5e7eb;
    justify-content: flex-end;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .crop-modal-content {
        width: 95vw;
        max-height: 85vh;
    }
    
    .crop-container {
        min-height: 300px;
        max-height: 400px;
        padding: 1rem;
    }
    
    .crop-modal-header,
    .crop-modal-footer {
        padding: 1rem;
    }
    
    .preview-actions {
        flex-direction: column;
        gap: 0.25rem;
    }
    
    .preview-actions .btn {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .crop-modal-footer {
        flex-direction: column;
    }
    
    .crop-modal-footer .btn {
        width: 100%;
    }
}

/* CCM标记点控制 */
.ccm-markers-control {
    margin-bottom: 1rem;
    padding: 1rem;
    background: #f9fafb;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}

.ccm-markers-control label {
    transition: all 0.2s ease;
}

.ccm-markers-control label:hover {
    background: #f3f4f6 !important;
    border-color: #9ca3af !important;
}

.ccm-markers-control input[type="checkbox"] {
    cursor: pointer;
    width: 16px;
    height: 16px;
    accent-color: #3b82f6;
}

.ccm-markers-control input[type="number"] {
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.875rem;
}

.ccm-markers-control input[type="number"]:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.remove-custom-ccm {
    transition: color 0.2s ease;
}

.remove-custom-ccm:hover {
    color: #dc2626 !important;
    transform: scale(1.2);
}

/* CCM标签拖动 */
.ccm-label-draggable {
    cursor: move;
    transition: opacity 0.2s ease;
}

.ccm-label-draggable:hover {
    opacity: 0.8;
}

.ccm-label-draggable:active {
    cursor: grabbing;
}

/* 为SVG添加用户选择禁用，避免拖动时选中文字 */
.ccm-chart {
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
}