:root {
  --primary-color: #1e3c72;
  --secondary-color: #2a5298;
  --accent-color: #ffd700;
  --background-color: #f5f7fa;
  --input-background: #ffffff;
  --border-color: #d0d7e0;
  --text-color: #333;
  --error-color: #dc3545;
  --success-color: #28a745;
  --card-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Microsoft YaHei', sans-serif;
  line-height: 1.6;
  color: #333;
  background-color: var(--background-color);
  min-height: 100vh;
}

/* 导航栏样式 - 与社区首页保持一致 */
.navbar {
  background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
  color: white;
  padding: 1rem 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.navbar-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 1.5rem;
  font-weight: bold;
  color: white;
  text-decoration: none;
}

.nav-links {
  display: flex;
  list-style: none;
}

.nav-links li {
  margin-left: 2rem;
}

.nav-links a {
  color: white;
  text-decoration: none;
  font-size: 1rem;
  transition: color 0.3s ease;
}

.nav-links a:hover {
  color: #ffd700;
}

/* 主内容区域 */
.container {
  max-width: 500px;
  margin: 2rem auto;
  padding: 0 20px;
}

/* 头部样式 */
.header {
  text-align: center;
  margin-bottom: 2rem;
}

.header h1 {
  color: var(--primary-color);
  font-size: 2rem;
  font-weight: bold;
}

/* 输入组样式 */
.input-group {
  margin-bottom: 1.5rem;
}

.label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: var(--primary-color);
}

.input-field {
  width: 100%;
  padding: 0.875rem 1rem;
  background-color: var(--input-background);
  border: 2px solid var(--border-color);
  border-radius: 8px;
  font-size: 1rem;
  transition: all 0.3s ease;
  outline: none;
  font-family: inherit;
}

.input-field:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(30, 60, 114, 0.1);
}

/* 模式选择器样式 */
.mode-selector {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.mode-button {
  flex: 1;
  padding: 0.875rem 1rem;
  background-color: var(--input-background);
  border: 2px solid var(--border-color);
  border-radius: 8px;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  outline: none;
  font-family: inherit;
  font-weight: 600;
  color: var(--text-color);
}

.mode-button:hover {
  border-color: var(--primary-color);
  color: var(--primary-color);
}

.mode-button.active {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: white;
  border-color: var(--primary-color);
  box-shadow: 0 4px 12px rgba(30, 60, 114, 0.3);
}

/* 计算按钮样式 */
.calculate-button {
  width: 100%;
  padding: 1rem 1.25rem;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  border: 2px solid var(--primary-color);
  border-radius: 8px;
  font-size: 1.125rem;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
  outline: none;
  margin-bottom: 1.5rem;
  font-family: inherit;
  color: white;
  box-shadow: 0 4px 12px rgba(30, 60, 114, 0.2);
}

.calculate-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(30, 60, 114, 0.3);
}

.calculate-button:active {
  transform: translateY(0);
}

/* 结果容器样式 */
.result-container {
  margin-top: 1.5rem;
  padding: 1.25rem;
  border-radius: 8px;
  text-align: center;
}

.result-success {
  background-color: rgba(40, 167, 69, 0.1);
  border: 2px solid var(--success-color);
  color: var(--success-color);
}

.result-error {
  background-color: rgba(220, 53, 69, 0.1);
  border: 2px solid var(--error-color);
  color: var(--error-color);
}

.result-title {
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.result-value {
  font-size: 1.25rem;
  font-weight: bold;
  font-family: 'Courier New', monospace;
}

.hidden {
  display: none;
}

/* 提示信息样式 */
.v3Tips {
  max-width: 100%;
  margin-top: 1.5rem;
  padding: 1.25rem;
  border-radius: 8px;
  text-align: left;
  background-color: rgba(255, 215, 0, 0.1);
  border: 2px solid var(--accent-color);
}

.v3Tips h3 {
  color: var(--primary-color);
  margin-bottom: 0.75rem;
  font-size: 1.125rem;
}

.v3Tips p {
  margin-bottom: 0.5rem;
  color: var(--text-color);
  line-height: 1.6;
}

/* 页脚样式 */
.footer {
  text-align: center;
  margin-top: 2rem;
  padding: 1.5rem 0;
  border-top: 1px solid var(--border-color);
  color: #6c757d;
  font-size: 0.875rem;
}

.author-info {
  margin-top: 0.5rem;
  font-size: 0.75rem;
  color: #888;
}

.github-info {
  margin-top: 0.5rem;
  font-size: 0.75rem;
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.3s ease;
}

.github-info:hover {
  color: var(--secondary-color);
  text-decoration: underline;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .navbar-container {
    flex-direction: column;
  }

  .nav-links {
    margin-top: 1rem;
  }

  .nav-links li {
    margin: 0 1rem;
  }

  .container {
    margin: 1rem auto;
  }

  .header h1 {
    font-size: 1.75rem;
  }
}