/* 全局样式 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.6;
  color: #333;
  background: #f5f7fa;
  min-height: 100vh;
}

.container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header */
header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 40px 0;
  text-align: center;
}

.logo {
  font-size: 2.5rem;
  margin-bottom: 10px;
}

.tagline {
  font-size: 1.1rem;
  opacity: 0.9;
}

/* Main */
main {
  padding: 40px 0;
}

/* 工具网格 */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin: 30px 0;
}

.tool-card {
  background: white;
  border-radius: 12px;
  padding: 30px 20px;
  text-align: center;
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

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

.tool-icon {
  font-size: 3rem;
  margin-bottom: 15px;
}

.tool-card h2 {
  font-size: 1.2rem;
  margin-bottom: 10px;
  color: #333;
}

.tool-card p {
  font-size: 0.9rem;
  color: #666;
}

/* 广告位 */
.ad-slot {
  min-height: 90px;
  margin: 20px 0;
  background: #f0f0f0;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #999;
  font-size: 0.9rem;
}

/* 计算器页面通用样式 */
.calculator {
  background: white;
  border-radius: 12px;
  padding: 30px;
  margin: 20px 0;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.calculator h2 {
  color: #667eea;
  margin-bottom: 20px;
  font-size: 1.5rem;
}

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

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  color: #555;
}

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

.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: #667eea;
}

.btn {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  padding: 14px 32px;
  font-size: 1rem;
  border-radius: 8px;
  cursor: pointer;
  transition: opacity 0.2s;
  width: 100%;
}

.btn:hover {
  opacity: 0.9;
}

.result {
  margin-top: 25px;
  padding: 20px;
  background: #f8f9ff;
  border-radius: 8px;
  border-left: 4px solid #667eea;
}

.result-item {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid #eee;
}

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

.result-label {
  color: #666;
}

.result-value {
  font-weight: 600;
  color: #333;
}

.result-value.highlight {
  color: #667eea;
  font-size: 1.2rem;
}

/* 返回按钮 */
.back-link {
  display: inline-block;
  margin-bottom: 20px;
  color: #667eea;
  text-decoration: none;
}

.back-link:hover {
  text-decoration: underline;
}

/* Footer */
footer {
  background: #333;
  color: #aaa;
  padding: 20px 0;
  text-align: center;
  font-size: 0.9rem;
}

/* 响应式 */
@media (max-width: 600px) {
  .logo {
    font-size: 2rem;
  }
  
  .tools-grid {
    grid-template-columns: 1fr;
  }
  
  .calculator {
    padding: 20px;
  }
}
