/**
 * 身体围度测量 - 3D分析
 * 现代UI设计与3D动画效果
 */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    /* 主色调 */
    --primary: #4f46e5;
    --primary-dark: #3730a3;
    --primary-light: #818cf8;
    
    /* 状态颜色 */
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #3b82f6;
    
    /* 中性色 */
    --bg-light: #f9fafb;
    --bg-dark: #111827;
    --card-bg: #ffffff;
    --sidebar-bg: #1e293b;
    
    /* 文字颜色 */
    --text-dark: #1f2937;
    --text-medium: #4b5563;
    --text-light: #9ca3af;
    --text-white: #f9fafb;
    
    /* 阴影 */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    
    /* 圆角 */
    --radius-sm: 0.25rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-full: 9999px;
    
    /* 动画 */
    --ease-standard: cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-light);
    color: var(--text-dark);
    min-height: 100vh;
    line-height: 1.5;
}

.app-container {
    display: grid;
    grid-template-columns: 280px 1fr;
    min-height: 100vh;
}

/* 侧边栏样式 */
.sidebar {
    background-color: var(--sidebar-bg);
    color: var(--text-white);
    padding: 2rem 1.5rem;
    display: flex;
    flex-direction: column;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 2.5rem;
}

.logo-icon {
    font-size: 1.5rem;
}

.logo h2 {
    font-size: 1.5rem;
    font-weight: 600;
}

.nav-menu ul {
    list-style: none;
}

.nav-menu li {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    margin-bottom: 0.5rem;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
}

.nav-menu li:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.nav-menu li.active {
    background-color: var(--primary);
    font-weight: 500;
}

.nav-menu .icon {
    margin-right: 0.75rem;
}

.user-info {
    margin-top: auto;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    gap: 1rem;
}

.avatar-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-light), var(--primary));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
}

.user-details h3 {
    font-size: 0.95rem;
    font-weight: 500;
}

.user-details p {
    font-size: 0.8rem;
    color: var(--text-light);
}

/* 主内容区样式 */
.main-content {
    padding: 2rem;
    overflow-y: auto;
}

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

.content-header h1 {
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--text-dark);
}

.action-buttons {
    display: flex;
    gap: 1rem;
}

.btn {
    padding: 0.625rem 1.25rem;
    border-radius: var(--radius-md);
    font-size: 0.95rem;
    font-weight: 500;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-outline {
    background-color: transparent;
    border: 1px solid var(--text-light);
    color: var(--text-medium);
}

.btn-outline:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.btn-primary {
    background-color: var(--primary);
    color: white;
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    box-shadow: var(--shadow-md);
}

/* 分析容器 */
.analysis-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

/* 模型区域 */
.model-card {
    background-color: var(--card-bg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    overflow: hidden;
    height: 600px;
    display: flex;
    flex-direction: column;
}

.model-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.model-header h2 {
    font-size: 1.25rem;
    font-weight: 600;
}

.model-controls {
    display: flex;
    gap: 0.75rem;
}

.control-icon {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-md);
    background-color: rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.2s;
}

.control-icon:hover {
    background-color: rgba(0, 0, 0, 0.1);
}

.model-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

.model-container {
    flex: 1;
}

.model-figure {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    background-color: #f3f4f6;
}

.model-display {
    position: relative;
    height: 520px;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background-color: #f5f7fa; /* 添加轻微的背景色 */
}

/* 基本人体图像 */
#figure-image {
    height: 100%;
    object-fit: contain;
    opacity: 0; /* 初始隐藏，由动画控制显示 */
    z-index: 1;
    transition: opacity 0.5s ease;
}

/* 轮廓图样式 */
#contour-image {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 100%;
    object-fit: contain;
    z-index: 2;
    opacity: 0; /* 初始隐藏 */
    clip-path: inset(100% 0 0 0); /* 初始完全隐藏 */
    transition: opacity 0.5s ease;
}

/* 轮廓蒙版效果 */
.contour-mask {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        to bottom,
        transparent 0%,
        rgba(79, 70, 229, 0.05) 48%,
        rgba(79, 70, 229, 0.3) 49.5%,
        rgba(79, 70, 229, 0.3) 50.5%,
        rgba(79, 70, 229, 0.05) 52%,
        transparent 100%
    );
    background-size: 100% 200%;
    z-index: 4;
    opacity: 0;
    pointer-events: none;
}

/* 扫描线基本样式 */
.scan-line {
    position: absolute;
    width: 100%;
    height: 2px;
    background: linear-gradient(
        to right,
        transparent 0%,
        var(--primary) 20%,
        var(--primary) 80%,
        transparent 100%
    );
    box-shadow: 0 0 15px 3px var(--primary);
    transform: translateY(-100%);
    opacity: 0;
    z-index: 5;
}

/* 第一次扫描线 */
.scan-line.first-scan {
    /* 第一次扫描动画由JS控制 */
}

/* 第二次扫描线 */
.scan-line.second-scan {
    /* 第二次扫描动画由JS控制 */
}

/* 扫描动画 */
@keyframes scanUpward {
    0% {
        transform: translateY(100%);
        opacity: 1;
    }
    100% {
        transform: translateY(0%);
        opacity: 0;
    }
}

/* 人物图像显示动画 - 从下到上生长 */
@keyframes revealFigure {
    0% {
        opacity: 0.3;
        clip-path: inset(100% 0 0 0);
    }
    100% {
        opacity: 1.0; /* 半透明效果 */
        clip-path: inset(0 0 0 0);
    }
}

/* 轮廓图显示动画 */
@keyframes revealContour {
    0% {
        opacity: 0;
        clip-path: inset(100% 0 0 0);
    }
    100% {
        opacity: 0.92;
        clip-path: inset(0 0 0 0);
    }
}

/* 测量线区域样式 */
.measurement-lines {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 6;
}

/* 单条测量线样式 */
.measurement-line {
    position: absolute;
    width: 100%;
    height: 1px;
    display: flex;
    align-items: center;
    opacity: 0; /* 初始隐藏 */
    background-color: var(--primary);
}

/* 测量线左侧部分 */
.line-left {
    position: absolute;
    left: 35%;
    width: 15%;
    height: 1px;
    background: linear-gradient(to right, transparent, var(--primary));
    transform: scaleX(0); /* 初始状态为0宽度 */
    transform-origin: right;
}

/* 测量线中间部分 */
.line-center {
    position: absolute;
    left: 50%;
    width: 0%;
    height: 1px;
    background-color: var(--primary);
    transform: scaleX(0); /* 初始状态为0宽度 */
}

/* 测量线右侧部分 */
.line-right {
    position: absolute;
    right: 15%;
    width: 35%;
    height: 1px;
    background: linear-gradient(to left, transparent, var(--primary));
    transform: scaleX(0); /* 初始状态为0宽度 */
    transform-origin: left;
}

/* 测量值样式 */
.measurement-value {
    position: absolute;
    right: 5%;
    background-color: white;
    color: var(--text-dark);
    font-weight: 700;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    opacity: 0;
    transform: translateX(20px);
}

.measurement-value span {
    font-size: 14px;
    color: var(--text-medium);
    margin-left: 2px;
    font-weight: 400;
}

/* 各部位测量线位置 */
.chest-line {
    top: 30%;
    background-color: var(--primary);
    box-shadow: 0 0 5px rgba(79, 70, 229, 0.5);
    height: 2px;
}

.waist-line {
    top: 43%;
    background-color: var(--primary);
    box-shadow: 0 0 5px rgba(79, 70, 229, 0.5);
    height: 2px;
}

.hip-line {
    top: 55%;
    background-color: var(--primary);
    box-shadow: 0 0 5px rgba(79, 70, 229, 0.5);
    height: 2px;
}

.thigh-line {
    top: 65%;
    background-color: var(--primary);
    box-shadow: 0 0 5px rgba(79, 70, 229, 0.5);
    height: 2px;
}

/* 测量线展开动画 */
@keyframes expandLineLeft {
    0% {
        transform: scaleX(0);
    }
    100% {
        transform: scaleX(1);
    }
}

@keyframes expandLineCenter {
    0% {
        width: 0%;
    }
    100% {
        width: 30%;
    }
}

@keyframes expandLineRight {
    0% {
        transform: scaleX(0);
    }
    100% {
        transform: scaleX(1);
    }
}

/* 测量值出现动画 */
@keyframes showValue {
    0% {
        opacity: 0;
        transform: translateX(20px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

.grid-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(to right, rgba(79, 70, 229, 0.1) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(79, 70, 229, 0.1) 1px, transparent 1px);
    background-size: 20px 20px;
    opacity: 0;
    animation: fadeIn 1s ease forwards 3s;
    pointer-events: none;
    z-index: 3;
}

.model-progress-bar {
    height: 4px;
    background-color: rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background-color: var(--primary);
    width: 0;
    animation: progressFill 4s ease-out forwards 1s;
}

@keyframes progressFill {
    0% {
        width: 0;
    }
    100% {
        width: 100%;
    }
}

/* 热点标记 */
.hotspot {
    position: absolute;
    pointer-events: all;
    cursor: pointer;
    z-index: 10;
    opacity: 0;
}

.hotspot-dot {
    width: 14px;
    height: 14px;
    background-color: white;
    border: 2px solid var(--primary);
    border-radius: 50%;
    position: relative;
    z-index: 2;
}

.hotspot-pulse {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: rgba(79, 70, 229, 0.3);
    z-index: 1;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: translate(-50%, -50%) scale(0.5);
        opacity: 1;
    }
    100% {
        transform: translate(-50%, -50%) scale(1.5);
        opacity: 0;
    }
}

.hotspot-label {
    position: absolute;
    background-color: var(--primary);
    color: white;
    padding: 0.3rem 0.75rem;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 500;
    white-space: nowrap;
    transform: translateY(-100%);
    top: -10px;
    left: 50%;
    transform: translateX(-50%) translateY(-100%);
    opacity: 0;
    transition: opacity 0.3s;
    box-shadow: var(--shadow-sm);
}

.hotspot:hover .hotspot-label {
    opacity: 1;
}

/* 热点位置和动画 - 调整位置适应新的模型尺寸 */
.chest {
    left: 50%;
    top: 30%;
}

.waist {
    left: 50%;
    top: 43%;
}

.hip {
    left: 50%;
    top: 55%;
}

.thigh-left {
    left: 40%;
    top: 65%;
}

.thigh-right {
    left: 60%;
    top: 65%;
}

/* 数据分析区域 */
.data-analysis {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    height: 600px; /* 匹配模型卡片高度 */
    overflow: hidden;
}

.analysis-card {
    background-color: var(--card-bg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    overflow: hidden;
}

.analysis-card:first-child {
    flex: 3; /* 为数据详情区域分配更多空间 */
}

.analysis-card.recommendations {
    flex: 2; /* 为建议区域分配更少空间 */
}

.card-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-header h2 {
    font-size: 1.25rem;
    font-weight: 600;
}

.date-selector {
    display: flex;
    gap: 0.5rem;
}

.date-selector span {
    padding: 0.3rem 0.75rem;
    border-radius: var(--radius-full);
    font-size: 0.875rem;
    cursor: pointer;
    background-color: rgba(0, 0, 0, 0.05);
    color: var(--text-medium);
}

.date-selector span.selected {
    background-color: var(--primary);
    color: white;
}

/* 指标容器 */
.metrics-container {
    padding: 1.25rem;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
    overflow-y: auto;
    max-height: calc(100% - 60px); /* 确保内容可滚动 */
}

.metric-box {
    background-color: rgba(0, 0, 0, 0.02);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    cursor: pointer;
    transition: all 0.2s;
}

.metric-box:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-sm);
}

.metric-box.active {
    border-left: 4px solid var(--primary);
    background-color: rgba(79, 70, 229, 0.05);
}

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

.metric-header h3 {
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-medium);
}

.metric-value {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-dark);
}

.unit {
    font-size: 0.875rem;
    font-weight: 400;
    margin-left: 0.25rem;
    color: var(--text-light);
}

.metric-chart {
    margin-bottom: 1rem;
}

.chart-bar {
    height: 6px;
    background-color: rgba(0, 0, 0, 0.05);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.chart-fill {
    height: 100%;
    background: linear-gradient(to right, var(--primary-light), var(--primary));
    border-radius: var(--radius-full);
    width: 0;
    animation: chartFill 1.5s ease-out forwards 4s;
}

@keyframes chartFill {
    0% {
        width: 0;
    }
    100% {
        width: var(--width, 100%);
    }
}

.metric-change {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
}

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

.change-value {
    font-weight: 500;
}

.change-period {
    color: var(--text-light);
}

.increase {
    color: var(--success);
}

.decrease {
    color: var(--danger);
}

.no-change {
    color: var(--text-medium);
}

/* 建议内容区 */
.recommendation-content {
    padding: 1.25rem;
    overflow-y: auto;
    max-height: calc(100% - 60px); /* 确保内容可滚动 */
}

.recommendation-item {
    display: flex;
    align-items: flex-start;
    padding: 1rem;
    border-radius: var(--radius-md);
    margin-bottom: 1rem;
    background-color: rgba(0, 0, 0, 0.02);
}

.recommendation-item.highlight {
    background-color: rgba(79, 70, 229, 0.05);
    border-left: 4px solid var(--primary);
}

.recommendation-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    background-color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    margin-right: 1rem;
    box-shadow: var(--shadow-sm);
}

.recommendation-text h3 {
    font-size: 1rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.recommendation-text p {
    font-size: 0.875rem;
    color: var(--text-medium);
}

/* 弹窗样式 */
.popup-detail {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}

.popup-content {
    background-color: var(--card-bg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
}

.popup-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.popup-title {
    font-size: 1.25rem;
    font-weight: 600;
}

.popup-close {
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-medium);
}

.popup-body {
    padding: 1.5rem;
}

/* 详细数据样式 */
.detail-metric {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.detail-metric:last-child {
    border-bottom: none;
}

.detail-label {
    font-size: 0.95rem;
    color: var(--text-medium);
}

.detail-value {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-dark);
}

.text-success {
    color: var(--success);
}

.text-danger {
    color: var(--danger);
}

.detail-chart {
    margin-top: 1.5rem;
    height: 200px;
    background-color: rgba(0, 0, 0, 0.02);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
    font-size: 0.9rem;
}

.popup-detail.active {
    opacity: 1;
    visibility: visible;
}

/* 通用动画 */
@keyframes fadeIn {
    0% {
        opacity: 0;
    }
    100% {
        opacity: 1;
    }
}

/* 响应式调整 */
@media (max-width: 1200px) {
    .analysis-container {
        grid-template-columns: 1fr;
    }
    
    .metrics-container {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .app-container {
        grid-template-columns: 1fr;
    }
    
    .sidebar {
        display: none;
    }
    
    .metrics-container {
        grid-template-columns: 1fr;
    }
}

/* AI助手区域 */
.ai-assistant {
    position: fixed;
    top: 2rem;
    left: 50%;
    transform: translateX(-50%) translateY(-20px);
    background-color: rgba(255, 255, 255, 0.95);
    border-radius: var(--radius-lg);
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: var(--shadow-md);
    z-index: 100;
    max-width: 90%;
    width: auto;
    animation: fadeSlideDown 0.5s var(--ease-standard) forwards;
}

@keyframes fadeSlideDown {
    0% {
        opacity: 0;
        transform: translateX(-50%) translateY(-20px);
    }
    100% {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

.ai-indicator {
    position: relative;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ai-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-light), var(--primary));
    color: white;
    font-size: 0.8rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 2;
}

.ai-ripple {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 2px solid var(--primary);
    opacity: 0;
    animation: ripple 2s ease-out infinite;
}

@keyframes ripple {
    0% {
        transform: scale(0.8);
        opacity: 1;
    }
    100% {
        transform: scale(1.5);
        opacity: 0;
    }
}

.ai-message {
    font-size: 0.95rem;
    color: var(--text-medium);
    flex: 1;
}

/* 高亮动画 */
.highlight-pulse {
    animation: highlightPulse 2s ease-out;
}

@keyframes highlightPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(79, 70, 229, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(79, 70, 229, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(79, 70, 229, 0);
    }
}

/* 科技感覆盖层 */
.tech-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 4;
}

.tech-circle {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 300px;
    height: 300px;
    border: 1px dashed rgba(79, 70, 229, 0.3);
    border-radius: 50%;
    animation: techCircle 15s linear infinite;
}

@keyframes techCircle {
    0% {
        transform: translate(-50%, -50%) rotate(0deg);
    }
    100% {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

.tech-line {
    position: absolute;
    background-color: rgba(79, 70, 229, 0.2);
}

.tech-line.horizontal {
    top: 50%;
    left: 0;
    width: 0%;
    height: 1px;
    transform: translateY(-50%);
    animation: techLineH 3s var(--ease-standard) forwards 2s;
}

.tech-line.vertical {
    top: 0;
    left: 50%;
    width: 1px;
    height: 0%;
    transform: translateX(-50%);
    animation: techLineV 3s var(--ease-standard) forwards 2s;
}

@keyframes techLineH {
    0% {
        width: 0%;
        opacity: 0;
    }
    100% {
        width: 100%;
        opacity: 1;
    }
}

@keyframes techLineV {
    0% {
        height: 0%;
        opacity: 0;
    }
    100% {
        height: 100%;
        opacity: 1;
    }
}

.tech-corner {
    position: absolute;
    width: 30px;
    height: 30px;
    border-color: var(--primary);
    border-style: solid;
    border-width: 0;
    opacity: 0;
    animation: cornerAppear 0.5s var(--ease-standard) forwards 3s;
}

.tech-corner.top-left {
    top: 20px;
    left: 20px;
    border-top-width: 2px;
    border-left-width: 2px;
    animation-delay: 3s;
}

.tech-corner.top-right {
    top: 20px;
    right: 20px;
    border-top-width: 2px;
    border-right-width: 2px;
    animation-delay: 3.2s;
}

.tech-corner.bottom-left {
    bottom: 20px;
    left: 20px;
    border-bottom-width: 2px;
    border-left-width: 2px;
    animation-delay: 3.4s;
}

.tech-corner.bottom-right {
    bottom: 20px;
    right: 20px;
    border-bottom-width: 2px;
    border-right-width: 2px;
    animation-delay: 3.6s;
}

@keyframes cornerAppear {
    0% {
        width: 0;
        height: 0;
        opacity: 0;
    }
    100% {
        width: 30px;
        height: 30px;
        opacity: 1;
    }
}

/* 测量指示区域 */
.measurement-indicator {
    position: absolute;
    left: 0;
    width: 100%;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    z-index: 10;
    opacity: 0;
    animation: fadeIn 0.5s ease forwards 4.5s;
}

.indicator-line {
    width: 90%;
    height: 1px;
    background: linear-gradient(to right, 
        transparent 0%, 
        var(--primary) 20%, 
        var(--primary) 80%, 
        transparent 100%);
    box-shadow: 0 0 10px var(--primary);
}

.indicator-text {
    position: absolute;
    font-size: 0.85rem;
    color: var(--primary);
    background-color: rgba(255, 255, 255, 0.95);
    padding: 4px 12px;
    border-radius: 12px;
    box-shadow: 0 0 8px rgba(79, 70, 229, 0.3);
    font-weight: 500;
}

/* 语音控制区域 */
.voice-control {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-top: 1rem;
    padding: 0.5rem;
    background-color: rgba(255, 255, 255, 0.9);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
}

.voice-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background-color: rgba(79, 70, 229, 0.1);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.voice-btn:hover {
    background-color: rgba(79, 70, 229, 0.2);
}

.voice-btn.active {
    background-color: rgba(79, 70, 229, 0.3);
    border-color: var(--primary);
    box-shadow: 0 0 10px rgba(79, 70, 229, 0.4);
}

.voice-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background-color: var(--primary);
    position: relative;
}

.voice-icon::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 8px;
    height: 8px;
    background-color: white;
    border-radius: 50%;
    animation: voicePulse 1.5s ease-out infinite;
}

.voice-btn.active .voice-icon::before {
    animation: voicePulse 0.8s ease-out infinite;
}

@keyframes voicePulse {
    0% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
    100% {
        transform: translate(-50%, -50%) scale(2);
        opacity: 0;
    }
}

.voice-hint {
    font-size: 0.8rem;
    color: var(--text-medium);
}

/* AI助手样式 */
.ai-assistant {
    position: fixed;
    top: 2rem;
    left: 50%;
    transform: translateX(-50%) translateY(-20px);
    background-color: rgba(255, 255, 255, 0.95);
    border-radius: var(--radius-lg);
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: var(--shadow-md);
    z-index: 100;
    max-width: 90%;
    width: auto;
    animation: fadeSlideDown 0.5s var(--ease-standard) forwards;
}

@keyframes fadeSlideDown {
    0% {
        opacity: 0;
        transform: translateX(-50%) translateY(-20px);
    }
    100% {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

.ai-indicator {
    position: relative;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ai-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-light), var(--primary));
    color: white;
    font-size: 0.8rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 2;
}

.ai-ripple {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 2px solid var(--primary);
    opacity: 0;
    animation: ripple 2s ease-out infinite;
}

@keyframes ripple {
    0% {
        transform: scale(0.8);
        opacity: 1;
    }
    100% {
        transform: scale(1.5);
        opacity: 0;
    }
}

.ai-message {
    font-size: 0.95rem;
    color: var(--text-medium);
    flex: 1;
}

/* 高亮动画 */
.highlight-pulse {
    animation: highlightPulse 2s ease-out;
}

@keyframes highlightPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(79, 70, 229, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(79, 70, 229, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(79, 70, 229, 0);
    }
}

/* AI消息过渡 */
.ai-message {
    transition: opacity 0.3s ease;
}

/* 修复旋转动画 */
@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
} 