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

body,
html {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica,
    Arial, sans-serif;
  height: 100%;
  width: 100%;
  overflow: hidden;
  background-color: #f5f5f5;
  color: #333;
}

.app-container {
  display: flex;
  flex-direction: column;
  height: 100vh;
  width: 100%;
}

/* 主内容区域样式 */
.main-content {
  flex: 1;
  overflow-y: auto;
  position: relative;
  background-color: #f5f5f5;
}

.view {
  display: none;
  height: 100%;
  width: 100%;
  padding: 0;
  overflow-y: auto;
}

.view.active {
  display: block;
}

/* 首页样式 */
.home-page-container {
  background-color: #f5f5f5;
  min-height: 100vh;
  padding: 15px;
  padding-bottom: 100px;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}

.page-header {
  margin-bottom: 15px;
  text-align: center;
  padding: 5px 0 15px;
}

.page-header .logo {
  max-width: 180px;
  height: auto;
  margin-bottom: 15px;
  display: inline-block;
}

.page-header h1 {
  font-size: 22px;
  margin-bottom: 3px;
  font-weight: 600;
  color: #007bff;
}

.page-header p {
  font-size: 14px;
  color: rgba(0, 0, 0, 0.65);
}

.content-container {
  max-width: 800px;
  margin: 0 auto;
}

.main-card {
  padding: 15px;
  border-radius: 0;
  background-color: white;
  box-shadow: none;
}

.section {
  margin-bottom: 25px;
}

.section h2 {
  font-size: 16px;
  margin-bottom: 5px;
  font-weight: 500;
  color: #333;
}

.section p {
  color: rgba(0, 0, 0, 0.65);
  margin-bottom: 8px;
  font-size: 13px;
}

.select-container {
  position: relative;
  max-width: 100%;
  margin-bottom: 15px;
}

.form-select {
  display: block;
  width: 100%;
  padding: 10px 12px;
  font-size: 14px;
  border: 1px solid #ddd;
  border-radius: 8px;
  background-color: white;
  appearance: none;
  color: #333;
}

.form-select:focus {
  outline: none;
  border-color: #1890ff;
  box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.2);
}

.form-select.selected {
  background-color: #f0f7ff;
  border-color: #1890ff;
}

.form-select option {
  padding: 10px;
}

.select-arrow {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 0;
  height: 0;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-top: 6px solid #666;
  pointer-events: none;
}

.select-container:hover .select-arrow {
  border-top-color: #1890ff;
}

.form-select:focus + .select-arrow {
  transform: translateY(-50%) rotate(180deg);
  border-top-color: #1890ff;
}

.photo-upload-row {
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin: 0;
}

.photo-upload-box {
  flex: 1;
  min-width: 200px;
  border: none;
  border-radius: 8px;
  padding: 10px;
  background-color: transparent;
  margin: 0 5px 10px;
}

.photo-upload-box h3 {
  font-size: 16px;
  margin-bottom: 4px;
  font-weight: 500;
  color: #333;
}

.photo-upload-box p {
  color: rgba(0, 0, 0, 0.65);
  margin-bottom: 8px;
  font-size: 12px;
}

.upload-container {
  min-height: 90px;
}

.upload-button-container {
  width: 100%;
  height: 90px;
  border: 1px solid #e8e8e8;
  border-radius: 8px;
  background-color: #f9f9f9;
  cursor: pointer;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.upload-button-container:hover {
  border-color: #1890ff;
  background-color: rgba(24, 144, 255, 0.05);
}

.upload-btn-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  width: 100%;
  color: rgba(0, 0, 0, 0.65);
}

.icon-camera-big {
  width: 35px;
  height: 35px;
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%23888"><path d="M12 15.2a3.2 3.2 0 1 0 0-6.4 3.2 3.2 0 0 0 0 6.4zm0-8.8a5.6 5.6 0 1 1 0 11.2 5.6 5.6 0 0 1 0-11.2zM21.6 7.6h-3.4l-1.9-2.5c-.3-.4-.8-.7-1.3-.7H9c-.5 0-1 .3-1.3.7L5.8 7.6H2.4c-.88 0-1.6.72-1.6 1.6v9.6c0 .88.72 1.6 1.6 1.6h19.2c.88 0 1.6-.72 1.6-1.6V9.2c0-.88-.72-1.6-1.6-1.6z"/></svg>');
  background-repeat: no-repeat;
  background-position: center;
  margin-bottom: 5px;
}

.upload-btn-inner span {
  margin-bottom: 3px;
  font-size: 12px;
  color: #555;
}

.upload-counter {
  font-size: 10px;
  color: #999;
}

.photo-preview {
  width: 100%;
  height: 100%;
  position: relative;
  text-align: center;
}

.photo-preview img {
  max-width: 100%;
  max-height: 90px;
  border-radius: 4px;
  object-fit: contain;
}

.photo-actions {
  margin-top: 8px;
}

.delete-btn {
  position: absolute;
  top: -8px;
  right: -8px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background-color: rgba(0, 0, 0, 0.6);
  color: white;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  cursor: pointer;
}

.delete-btn:hover {
  background-color: rgba(255, 0, 0, 0.7);
}

.start-section {
  margin-top: 20px;
  margin-bottom: 20px;
  padding: 0 15px;
}

.start-button {
  width: 100%;
  max-width: 770px;
  padding: 14px 20px;
  border-radius: 8px;
  background-color: #bbbbbb;
  color: white;
  border: none;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s;
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.2);
  -webkit-transform: translateX(-50%);
  -webkit-backface-visibility: hidden;
}

.start-button.enabled {
  background-color: #007bff;
}

.start-button:disabled {
  cursor: not-allowed;
}

/* AR定损页面样式 */
.ar-container {
  height: 100%;
  width: 100%;
  position: relative;
  overflow: hidden;
  background-color: #000;
}

/* 返回按钮样式 */
.back-btn {
  position: absolute;
  top: 20px;
  left: 20px;
  background-color: rgba(0, 0, 0, 0.6);
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 20px;
  font-size: 14px;
  cursor: pointer;
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  transition: background-color 0.3s;
}

.back-btn:before {
  content: "←";
  font-size: 18px;
  margin-right: 5px;
}

.back-btn:hover {
  background-color: rgba(0, 0, 0, 0.8);
}

/* 移动设备适配 */
@media (max-width: 768px) {
  .home-page-container {
    padding: 12px;
    padding-bottom: 110px; /* 为固定按钮留出空间 */
  }

  .page-header {
    margin-bottom: 15px;
  }

  .page-header h1 {
    font-size: 22px;
  }

  .page-header p {
    font-size: 13px;
  }

  .main-card {
    padding: 15px;
    border-radius: 10px;
    padding-bottom: 20px;
  }

  .section h2 {
    font-size: 16px;
  }

  .section p {
    font-size: 13px;
  }

  .photo-upload-row {
    flex-direction: column;
    gap: 15px;
  }

  .photo-upload-box {
    margin: 0;
    width: 100%;
  }

  .form-select {
    padding: 10px 12px;
  }

  .start-section {
    padding: 0 12px;
  }

  .start-button {
    width: calc(100% - 24px);
    bottom: 25px;
    padding: 16px 20px;
  }
}

/* 小屏幕设备适配 */
@media (max-width: 480px) {
  .home-page-container {
    padding: 10px;
    padding-bottom: 110px; /* 为固定按钮留出空间 */
  }

  .page-header {
    margin-bottom: 12px;
  }

  .page-header h1 {
    font-size: 20px;
  }

  .main-card {
    padding: 12px;
    padding-bottom: 20px;
  }

  .upload-button-container {
    height: 80px;
  }

  .photo-upload-box h3 {
    font-size: 14px;
  }

  .photo-upload-box p {
    font-size: 11px;
  }

  .icon-camera-big {
    font-size: 18px;
  }

  .upload-btn-inner span {
    font-size: 12px;
  }

  .start-section {
    padding: 0 10px;
  }

  .start-button {
    width: calc(100% - 20px);
    bottom: 30px;
    padding: 17px 20px;
    font-size: 16px;
    font-weight: 600;
  }
}

/* 图标样式（使用伪元素模拟） */
.icon-home:before {
  content: "🏠";
}
.icon-camera:before {
  content: "📷";
}
.icon-history:before {
  content: "📊";
}
.icon-settings:before {
  content: "⚙️";
}

/* 首页车辆信息样式 */
.vehicle-info-container {
  max-width: 600px;
  margin: 0 auto;
  padding: 20px;
}

.page-title {
  text-align: center;
  margin-bottom: 30px;
  color: #007bff;
}

.form-section {
  background-color: white;
  border-radius: 10px;
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.section-title {
  font-size: 1.2rem;
  margin-bottom: 10px;
  color: #333;
}

.section-desc {
  font-size: 0.9rem;
  color: #666;
  margin-bottom: 15px;
}

.select-container {
  position: relative;
  margin-bottom: 10px;
}

.form-select {
  width: 100%;
  padding: 12px;
  border: 1px solid #ddd;
  border-radius: 8px;
  background-color: white;
  appearance: none;
  font-size: 1rem;
}

.select-arrow {
  position: absolute;
  top: 50%;
  right: 12px;
  transform: translateY(-50%);
  width: 0;
  height: 0;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-top: 6px solid #666;
  pointer-events: none;
}

.upload-section {
  margin-bottom: 15px;
  animation: none;
  opacity: 1;
}

.upload-label {
  font-weight: 500;
  margin-bottom: 5px;
}

.upload-desc {
  font-size: 0.85rem;
  color: #666;
  margin-bottom: 10px;
}

.upload-box {
  border: 2px dashed #ccc;
  border-radius: 8px;
  height: 160px;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  transition: all 0.3s;
  position: relative;
  overflow: hidden;
}

.upload-box:hover {
  border-color: #007bff;
  background-color: rgba(0, 123, 255, 0.05);
}

.upload-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  width: 100%;
}

.icon-camera-big {
  font-size: 2rem;
  margin-bottom: 10px;
  color: #888;
}

.icon-camera-big:before {
  content: "📷";
}

.upload-counter {
  font-size: 0.8rem;
  color: #666;
}

.photo-preview {
  width: 100%;
  height: 100%;
  position: relative;
}

.photo-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 6px;
}

.delete-btn {
  position: absolute;
  top: 5px;
  right: 5px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background-color: rgba(0, 0, 0, 0.6);
  color: white;
  border: none;
  font-size: 16px;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
}

.delete-btn:hover {
  background-color: rgba(255, 0, 0, 0.7);
}

.form-action {
  margin-top: 30px;
}

.full-width {
  width: 100%;
}

/* 历史记录页面样式 */
.history-container {
  max-width: 960px;
  margin: 0 auto;
}

.history-container h2 {
  margin-bottom: 20px;
  color: #007bff;
}

.records-list {
  background-color: white;
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.no-data {
  text-align: center;
  padding: 40px;
  color: #888;
}

/* 设置页面样式 */
.settings-container {
  max-width: 600px;
  margin: 0 auto;
}

.settings-container h2 {
  margin-bottom: 30px;
  color: #007bff;
}

.settings-group {
  background-color: white;
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.settings-group h3 {
  margin-bottom: 15px;
  font-size: 1.1rem;
  color: #333;
}

.setting-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
  padding-bottom: 15px;
  border-bottom: 1px solid #eee;
}

.setting-item:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

select {
  padding: 8px 12px;
  border-radius: 4px;
  border: 1px solid #ddd;
  background-color: #f9f9f9;
  min-width: 120px;
}

/* 开关样式 */
.switch {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 24px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  transition: 0.4s;
  border-radius: 24px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 16px;
  width: 16px;
  left: 4px;
  bottom: 4px;
  background-color: white;
  transition: 0.4s;
  border-radius: 50%;
}

input:checked + .slider {
  background-color: #007bff;
}

input:focus + .slider {
  box-shadow: 0 0 1px #007bff;
}

input:checked + .slider:before {
  transform: translateX(26px);
}

/* 移除底部导航栏相关样式 */
.footer {
  display: none;
}

.tab-bar {
  display: none;
}

.tab {
  display: none;
}

/* 各个部分的淡入动画 */
.vehicle-type-section {
  animation: none;
  opacity: 1;
}

.upload-section {
  animation: none;
  opacity: 1;
}

.start-section {
  animation: none;
  opacity: 1;
}
