/* index.css - 生物识别系统主页面样式 */
:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --secondary: #10b981;
    --accent: #f59e0b;
    --danger: #ef4444;
    --dark: #1f2937;
    --light: #f8fafc;
    --gray: #6b7280;
    --border: #e5e7eb;
    --shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    --radius: 12px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', 'SF Pro Display', -apple-system, BlinkMacSystemFont, 'Microsoft YaHei', sans-serif;
    line-height: 1.6;
    color: var(--dark);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: var(--radius);
    padding: 40px;
    box-shadow: var(--shadow-lg);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

h1 {
    text-align: center;
    color: var(--dark);
    margin-bottom: 40px;
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* 顶部导航栏 */
.top-nav-container {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-bottom: 40px;
    padding: 24px;
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 28px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.4);
}

.btn:active {
    transform: translateY(0);
}

.btn-camera {
    background: linear-gradient(135deg, #8b5cf6, #a855f7);
}

.btn-plant {
    background: linear-gradient(135deg, var(--secondary), #34d399);
}

.btn-animal {
    background: linear-gradient(135deg, var(--accent), #fbbf24);
}

/* 表单区域 */
#uploadForm {
    text-align: center;
    margin-bottom: 40px;
}

/* 相机区域 */
.camera-section {
    text-align: center;
    margin: 30px 0;
    display: none;
}

#cameraPreview {
    width: 100%;
    max-width: 500px;
    border-radius: var(--radius);
    margin-bottom: 20px;
    box-shadow: var(--shadow);
}

/* 图片预览 */
.preview-container {
    text-align: center;
    margin: 30px 0;
    display: flex;
    justify-content: center;
    align-items: center;
}

#imagePreview {
    max-width: 100%;
    max-height: 400px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    display: none;
    margin: 0 auto;
}

/* 加载提示 */
.loading {
    text-align: center;
    padding: 40px;
    font-size: 18px;
    color: var(--gray);
    background: linear-gradient(135deg, #f8fafc, #e2e8f0);
    border-radius: var(--radius);
    margin: 30px 0;
    display: none;
    border-left: 4px solid var(--primary);
}

/* 结果区域 */
.result-section {
    margin-top: 40px;
    padding: 30px;
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.result-image {
    max-width: 100%;
    max-height: 300px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin: 20px auto;
    display: block;
}

.result-item {
    margin-bottom: 30px;
    padding: 30px;
    background: linear-gradient(135deg, #f8fafc, #f1f5f9);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border-left: 4px solid var(--primary);
}

.result-item h3 {
    color: var(--dark);
    margin-bottom: 12px;
    font-size: 1.5rem;
    font-weight: 700;
}

.result-item p {
    color: var(--gray);
    margin-bottom: 20px;
}

/* 描述容器 */
.description-container {
    background: white;
    padding: 24px;
    border-radius: var(--radius);
    margin: 20px 0;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}

.description-container h4 {
    color: var(--dark);
    margin-bottom: 16px;
    font-size: 1.2rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.description-container p {
    color: var(--dark);
    line-height: 1.7;
    margin: 0;
    font-size: 16px;
}

/* 错误和状态 */
.error {
    color: var(--danger);
    background: linear-gradient(135deg, #fef2f2, #fee2e2);
    padding: 20px;
    border-radius: var(--radius);
    margin: 20px 0;
    border-left: 4px solid var(--danger);
    font-weight: 500;
}

.no-result {
    text-align: center;
    padding: 40px;
    color: var(--gray);
    font-style: italic;
    background: #f8fafc;
    border-radius: var(--radius);
}

/* 语音控制 */
.btn-audio {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark)) !important;
    padding: 12px 24px;
    border-radius: 50px;
    font-size: 14px;
    border: none;
    color: white;
    cursor: pointer;
    transition: var(--transition);
    margin-top: 15px;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.btn-audio:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.4);
}

.btn-audio:disabled {
    background: var(--gray) !important;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.audio-controls {
    text-align: center;
    margin: 20px 0;
    padding: 20px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: linear-gradient(135deg, #f8fafc, #f1f5f9);
}

#ttsStatus {
    font-size: 14px;
    font-weight: 500;
    margin-left: 12px;
}

/* 响应式设计 */
@media (max-width: 1024px) {
    .container {
        padding: 30px;
    }

    h1 {
        font-size: 2rem;
    }

    .top-nav-container {
        flex-wrap: wrap;
        gap: 12px;
    }
}

@media (max-width: 768px) {
    body {
        padding: 15px;
    }

    .container {
        padding: 24px;
    }

    h1 {
        font-size: 1.75rem;
        margin-bottom: 30px;
    }

    .btn {
        padding: 12px 20px;
        font-size: 14px;
    }

    .top-nav-container {
        grid-template-columns: 1fr;
        gap: 10px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 20px;
    }

    h1 {
        font-size: 1.5rem;
    }

    .btn {
        padding: 10px 16px;
        font-size: 13px;
    }

    .description-container {
        padding: 20px;
    }
}


/*跳转按钮*/
/* 在 index.css 中添加以下样式 */

/* 反馈按钮样式 */
.btn-feedback {
    background: linear-gradient(135deg, #f59e0b, #fbbf24) !important;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

.btn-feedback:hover {
    box-shadow: 0 8px 20px rgba(245, 158, 11, 0.4);
}

/* 确保链接按钮样式与其他按钮一致 */
.top-nav-container .btn {
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
