﻿/* 主要样式文件 - main2.css */

/* 基础样式重置 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Segoe UI", Arial, sans-serif;
  background: linear-gradient(135deg, #e3eafc 60%, #b2dfdb 100%);
  color: #222;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1.6;
}

/* 容器样式 */
.container2 {
  max-width: 480px;
  margin: 0 auto;
  padding: 36px 24px 0 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

/* 机器人图片样式 */
.robot-img2 {
  width: 140px;
  height: 140px;
  margin-bottom: 24px;
  border-radius: 50%;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
  transition: transform 0.5s ease, box-shadow 0.5s ease;
}

.robot-img2:hover {
  transform: scale(1.05) rotate(3deg);
  box-shadow: 0 12px 32px rgba(0,0,0,0.18);
}

.robot-img2 img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

/* 标题样式 */
.title2 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 12px;
  color: #1976d2;
  text-align: center;
  width: 100%;
  letter-spacing: -0.5px;
  text-shadow: 1px 1px 2px rgba(0,0,0,0.05);
}

.subtitle2 {
  font-size: 1.4rem;
  font-weight: 500;
  margin-bottom: 28px;
  color: #333;
  text-align: center;
  width: 100%;
  line-height: 1.3;
  opacity: 0.9;
}

/* 卡片样式 */
.card2 {
  background: rgba(255,255,255,0.95);
  border-radius: 20px;
  padding: 24px 22px;
  margin-bottom: 28px;
  width: 100%;
  box-sizing: border-box;
  box-shadow: 0 8px 24px rgba(0,0,0,0.1);
  transform: translateY(0);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 1px solid rgba(255,255,255,0.8);
}

.card2:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 32px rgba(0,0,0,0.15);
}

/* 结果框样式 */
.result-box2 {
  background: linear-gradient(135deg, #f5f5f5 60%, #b2dfdb 100%);
  border-radius: 20px;
  padding: 40px 20px;
  max-width: 380px;
  width: 90%;
  margin: 0 auto;
  color: #222;
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
  border: 1px solid rgba(255,255,255,0.6);
}

/* 准确度显示样式 */
.accuracy2 {
  font-size: 1.1rem;
  margin-bottom: 12px;
  color: #222;
  display: flex;
  align-items: center;
}

.accuracy2::before {
  content: "";
  display: inline-block;
  width: 18px;
  height: 18px;
  background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%231976d2"><path d="M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41L9 16.17z"/></svg>') no-repeat center center;
  background-size: contain;
  margin-right: 8px;
}

.accuracy2 .percent2 {
  color: #1976d2;
  font-weight: bold;
  font-size: 1.25rem;
  margin: 0 4px;
  position: relative;
  display: inline-block;
}

.accuracy2 .percent2::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: #1976d2;
  opacity: 0.5;
}

/* 描述文字样式 */
.desc2 {
  font-size: 1.05rem;
  color: #555;
  margin-bottom: 12px;
  line-height: 1.6;
}

.desc2 .highlight2 {
  color: #1976d2;
  font-weight: 600;
  text-decoration: none;
  position: relative;
  padding: 0 2px;
  cursor: pointer;
  transition: color 0.3s;
}

.desc2 .highlight2::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: #1976d2;
  transform: scaleX(0);
  transform-origin: bottom right;
  transition: transform 0.3s ease-out;
}

.desc2 .highlight2:hover {
  color: #0d47a1;
}

.desc2 .highlight2:hover::after {
  transform: scaleX(1);
  transform-origin: bottom left;
}

/* 输入框组样式 */
.input-group2 {
  width: 100%;
  margin-bottom: 16px;
  position: relative;
  z-index: 100;
}

.input-group2 input {
  width: 100%;
  padding: 16px 14px;
  border-radius: 12px;
  border: 2px solid rgba(178, 223, 219, 0.6);
  background: #f9f9f9;
  color: #222;
  font-size: 1.05rem;
  outline: none;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
  position: relative;
  z-index: 100;
  pointer-events: auto !important;
}

.input-group2 input:focus {
  border-color: #1976d2;
  background: #fff;
  box-shadow: 0 6px 16px rgba(25, 118, 210, 0.15);
}

.input-group2 input::placeholder {
  color: #999;
  opacity: 0.8;
}

/* 按钮样式 */
.btn2 {
  width: 100%;
  padding: 16px 0;
  border: none;
  border-radius: 30px;
  background: linear-gradient(90deg, #1976d2 0%, #64b5f6 100%);
  color: #fff;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  margin-top: 8px;
  box-shadow: 0 6px 16px rgba(25, 118, 210, 0.25);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  z-index: 100;
}

.btn2::after {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
  transition: 0.5s;
}

.btn2:hover {
  background: linear-gradient(90deg, #1565c0 0%, #42a5f5 100%);
  box-shadow: 0 8px 20px rgba(25, 118, 210, 0.35);
  transform: translateY(-2px);
}

.btn2:active {
  transform: translateY(1px);
  box-shadow: 0 4px 12px rgba(25, 118, 210, 0.2);
}

.btn2:hover::after {
  left: 100%;
}

/* 动画按钮 */
#chat-btn2 {
  animation: breath2 1.8s ease-in-out infinite;
}

@keyframes breath2 {
  0% { box-shadow: 0 4px 12px rgba(25, 118, 210, 0.2); transform: scale(1); }
  50% { box-shadow: 0 8px 24px rgba(25, 118, 210, 0.4); transform: scale(1.05); }
  100% { box-shadow: 0 4px 12px rgba(25, 118, 210, 0.2); transform: scale(1); }
}

/* 进度条样式 */
.progress-box .item {
  margin-bottom: 18px;
}

.progress-box .i-title {
  font-size: 14px;
  margin-bottom: 6px;
  color: #555;
  font-weight: 500;
}

.layui-progress-big {
  background: #eee;
  border-radius: 10px;
  height: 14px;
  overflow: hidden;
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.1);
}

.layui-progress-bar {
  background: linear-gradient(90deg, #1976d2 0%, #64b5f6 100%);
  height: 100%;
  border-radius: 10px;
  transition: width 1s ease;
  position: relative;
  overflow: hidden;
}

.layui-progress-bar::after {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
  animation: progress-shine 2s infinite;
}

@keyframes progress-shine {
  0% { left: -100%; }
  100% { left: 100%; }
}

/* 模态框样式 */
.ai-modal {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 100% !important;
  z-index: 9999;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(5px);
  display: none !important;
  justify-content: center !important;
  align-items: center !important;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.ai-modal.show {
  opacity: 1;
  display: flex !important;
  pointer-events: auto;
}

.ai-progress, .ai-result {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.pro-box {
  background: #f9f9f9;
  border-radius: 20px;
  padding: 30px 20px;
  max-width: 380px;
  width: 90%;
  margin: 0 auto;
  box-shadow: 0 12px 36px rgba(0,0,0,0.2);
  transform: translateY(20px);
  transition: transform 0.3s ease;
  border: 1px solid rgba(255,255,255,0.8);
}

.ai-modal.show .pro-box {
  transform: translateY(0);
}

/* 页脚样式 */
.footer2 {
  width: 100%;
  max-width: 480px;
  margin: 40px auto 0 auto;
  padding: 0 20px 30px 20px;
  box-sizing: border-box;
  text-align: center;
  font-size: 0.95rem;
  color: #777;
}

.footer2 a {
  color: #1976d2;
  text-decoration: none;
  margin: 0 10px;
  transition: color 0.3s;
  position: relative;
}

.footer2 a::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 100%;
  height: 1px;
  background-color: #1976d2;
  transform: scaleX(0);
  transform-origin: bottom right;
  transition: transform 0.3s ease-out;
}

.footer2 a:hover {
  color: #0d47a1;
}

.footer2 a:hover::after {
  transform: scaleX(1);
  transform-origin: bottom left;
}

/* 表格样式 */
.info-table {
  width: 100%;
  border-collapse: collapse;
  margin: 15px 0;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 0 10px rgba(0,0,0,0.05);
}

.info-table th, .info-table td {
  padding: 12px 15px;
  text-align: left;
  border-bottom: 1px solid #ddd;
}

.info-table th {
  background-color: #1976d2;
  color: #fff;
  font-weight: 500;
}

.info-table tr:nth-child(even) {
  background-color: #f9f9f9;
}

.info-table tr:hover {
  background-color: #f1f1f1;
}

/* 响应式设计 */
@media (max-width: 480px) {
  .container2 { 
    padding: 20px 16px 0 16px; 
  }
  
  .robot-img2 { 
    width: 100px; 
    height: 100px; 
    margin-bottom: 16px;
  }
  
  .title2 { 
    font-size: 1.6rem; 
    margin-bottom: 6px;
  }
  
  .subtitle2 { 
    font-size: 1.1rem; 
    margin-bottom: 20px;
  }
  
  .card2 {
    padding: 18px 16px;
    border-radius: 16px;
  }
  
  .input-group2 input {
    padding: 14px 12px;
    font-size: 1rem;
  }
  
  .btn2 {
    padding: 14px 0;
    font-size: 1rem;
  }
  
  .result-box2 {
    padding: 30px 16px;
  }
  
  .info-table th, .info-table td {
    padding: 10px 12px;
    font-size: 0.9rem;
  }
}

/* 动画效果 */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.fade-in {
  animation: fadeIn 0.5s ease forwards;
}

@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.05); }
  100% { transform: scale(1); }
}

.pulse {
  animation: pulse 2s infinite;
}

/* 自定义滚动条 */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 10px;
}

::-webkit-scrollbar-thumb {
  background: #b2dfdb;
  border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
  background: #1976d2;
}
