/* 全局样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'PingFang SC', 'Microsoft YaHei', 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 100vh;
    transition: all 0.3s ease;

/* 容器样式 */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 导航栏样式 */
.navbar {
    background-color: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 20px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo h1 {
    color: #1a73e8;
    font-size: 24px;
    margin-bottom: 5px;
}

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

.nav-links {
    display: flex;
    gap: 30px;
}

.nav-links a {
    color: #333;
    text-decoration: none;
    font-size: 16px;
    transition: color 0.3s;
    position: relative;
}

.nav-links a:hover,
.nav-links a.active {
    color: #1a73e8;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: #1a73e8;
    transition: width 0.3s;
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

.user-actions {
    display: flex;
    gap: 15px;
    align-items: center;
}

.user-profile {
    display: flex;
    gap: 15px;
    align-items: center;
}

.user-profile span {
    color: #666;
}

/* 按钮样式 */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s;
    gap: 0.5rem;
    min-width: 120px;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

.btn-primary {
    background-color: #667eea;
    color: white;
}

.btn-primary:hover:not(:disabled) {
    background-color: #5a67d8;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background-color: #e2e8f0;
    color: #4a5568;
    border: none;
}

.btn-secondary:hover:not(:disabled) {
    background-color: #cbd5e0;
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.btn-success {
    background-color: #48bb78;
    color: white;
}

.btn-success:hover:not(:disabled) {
    background-color: #38a169;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(72, 187, 120, 0.4);
}

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

.btn-danger:hover:not(:disabled) {
    background-color: #e53e3e;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(245, 101, 101, 0.4);
}

.btn-large {
    padding: 15px 30px;
    font-size: 18px;
}

.btn-outline {
    background: transparent;
    border: 2px solid #667eea;
    color: #667eea;
}

.btn-outline:hover:not(:disabled) {
    background: #667eea;
    color: white;
}

/* 英雄区域样式 */
.hero {
    background: linear-gradient(135deg, #1a73e8 0%, #4285f4 100%);
    color: white;
    padding: 100px 0;
}

.hero .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.hero-content {
    flex: 1;
    max-width: 600px;
}

.hero-content h2 {
    font-size: 48px;
    margin-bottom: 20px;
    line-height: 1.2;
}

.hero-content p {
    font-size: 20px;
    margin-bottom: 30px;
    opacity: 0.9;
}

.hero-buttons {
    display: flex;
    gap: 20px;
}

.hero-image {
    flex: 1;
    display: flex;
    justify-content: flex-end;
}

.hero-image img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

/* 通用响应式图像 */
.responsive-image {
    max-width: 100%;
    height: auto;
}

/* 功能亮点区域 */
.features {
    padding: 100px 0;
}

.section-title {
    text-align: center;
    font-size: 36px;
    margin-bottom: 60px;
    color: #333;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 3px;
    background-color: #1a73e8;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
}

.feature-item {
    background-color: white;
    padding: 40px;
    border-radius: 10px;
    text-align: center;
    transition: all 0.3s;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.feature-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.feature-icon {
    font-size: 48px;
    color: #1a73e8;
    margin-bottom: 20px;
}

.feature-item h4 {
    font-size: 20px;
    margin-bottom: 15px;
    color: #333;
}

.feature-item p {
    color: #666;
    font-size: 16px;
}

/* 分析流程 */
.process {
    background-color: #f5f5f5;
    padding: 100px 0;
}

.process-steps {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.step {
    background-color: white;
    padding: 30px;
    border-radius: 10px;
    text-align: center;
    flex: 1;
    min-width: 200px;
    margin: 10px;
    position: relative;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.step-number {
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 50px;
    background-color: #1a73e8;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: bold;
}

.step h4 {
    margin-top: 20px;
    margin-bottom: 10px;
    color: #333;
}

.step-arrow {
    font-size: 48px;
    color: #1a73e8;
    margin: 0 20px;
    display: none;
}

/* 客户评价 */
.testimonials {
    padding: 100px 0;
}

.testimonial-slider {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.testimonial {
    background-color: white;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    text-align: center;
}

.testimonial-text {
    font-size: 18px;
    color: #666;
    margin-bottom: 20px;
    line-height: 1.8;
}

.testimonial-author {
    font-size: 16px;
    font-weight: 500;
    color: #333;
}

/* 页脚样式 */
footer {
    background-color: #333;
    color: white;
    padding: 80px 0 30px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 50px;
}

.footer-section h4 {
    font-size: 18px;
    margin-bottom: 20px;
    color: white;
}

.footer-section p {
    color: #ccc;
    line-height: 1.8;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 10px;
}

.footer-section ul li a {
    color: #ccc;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-section ul li a:hover {
    color: #1a73e8;
}

.social-links {
    display: flex;
    gap: 15px;
}

.social-link {
    width: 40px;
    height: 40px;
    background-color: #444;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 18px;
    transition: all 0.3s;
}

.social-link:hover {
    background-color: #1a73e8;
    transform: translateY(-3px);
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid #444;
    color: #ccc;
    font-size: 14px;
}

/* 表单样式 */
.form-container {
    max-width: 600px;
    margin: 50px auto;
    background-color: white;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.form-title {
    text-align: center;
    font-size: 28px;
    margin-bottom: 30px;
    color: #333;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #333;
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.form-control:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-control::placeholder {
    color: #a0aec0;
}

.form-check {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.form-check input {
    margin-right: 10px;
}

.form-error {
    color: #d93025;
    font-size: 14px;
    margin-top: 5px;
}

.form-success {
    color: #34a853;
    font-size: 16px;
    margin-bottom: 20px;
    text-align: center;
    padding: 15px;
    background-color: #e6f4ea;
    border-radius: 5px;
}

/* 分析页面样式 */
.analysis-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    max-width: 1200px;
    margin: 50px auto;
}

.camera-section {
    background-color: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s, box-shadow 0.3s;
}

.camera-section:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.camera-feed {
    width: 100%;
    height: 400px;
    background-color: #000;
    border-radius: 10px;
    margin-bottom: 20px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.camera-feed::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, transparent 30%, rgba(0, 0, 0, 0.5) 70%);
    pointer-events: none;
}

.camera-controls {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

/* 进度条 */
.progress {
    height: 10px;
    background: #e2e8f0;
    border-radius: 5px;
    overflow: hidden;
    margin: 1rem 0;
}

.progress-bar {
    height: 100%;
    background: #667eea;
    transition: width 0.8s ease;
}

/* 结果页面样式 */
.result-container {
    max-width: 1000px;
    margin: 50px auto;
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
}

.result-tabs {
    display: flex;
    background-color: white;
    overflow-x: auto;
    scrollbar-width: none;
}

.result-tabs::-webkit-scrollbar {
    display: none;
}

.result-tab {
    flex: 0 0 auto;
    padding: 20px 30px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    border-bottom: 3px solid transparent;
    white-space: nowrap;
    position: relative;
}

.result-tab::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: #667eea;
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.result-tab.active {
    background-color: #f8f9fa;
    font-weight: 600;
    color: #667eea;
}

.result-tab.active::after {
    transform: scaleX(1);
}

.result-content {
    background-color: white;
    padding: 40px;
    animation: fadeIn 0.5s ease-out;
}

.result-section {
    margin-bottom: 40px;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.6s ease-out forwards;
}

.result-section:nth-child(1) { animation-delay: 0.1s; }
.result-section:nth-child(2) { animation-delay: 0.2s; }
.result-section:nth-child(3) { animation-delay: 0.3s; }

.result-section h3 {
    color: #667eea;
    margin-bottom: 20px;
    font-size: 24px;
    position: relative;
    padding-bottom: 10px;
}

.result-section h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    background: #667eea;
    border-radius: 2px;
}

.result-item {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
    transition: transform 0.2s;
}

.result-item:hover {
    transform: translateX(5px);
}

.result-item:last-child {
    border-bottom: none;
}

.result-item h4 {
    color: #333;
    margin-bottom: 10px;
    font-size: 18px;
}

.result-item p {
    color: #666;
    line-height: 1.8;
    font-size: 16px;
}

/* 评分圆形图表 */
.score-circle {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    font-weight: bold;
    color: white;
    margin: 0 auto 20px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.score-circle::before {
    content: '';
    position: absolute;
    inset: 5px;
    background: white;
    border-radius: 50%;
    z-index: 1;
}

.score-circle::after {
    content: '';
    position: absolute;
    inset: 5px;
    background: conic-gradient(
        #667eea var(--score, 70%),
        #e2e8f0 var(--score, 70%)
    );
    border-radius: 50%;
    -webkit-mask: radial-gradient(circle 65px at center, transparent 70%, #fff 70%);
    mask: radial-gradient(circle 65px at center, transparent 70%, #fff 70%);
}

.score-text {
    position: relative;
    z-index: 2;
    color: #667eea;
}

/* 模态框 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    justify-content: center;
    align-items: center;
}

.modal.show {
    display: flex;
}

.modal-content {
    background-color: white;
    border-radius: 15px;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
    animation: modalSlideIn 0.3s ease-out;
}

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

.modal-header h3 {
    margin: 0;
    color: #667eea;
    font-size: 20px;
}

.modal-close {
    font-size: 24px;
    cursor: pointer;
    color: #666;
    background: none;
    border: none;
    transition: color 0.3s;
}

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

.modal-body {
    padding: 20px;
}

.modal-footer {
    padding: 20px;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* 通知 */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #4CAF50;
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    z-index: 1000;
    transform: translateX(100%);
    transition: transform 0.3s;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    max-width: 400px;
}

.notification.show {
    transform: translateX(0);
}

.notification.error {
    background: #f44336;
}

.notification.success {
    background: #4CAF50;
}

.notification.warning {
    background: #ff9800;
}

.notification.info {
    background: #2196F3;
}

/* 加载指示器 */
.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* 标签 */
.badge {
    display: inline-block;
    padding: 0.3rem 0.8rem;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-primary {
    background: #667eea;
    color: white;
}

.badge-success {
    background: #48bb78;
    color: white;
}

.badge-warning {
    background: #ed8936;
    color: white;
}

.badge-danger {
    background: #f56565;
    color: white;
}

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

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

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(102, 126, 234, 0.4);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(102, 126, 234, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(102, 126, 234, 0);
    }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

/* 动画类 */
.fade-in {
    animation: fadeIn 0.5s ease-out;
}

.fade-in-up {
    animation: fadeInUp 0.5s ease-out;
}

.pulse {
    animation: pulse 2s infinite;
}

.shake {
    animation: shake 0.5s;
}

/* 辅助类 */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.text-primary { color: #667eea; }
.text-success { color: #48bb78; }
.text-warning { color: #ed8936; }
.text-danger { color: #f56565; }
.text-secondary { color: #718096; }

.bg-primary { background-color: #667eea; }
.bg-secondary { background-color: #e2e8f0; }
.bg-success { background-color: #48bb78; }
.bg-warning { background-color: #ed8936; }
.bg-danger { background-color: #f56565; }

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mt-5 { margin-top: 3rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.mb-5 { margin-bottom: 3rem; }

.ml-1 { margin-left: 0.5rem; }
.ml-2 { margin-left: 1rem; }
.ml-3 { margin-left: 1.5rem; }
.ml-4 { margin-left: 2rem; }
.ml-5 { margin-left: 3rem; }

.mr-1 { margin-right: 0.5rem; }
.mr-2 { margin-right: 1rem; }
.mr-3 { margin-right: 1.5rem; }
.mr-4 { margin-right: 2rem; }
.mr-5 { margin-right: 3rem; }

.p-1 { padding: 0.5rem; }
.p-2 { padding: 1rem; }
.p-3 { padding: 1.5rem; }
.p-4 { padding: 2rem; }
.p-5 { padding: 3rem; }

.d-flex { display: flex; }
.d-block { display: block; }
.d-inline { display: inline; }
.d-inline-block { display: inline-block; }
.d-none { display: none; }

.justify-content-center { justify-content: center; }
.justify-content-between { justify-content: space-between; }
.justify-content-around { justify-content: space-around; }

.align-items-center { align-items: center; }
.align-items-start { align-items: flex-start; }
.align-items-end { align-items: flex-end; }

.flex-column { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }

.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.gap-3 { gap: 1.5rem; }
.gap-4 { gap: 2rem; }
.gap-5 { gap: 3rem; }

.w-100 { width: 100%; }
.h-100 { height: 100%; }

.rounded { border-radius: 8px; }
.rounded-full { border-radius: 50%; }

.shadow { box-shadow: 0 2px 10px rgba(0,0,0,0.1); }
.shadow-lg { box-shadow: 0 10px 30px rgba(0,0,0,0.15); }

.transition { transition: all 0.3s ease; }

/* 响应式设计 */
@media (max-width: 992px) {
    .hero .container {
        flex-direction: column;
        text-align: center;
    }
    
    .hero-content,
    .hero-image {
        flex: none;
        max-width: 100%;
        margin-bottom: 40px;
    }
    
    .analysis-container {
        grid-template-columns: 1fr;
    }
    
    .result-content {
        padding: 30px 20px;
    }
}

@media (max-width: 768px) {
    html {
        font-size: 15px;
    }
    
    .navbar .container {
        flex-direction: column;
        gap: 20px;
    }
    
    .nav-links {
        flex-wrap: wrap;
        justify-content: center;
        gap: 15px;
    }
    
    .hero-content h2 {
        font-size: 36px;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .process-steps {
        flex-direction: column;
    }
    
    .step-arrow {
        transform: rotate(90deg);
        margin: 20px 0;
        display: block;
    }
    
    .form-container {
        margin: 30px 20px;
        padding: 30px 20px;
    }
    
    .btn {
        width: 100%;
    }
    
    .score-circle {
        width: 120px;
        height: 120px;
        font-size: 24px;
    }
    
    .modal-content {
        margin: 1rem;
    }
}

@media (max-width: 576px) {
    html {
        font-size: 14px;
    }
    
    .section-title {
        font-size: 28px;
    }
    
    .hero-content h2 {
        font-size: 28px;
    }
    
    .hero-content p {
        font-size: 16px;
    }
    
    .feature-item {
        padding: 30px 20px;
    }
    
    .modal-header,
    .modal-body,
    .modal-footer {
        padding: 15px;
    }
}

/* 无障碍访问 */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* 深色模式支持 */
@media (prefers-color-scheme: dark) {
    body {
        background: linear-gradient(135deg, #2d3748 0%, #1a202c 100%);
        color: #e2e8f0;
    }
    
    .navbar,
    .camera-section,
    .result-container,
    .modal-content {
        background: #2d3748;
        color: #e2e8f0;
    }
    
    .nav-links a {
        color: #e2e8f0;
    }
    
    .form-control {
        background: #1a202c;
        border-color: #4a5568;
        color: #e2e8f0;
    }
    
    .result-item p,
    .result-section h3,
    .result-item h4 {
        color: #e2e8f0;
    }
    
    .btn-secondary {
        background: #4a5568;
        color: #e2e8f0;
    }
    
    footer {
        background: #1a202c;
    }
    
    .footer-section p,
    .footer-section ul li a {
        color: #cbd5e0;
    }
}