/* =====================================================
   TBO基地 - 工具页面专用样式增强
   用于确保所有计算器页面样式一致
   ===================================================== */

/* 输入框增强样式 */
.input-group input[type="number"],
.input-group input[type="text"],
.input-group select {
  width: 100%;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  line-height: 1.5;
  color: #1f2937;
  background-color: #ffffff;
  background-clip: padding-box;
  border: 2px solid #d1d5db;
  border-radius: 0.5rem;
  transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.input-group input:focus,
.input-group select:focus {
  color: #1f2937;
  background-color: #ffffff;
  border-color: #3b82f6;
  outline: 0;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.input-group input::placeholder {
  color: #9ca3af;
  opacity: 1;
}

/* 标签样式 */
.input-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: #374151;
}

/* 按钮基础样式 */
button {
  display: inline-block;
  font-weight: 600;
  text-align: center;
  vertical-align: middle;
  user-select: none;
  border: 1px solid transparent;
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  line-height: 1.5;
  border-radius: 0.5rem;
  transition: all 0.15s ease-in-out;
  cursor: pointer;
}

button:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

button:active {
  transform: translateY(0);
}

button:focus {
  outline: 0;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.3);
}

button:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

/* 主要按钮（蓝色） */
.btn-primary,
button.bg-blue-600,
button.bg-blue-500 {
  color: #ffffff;
  background-color: #3b82f6;
  border-color: #3b82f6;
}

.btn-primary:hover,
button.bg-blue-600:hover,
button.hover\:bg-blue-700:hover {
  background-color: #2563eb;
  border-color: #2563eb;
}

/* 成功按钮（绿色） */
.btn-success,
button.bg-green-600 {
  color: #ffffff;
  background-color: #16a34a;
  border-color: #16a34a;
}

.btn-success:hover,
button.bg-green-600:hover,
button.hover\:bg-green-700:hover {
  background-color: #15803d;
  border-color: #15803d;
}

/* 紫色按钮 */
button.bg-purple-600 {
  color: #ffffff;
  background-color: #9333ea;
  border-color: #9333ea;
}

button.bg-purple-600:hover,
button.hover\:bg-purple-700:hover {
  background-color: #7e22ce;
  border-color: #7e22ce;
}

/* 橙色按钮 */
button.bg-orange-600 {
  color: #ffffff;
  background-color: #ea580c;
  border-color: #ea580c;
}

button.bg-orange-600:hover,
button.hover\:bg-orange-700:hover {
  background-color: #c2410c;
  border-color: #c2410c;
}

/* 红色按钮 */
button.bg-red-600 {
  color: #ffffff;
  background-color: #dc2626;
  border-color: #dc2626;
}

button.bg-red-600:hover,
button.hover\:bg-red-700:hover {
  background-color: #b91c1c;
  border-color: #b91c1c;
}

/* 粉色按钮 */
button.bg-pink-600 {
  color: #ffffff;
  background-color: #db2777;
  border-color: #db2777;
}

button.bg-pink-600:hover,
button.hover\:bg-pink-700:hover {
  background-color: #be185d;
  border-color: #be185d;
}

/* 青色按钮 */
button.bg-cyan-600 {
  color: #ffffff;
  background-color: #0891b2;
  border-color: #0891b2;
}

button.bg-cyan-600:hover,
button.hover\:bg-cyan-700:hover {
  background-color: #0e7490;
  border-color: #0e7490;
}

/* 靛蓝色按钮 */
button.bg-indigo-600 {
  color: #ffffff;
  background-color: #4f46e5;
  border-color: #4f46e5;
}

button.bg-indigo-600:hover,
button.hover\:bg-indigo-700:hover {
  background-color: #4338ca;
  border-color: #4338ca;
}

/* 黄色按钮 */
button.bg-yellow-600 {
  color: #ffffff;
  background-color: #ca8a04;
  border-color: #ca8a04;
}

button.bg-yellow-600:hover,
button.hover\:bg-yellow-700:hover {
  background-color: #a16207;
  border-color: #a16207;
}

/* 青绿色按钮 */
button.bg-teal-600 {
  color: #ffffff;
  background-color: #0d9488;
  border-color: #0d9488;
}

button.bg-teal-600:hover,
button.hover\:bg-teal-700:hover {
  background-color: #0f766e;
  border-color: #0f766e;
}

/* 性别选择按钮 */
button.border-2 {
  font-weight: 600;
  padding: 0.75rem 1rem;
}

button.border-gray-300 {
  color: #6b7280;
  background-color: #ffffff;
  border-color: #d1d5db;
}

button.border-gray-300:hover {
  border-color: #3b82f6;
  color: #3b82f6;
  background-color: #eff6ff;
}

/* 卡片样式 */
.bg-white {
  background-color: #ffffff !important;
}

.rounded-2xl {
  border-radius: 1rem !important;
}

.shadow-lg {
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05) !important;
}

.shadow-sm {
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05) !important;
}

/* 结果卡片 */
#result {
  transition: all 0.3s ease-in-out;
}

#result.show {
  animation: fadeInUp 0.5s ease-out;
}

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

/* 结果状态样式 */
.result-excellent {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #ffffff;
}

.result-good {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  color: #ffffff;
}

.result-normal {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: #ffffff;
}

.result-warning {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  color: #ffffff;
}

/* 工具链接卡片 */
.related-tool {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 0.75rem;
  padding: 1rem;
  transition: all 0.3s ease;
  display: block;
  text-decoration: none;
  color: inherit;
}

.related-tool:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  border-color: #3b82f6;
}

.related-tool i {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.related-tool h4 {
  font-size: 1rem;
  font-weight: 600;
  color: #1f2937;
  margin-bottom: 0.25rem;
}

.related-tool p {
  font-size: 0.875rem;
  color: #6b7280;
  margin: 0;
}

/* 信息框 */
.info-box {
  background: #eff6ff;
  border-left: 4px solid #3b82f6;
  border-radius: 0.5rem;
  padding: 1rem;
  margin-bottom: 1rem;
}

.info-box.warning {
  background: #fef3c7;
  border-left-color: #f59e0b;
}

.info-box.danger {
  background: #fee2e2;
  border-left-color: #ef4444;
}

.info-box.success {
  background: #d1fae5;
  border-left-color: #10b981;
}

/* 表格样式 */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
}

table th,
table td {
  padding: 0.75rem;
  text-align: left;
  border-bottom: 1px solid #e5e7eb;
}

table th {
  background-color: #f9fafb;
  font-weight: 600;
  color: #374151;
}

table tr:hover {
  background-color: #f9fafb;
}

/* 加载状态 */
.loading {
  display: inline-block;
  width: 1rem;
  height: 1rem;
  border: 2px solid #ffffff;
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* 响应式增强 */
@media (max-width: 768px) {
  .input-group input,
  .input-group select,
  button {
    font-size: 0.9375rem;
    padding: 0.625rem 0.875rem;
  }
  
  .grid.lg\:grid-cols-2 {
    grid-template-columns: 1fr !important;
  }
  
  button.flex-1 {
    font-size: 0.875rem;
    padding: 0.625rem 0.5rem;
  }
}

/* 打印样式 */
@media print {
  button,
  .related-tool,
  header,
  footer {
    display: none !important;
  }
  
  .bg-white {
    box-shadow: none !important;
  }
}

/* 辅助文本 */
.text-helper {
  font-size: 0.75rem;
  color: #6b7280;
  margin-top: 0.25rem;
}

/* 错误提示 */
.error-message {
  color: #dc2626;
  font-size: 0.875rem;
  margin-top: 0.25rem;
  display: none;
}

.error-message.show {
  display: block;
}

/* Space工具类增强 */
.space-y-6 > * + * {
  margin-top: 1.5rem !important;
}

.space-x-4 > * + * {
  margin-left: 1rem !important;
}

/* Flex增强 */
.flex-1 {
  flex: 1 1 0% !important;
}

/* 确保文本样式 */
.text-4xl {
  font-size: 2.25rem !important;
  line-height: 2.5rem !important;
}

.text-2xl {
  font-size: 1.5rem !important;
  line-height: 2rem !important;
}

.text-xl {
  font-size: 1.25rem !important;
  line-height: 1.75rem !important;
}

.text-lg {
  font-size: 1.125rem !important;
  line-height: 1.75rem !important;
}

.font-bold {
  font-weight: 700 !important;
}

.font-semibold {
  font-weight: 600 !important;
}

/* 颜色确保 */
.text-gray-800 {
  color: #1f2937 !important;
}

.text-gray-700 {
  color: #374151 !important;
}

.text-gray-600 {
  color: #4b5563 !important;
}

.text-white {
  color: #ffffff !important;
}

.bg-gray-50 {
  background-color: #f9fafb !important;
}
