/* 通用基础样式 */
body {
  margin: 0;
  font-family: 'Segoe UI', Arial, sans-serif;
  background: linear-gradient(135deg, #e3f2fd 0%, #f7f7f7 100%);
  min-height: 100vh;
}
header {
  background: #1976d2;
  color: #fff;
  padding: 18px 0;
  box-shadow: 0 2px 8px rgba(25,118,210,0.08);
}
.logo {
  font-size: 1.2em;
  font-weight: bold;
  letter-spacing: 2px;
  text-align: center;
}
.nav, .nav-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 18px;
}
.nav-link, .back-link {
  color: #fff;
  text-decoration: underline;
  font-size: 1em;
  margin-left: 12px;
  cursor: pointer;
}
.nav-link:hover, .back-link:hover {
  color: #bbdefb;
}
.section-title {
  font-size: 1.1em;
  font-weight: bold;
  margin: 24px 0 12px 0;
  text-align: center;
  color: #1565c0;
}
.container {
  max-width: 340px;
  margin: 32px auto;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 2px 16px rgba(0,0,0,0.08);
  padding:0 0 24px 30px;
}
.display {
  width: 90%;
  margin: 18px auto 0 auto;
  background: #e3f2fd;
  border-radius: 8px;
  min-height: 48px;
  font-size: 1.3em;
  color: #1976d2;
  text-align: right;
  padding: 12px 10px;
  box-sizing: border-box;
  word-break: break-all;
}
.result {
  width: 90%;
  margin: 8px auto 0 auto;
  min-height: 28px;
  text-align: right;
  color: #388e3c;
  font-size: 1.1em;
  word-break: break-all;
}
.btns {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  width: 90%;
  margin: 18px auto 0 auto;
}
.btn {
  padding: 16px 0;
  font-size: 1.1em;
  border: none;
  border-radius: 8px;
  background: #e3f2fd;
  color: #1976d2;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.btn.op {
  background: #1976d2;
  color: #fff;
}
.btn.equal {
  background: #388e3c;
  color: #fff;
  grid-column: span 2;
}
.btn.clear {
  background: #e53935;
  color: #fff;
}
.btn:active {
  filter: brightness(0.92);
}
/* 页脚通用样式(与footer.html一致) */
.footer {
  background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
  color: #ecf0f1;
  margin-top: 60px;
  padding: 40px 0 20px 0;
  box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
}
.footer-content {
  max-width: 1024px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
  padding: 0 20px;
  justify-items: center;
  text-align: center;
}
.footer-section h3 {
  color: #3498db;
  margin-bottom: 15px;
  font-size: 1.2em;
  font-weight: 600;
}
.footer-section p {
  line-height: 1.6;
  color: #bdc3c7;
  margin-bottom: 15px;
}
.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
}
.footer-links li {
  margin-bottom: 8px;
}
.footer-links a {
  color: #bdc3c7;
  text-decoration: none;
  transition: color 0.3s ease;
  display: inline-block;
  padding: 2px 0;
}
.footer-links a:hover {
  color: #3498db;
  transform: translateX(5px);
}
.footer-bottom {
  border-top: 1px solid #34495e;
  margin-top: 30px;
  padding-top: 20px;
}
.footer-bottom-content {
  max-width: 1024px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 20px;
  flex-wrap: wrap;
  gap: 15px;
}
.footer-bottom p {
  color: #95a5a6;
  margin: 0;
}
.footer-social {
  display: flex;
  align-items: center;
  gap: 10px;
}
.footer-social span {
  color: #95a5a6;
  font-size: 0.9em;
}
.footer-social a {
  color: #bdc3c7;
  text-decoration: none;
  font-size: 1.2em;
  transition: color 0.3s ease;
  padding: 5px;
  border-radius: 50%;
  background: rgba(52, 152, 219, 0.1);
}
.footer-social a:hover {
  color: #3498db;
  background: rgba(52, 152, 219, 0.2);
}
@media (max-width: 500px) {
  .container { max-width: 99vw; margin: 0.5em auto; }
  .display, .result, .btns { width: 98%; }
  .btn { padding: 12px 0; font-size: 1em; }
  .footer-content { grid-template-columns: 1fr; gap: 25px; }
  .footer-bottom-content { flex-direction: column; text-align: center; }
  .footer-social { justify-content: center; }
} 
.fraction-calc-center-wrap {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  min-height: 60vh;
  padding-left: 40px; /* 增加左边界 */
}
@media (max-width: 700px) {
  .fraction-calc-center-wrap {
    display: block;
    min-height: unset;
    padding-left: 0;
  }
}
  /* form */
input[type="number"] {
  padding: 8px 12px;
  border: 1px solid #1976d2;
  border-radius: 4px;
  font-size: 1em;
  margin:1em 0 1em 0;

}
input[id="num"] {
  width:80%;

}
/* 搜索框样式 */
.nav-search-box {
  display: flex;
  align-items: center;
  margin-left: 24px;
  position: relative;
}
.nav-search-input {
  padding: 6px 12px;
  border: 1.5px solid #1976d2;
  border-radius: 20px 0 0 20px;
  outline: none;
  font-size: 1em;
  min-width: 160px;
  max-width: 240px;
  transition: box-shadow 0.2s;
}
.nav-search-input:focus {
  box-shadow: 0 0 0 2px #90caf9;
}
.nav-search-btn {
  padding: 6px 16px;
  border: 1.5px solid #1976d2;
  border-left: none;
  background: #1976d2;
  color: #fff;
  border-radius: 0 20px 20px 0;
  font-size: 1em;
  cursor: pointer;
  transition: background 0.2s;
}
.nav-search-btn:hover {
  background: #1565c0;
}

/* 搜索结果下拉 */
.nav-search-results {
  position: absolute;
  top: 110%;
  left: 0;
  width: 100%;
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 0 0 8px 8px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.08);
  z-index: 1000;
  max-height: 260px;
  overflow-y: auto;
  display: none;
}
.nav-search-results.active {
  display: block;
}
.nav-search-result-item {
  padding: 10px 16px;
  color: #1976d2;
  text-decoration: none;
  display: block;
  border-bottom: 1px solid #f0f0f0;
  font-size: 1em;
  cursor: pointer;
}
.nav-search-result-item:last-child {
  border-bottom: none;
}
.nav-search-result-item:hover {
  background: #e3f2fd;
}
@media (max-width: 600px) {
  .nav-search-box {
    margin-left: 8px;
  }
  .nav-search-input {
    min-width: 90px;
    max-width: 120px;
    font-size: 0.98em;
  }
  .nav-search-btn {
    padding: 6px 10px;
    font-size: 0.98em;
  }
}
/* 语言选择器样式 */
.nav-lang-box {
  margin-left: 18px;
  display: flex;
  align-items: center;
}
.nav-lang-select {
  padding: 5px 18px 5px 8px;
  border: 1.5px solid #1976d2;
  border-radius: 16px;
  font-size: 1em;
  background: #fff url('data:image/svg+xml;utf8,<svg fill="%231976d2" height="20" viewBox="0 0 24 24" width="20" xmlns="http://www.w3.org/2000/svg"><path d="M7 10l5 5 5-5z"/></svg>') no-repeat right 8px center/16px 16px;
  color: #1976d2;
  appearance: none;
  cursor: pointer;
  min-width: 80px;
}
.nav-lang-select:focus {
  outline: none;
  box-shadow: 0 0 0 2px #90caf9;
}
@media (max-width: 600px) {
  .nav-lang-box {
    margin-left: 6px;
  }
  .nav-lang-select {
    font-size: 0.98em;
    min-width: 60px;
    padding: 5px 10px 5px 6px;
  }
}
/* General Math Calculator 专用样式（如有重复可忽略，已尽量与全局样式合并） */
.container.general-math {
  max-width: 420px;
  margin: 32px auto;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 2px 16px rgba(0,0,0,0.08);
  padding: 0 0 24px 0;
}
.input-row {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 18px 0;
  align-items: center;
}
.op-row {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin: 0 0 8px 0;
}
.input-row input, .input-row select {
  width: 90%;
  padding: 8px;
  border-radius: 6px;
  border: 1px solid #b0bec5;
  text-align: center;
  font-size: 1em;
}
.calc-btn {
  display: block;
  width: 90%;
  margin: 18px auto 0 auto;
  padding: 12px 0;
  background: #1976d2;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 1.1em;
  font-weight: 500;
  cursor: pointer;
}
.calc-btn:hover {
  background: #1565c0;
}
.result.general-math {
  margin: 18px 0 0 0;
  text-align: center;
  font-size: 1.1em;
  color: #388e3c;
  min-height: 2em;
  word-break: break-all;
}
@media (max-width: 500px) {
  .container.general-math { max-width: 98vw; margin: 0.5em auto; }
  .input-row input, .input-row select { width: 96%; }
}

/* 钓鱼装备计算器样式 */
.fishing-calc-container {
  max-width: 600px;
  margin: 32px auto;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
  padding: 32px;
}

.fishing-calc-container h1 {
  color: #1976d2;
  text-align: center;
  margin-bottom: 24px;
  font-size: 28px;
}

.fishing-calc-container h2 {
  color: #424242;
  margin: 24px 0 16px 0;
  font-size: 20px;
}

.input-group {
  margin-bottom: 20px;
}

.input-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: #424242;
}

.input-group input, .input-group select {
  width: 100%;
  padding: 12px;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  font-size: 16px;
  transition: border-color 0.3s;
}

.input-group input:focus, .input-group select:focus {
  outline: none;
  border-color: #1976d2;
}

.budget-slider {
  width: 100%;
  margin: 10px 0;
}

.budget-display {
  text-align: center;
  font-size: 18px;
  font-weight: bold;
  color: #1976d2;
  margin: 10px 0;
}

.calculate-btn {
  width: 100%;
  padding: 16px;
  background: linear-gradient(135deg, #1976d2, #1565c0);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 18px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s;
  margin: 24px 0;
}

.calculate-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(25, 118, 210, 0.3);
}

.gear-recommendations {
  margin-top: 32px;
  padding: 24px;
  background: #f5f5f5;
  border-radius: 12px;
}

.gear-category {
  margin-bottom: 24px;
  padding: 16px;
  background: white;
  border-radius: 8px;
  border-left: 4px solid #1976d2;
}

.gear-category h3 {
  color: #1976d2;
  margin: 0 0 12px 0;
  font-size: 18px;
}

.gear-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid #e0e0e0;
}

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

.gear-name {
  font-weight: 500;
  color: #424242;
}

.gear-price {
  font-weight: bold;
  color: #1976d2;
}

.total-section {
  margin-top: 24px;
  padding: 16px;
  background: #e3f2fd;
  border-radius: 8px;
  text-align: center;
}

.total-price {
  font-size: 24px;
  font-weight: bold;
  color: #1976d2;
}

.budget-status {
  margin-top: 8px;
  font-weight: 500;
}

.budget-ok {
  color: #2e7d32;
}

.budget-over {
  color: #d32f2f;
}

.fishing-tips {
  margin-top: 24px;
  padding: 16px;
  background: #fff3e0;
  border-radius: 8px;
  border-left: 4px solid #ff9800;
}

.fishing-tips h4 {
  color: #e65100;
  margin: 0 0 12px 0;
}

.fishing-tips ul {
  margin: 0;
  padding-left: 20px;
}

.fishing-tips li {
  margin-bottom: 6px;
  color: #424242;
}

@media (max-width: 600px) {
  .fishing-calc-container {
    max-width: 95vw;
    margin: 16px auto;
    padding: 20px;
  }
  
  .fishing-calc-container h1 {
    font-size: 24px;
  }
  
  .gear-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }
}

/* 便携空调效能对比器样式 */
.ac-comparator-container {
  max-width: 1000px;
  margin: 32px auto;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
  padding: 32px;
}

.ac-comparator-container h1 {
  color: #1976d2;
  text-align: center;
  margin-bottom: 8px;
  font-size: 32px;
}

.subtitle {
  text-align: center;
  color: #666;
  margin-bottom: 32px;
  font-size: 16px;
}

.ac-comparator-container h2 {
  color: #424242;
  margin: 32px 0 20px 0;
  font-size: 24px;
  border-bottom: 2px solid #e0e0e0;
  padding-bottom: 8px;
}

.input-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin-bottom: 24px;
  align-items: start;
}

.input-group {
  margin-bottom: 0;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.input-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: #424242;
  flex-shrink: 0;
}

.input-group input, .input-group select {
  width: 100%;
  padding: 12px;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  font-size: 16px;
  transition: border-color 0.3s;
  box-sizing: border-box;
  height: 48px;
  flex: 1;
}

.input-group input:focus, .input-group select:focus {
  outline: none;
  border-color: #1976d2;
}

.calculate-btn {
  width: 100%;
  padding: 16px;
  background: linear-gradient(135deg, #1976d2, #1565c0);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 18px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s;
  margin: 24px 0;
}

.calculate-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(25, 118, 210, 0.3);
}

.results-section {
  margin-top: 32px;
}

.comparison-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 24px;
  margin-bottom: 32px;
}

.comparison-card {
  padding: 24px;
  border-radius: 12px;
  border: 2px solid #e0e0e0;
  transition: transform 0.2s;
}

.comparison-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.1);
}

.comparison-card.portable-ac {
  border-color: #4caf50;
  background: linear-gradient(135deg, #f1f8e9, #fff);
}

.comparison-card.traditional-ac {
  border-color: #2196f3;
  background: linear-gradient(135deg, #e3f2fd, #fff);
}

.comparison-card h3 {
  color: #1976d2;
  margin: 0 0 20px 0;
  font-size: 20px;
  text-align: center;
}

.efficiency-metrics {
  margin-bottom: 24px;
}

.metric {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid #e0e0e0;
}

.metric:last-child {
  border-bottom: none;
}

.metric-label {
  font-weight: 500;
  color: #424242;
}

.metric-value {
  font-weight: bold;
  color: #1976d2;
}

.pros-cons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.pros h4, .cons h4 {
  margin: 0 0 12px 0;
  font-size: 16px;
}

.pros h4 {
  color: #2e7d32;
}

.cons h4 {
  color: #d32f2f;
}

.pros ul, .cons ul {
  margin: 0;
  padding-left: 20px;
}

.pros li, .cons li {
  margin-bottom: 6px;
  color: #424242;
  font-size: 14px;
}

.savings-analysis {
  background: #f5f5f5;
  padding: 24px;
  border-radius: 12px;
  margin-bottom: 32px;
}

.savings-analysis h3 {
  color: #1976d2;
  margin: 0 0 20px 0;
  text-align: center;
}

.savings-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}

.savings-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px;
  background: white;
  border-radius: 8px;
  border-left: 4px solid #1976d2;
}

.savings-label {
  font-weight: 500;
  color: #424242;
}

.savings-value {
  font-weight: bold;
  color: #1976d2;
  font-size: 18px;
}

.recommendation-section {
  background: #e8f5e8;
  padding: 24px;
  border-radius: 12px;
  border-left: 4px solid #4caf50;
  margin-bottom: 32px;
}

.recommendation-section h3 {
  color: #2e7d32;
  margin: 0 0 16px 0;
}

.recommendation p {
  margin: 0;
  color: #424242;
  font-size: 16px;
  line-height: 1.6;
}

.tips-section {
  margin-top: 32px;
}

.tips-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.tip-card {
  padding: 20px;
  background: #f9f9f9;
  border-radius: 8px;
  border-left: 4px solid #ff9800;
}

.tip-card h4 {
  color: #e65100;
  margin: 0 0 12px 0;
  font-size: 16px;
}

.tip-card p {
  margin: 0;
  color: #424242;
  font-size: 14px;
  line-height: 1.5;
}

@media (max-width: 768px) {
  .ac-comparator-container {
    max-width: 95vw;
    margin: 16px auto;
    padding: 20px;
  }
  
  .ac-comparator-container h1 {
    font-size: 24px;
  }
  
  .comparison-cards {
    grid-template-columns: 1fr;
  }
  
  .pros-cons {
    grid-template-columns: 1fr;
  }
  
  .savings-metrics {
    grid-template-columns: 1fr;
  }
  
  .tips-grid {
    grid-template-columns: 1fr;
  }
}