/* 进制转换工具页面样式 */
.tool-description {
  color: #666;
  font-size: 1.1rem;
  margin-bottom: 2rem;
  line-height: 1.6;
}

/* 选项卡样式 */
.tool-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 2rem;
  border-bottom: 2px solid #f0f0f0;
}

.tab-btn {
  padding: 0.8rem 1.5rem;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  color: #666;
  border-bottom: 3px solid transparent;
  transition: all 0.3s;
}

.tab-btn:hover {
  color: #667eea;
  background: rgba(102, 126, 234, 0.1);
}

.tab-btn.active {
  color: #667eea;
  border-bottom-color: #667eea;
  font-weight: bold;
}

/* 工具面板 */
.tool-panel {
  animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 进制转换器样式 */
.converter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.base-input-group {
  background: #f8f9fa;
  padding: 1.5rem;
  border-radius: 10px;
  border: 2px solid #e9ecef;
  transition: border-color 0.3s;
}

.base-input-group:hover {
  border-color: #667eea;
}

.base-input-group label {
  display: block;
  font-weight: bold;
  color: #667eea;
  margin-bottom: 0.8rem;
  font-size: 1.1rem;
}

.base-input-group input {
  width: 100%;
  padding: 0.8rem;
  border: 2px solid #e0e0e0;
  border-radius: 5px;
  font-size: 1rem;
  font-family: monospace;
  transition: border-color 0.3s;
}

.base-input-group input:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.input-hint {
  font-size: 0.8rem;
  color: #999;
  margin-top: 0.5rem;
  font-style: italic;
}

/* 转换结果样式 */
.conversion-result {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 2rem;
  border-radius: 15px;
  margin-bottom: 2rem;
}

.conversion-result h3 {
  margin-bottom: 1.5rem;
  text-align: center;
  font-size: 1.3rem;
}

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

.result-item {
  background: rgba(255, 255, 255, 0.1);
  padding: 1rem;
  border-radius: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.result-label {
  font-weight: bold;
  opacity: 0.9;
}

.result-value {
  font-family: monospace;
  font-size: 1.1rem;
  font-weight: bold;
}

/* 清空按钮 */
.clear-section {
  text-align: center;
}

/* 批量转换样式 */
.batch-converter {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

.batch-input-section {
  background: #f8f9fa;
  padding: 2rem;
  border-radius: 15px;
}

.batch-result-section {
  background: #f8f9fa;
  padding: 2rem;
  border-radius: 15px;
}

.batch-result-section h3 {
  color: #667eea;
  margin-bottom: 1rem;
}

.batch-result-section pre {
  background: white;
  padding: 1rem;
  border-radius: 5px;
  border: 2px solid #e9ecef;
  font-family: monospace;
  white-space: pre-wrap;
  max-height: 300px;
  overflow-y: auto;
}

/* 进制计算器样式 */
.base-calculator {
  background: #f8f9fa;
  padding: 2rem;
  border-radius: 15px;
}

.base-calculator h3 {
  color: #667eea;
  margin-bottom: 1.5rem;
  text-align: center;
}

.calculator-inputs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.calculator-result {
  background: white;
  padding: 1.5rem;
  border-radius: 10px;
  border: 2px solid #e9ecef;
}

.calculator-result h4 {
  color: #667eea;
  margin-bottom: 1rem;
  text-align: center;
}

/* 进制对照表样式 */
.reference-table {
  font-family: monospace;
  font-size: 0.9rem;
}

.table-header {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.5rem;
  padding: 0.8rem;
  background: #667eea;
  color: white;
  border-radius: 5px;
  font-weight: bold;
  margin-bottom: 0.5rem;
}

.table-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.5rem;
  padding: 0.5rem;
  background: #f8f9fa;
  border-radius: 3px;
  margin-bottom: 0.2rem;
  transition: background-color 0.3s;
}

.table-row:hover {
  background: #e9ecef;
}

.table-header span,
.table-row span {
  text-align: center;
  padding: 0.2rem;
}

/* 帮助内容 */
.help-content h4 {
  color: #667eea;
  margin: 1rem 0 0.5rem 0;
  font-size: 1rem;
}

.help-content h4:first-child {
  margin-top: 0;
}

.help-content p {
  color: #666;
  font-size: 0.9rem;
  line-height: 1.5;
  margin-bottom: 1rem;
}

/* 相关工具 */
.related-tools {
  list-style: none;
}

.related-tools li {
  margin-bottom: 0.8rem;
}

.related-tools a {
  display: block;
  padding: 0.8rem;
  background: #f8f9fa;
  color: #667eea;
  text-decoration: none;
  border-radius: 5px;
  transition: all 0.3s;
}

.related-tools a:hover {
  background: #e9ecef;
  transform: translateX(5px);
}

/* 活跃导航项 */
.nav-menu a.active {
  background-color: rgba(255, 255, 255, 0.3);
}

/* 响应式调整 */
@media (max-width: 768px) {
  
  .tool-container {
    grid-template-columns: 1fr;
  }

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

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

  .batch-converter {
    grid-template-columns: 1fr;
  }

  .calculator-inputs {
    grid-template-columns: 1fr;
  }

  .table-header,
  .table-row {
    font-size: 0.8rem;
  }
}
