/* 移动端适配 */
@media (max-width: 768px) {
  .container {
    padding: 10px;
  }

  h1 {
    font-size: 1.5rem;
  }

  .audit-form {
    flex-direction: column;
  }

  .audit-form input {
    width: 100%;
    margin-bottom: 10px;
  }

  .audit-form button {
    width: 100%;
  }

  .category-grid {
    grid-template-columns: 1fr;
  }

  .issue-card {
    padding: 12px;
  }

  .score-display {
    font-size: 2rem;
  }

  .tabs {
    flex-direction: column;
  }

  .tab {
    width: 100%;
    text-align: center;
  }

  table {
    font-size: 0.85rem;
  }

  .comparison-grid {
    grid-template-columns: 1fr;
  }
}

/* PWA样式 */
.install-prompt {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: #4CAF50;
  color: white;
  padding: 15px 25px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  display: none;
  z-index: 1000;
  animation: slideUp 0.3s ease;
}

@keyframes slideUp {
  from { bottom: -100px; opacity: 0; }
  to { bottom: 20px; opacity: 1; }
}

.install-prompt button {
  background: white;
  color: #4CAF50;
  border: none;
  padding: 8px 16px;
  border-radius: 4px;
  margin-left: 10px;
  cursor: pointer;
  font-weight: bold;
}

.install-prompt button:hover {
  background: #f0f0f0;
}

/* 对比模态框样式 */
.comparison-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  animation: fadeIn 0.3s ease;
}

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

.comparison-content {
  background: white;
  padding: 30px;
  border-radius: 12px;
  max-width: 900px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 8px 32px rgba(0,0,0,0.3);
}

.close-btn {
  position: absolute;
  top: 15px;
  right: 15px;
  background: none;
  border: none;
  font-size: 2rem;
  cursor: pointer;
  color: #666;
  line-height: 1;
}

.close-btn:hover {
  color: #000;
}

.comparison-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin: 20px 0;
}

.comparison-col {
  text-align: center;
  padding: 20px;
  background: #f9f9f9;
  border-radius: 8px;
}

.score-badge {
  font-size: 3rem;
  font-weight: bold;
  margin: 15px 0;
  padding: 20px;
  border-radius: 50%;
  width: 120px;
  height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 15px auto;
}

.score-badge.score-good {
  background: #4CAF50;
  color: white;
}

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

.score-badge.score-poor {
  background: #f44336;
  color: white;
}

.score-change {
  text-align: center;
  margin: 30px 0;
  padding: 20px;
  background: #f0f0f0;
  border-radius: 8px;
}

.change-value {
  font-size: 2rem;
  font-weight: bold;
  margin-top: 10px;
}

.change-value.positive {
  color: #4CAF50;
}

.change-value.negative {
  color: #f44336;
}

.change-value.neutral {
  color: #666;
}

.issues-comparison table {
  width: 100%;
  margin-top: 15px;
  border-collapse: collapse;
}

.issues-comparison th,
.issues-comparison td {
  padding: 12px;
  text-align: left;
  border-bottom: 1px solid #ddd;
}

.issues-comparison th {
  background: #f5f5f5;
  font-weight: bold;
}

.recommendations {
  margin-top: 30px;
  padding: 20px;
  background: #e3f2fd;
  border-radius: 8px;
  border-left: 4px solid #2196F3;
}

.recommendations p {
  margin: 0;
  font-size: 1.1rem;
}

.recommendations .positive {
  color: #4CAF50;
}

.recommendations .negative {
  color: #f44336;
}

.recommendations .neutral {
  color: #666;
}

@media (max-width: 768px) {
  .comparison-content {
    padding: 20px;
    max-width: 95%;
  }

  .comparison-grid {
    grid-template-columns: 1fr;
  }

  .score-badge {
    width: 100px;
    height: 100px;
    font-size: 2.5rem;
  }
}
