/* 页面基础样式 */
body {
  background-color: #f3f4f6;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  margin: 0;
  font-family: "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: #333;
}

/* 主容器 */
.container {
  background-color: #fff;
  width: 90%;
  max-width: 400px;
  padding: 2rem;
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  position: relative;
}

/* 语言切换按钮 */
.lang-toggle {
  position: absolute;
  top: 1rem;
  right: 1rem;
}
.lang-toggle button {
  background: none;
  border: none;
  color: #555;
  font-size: 0.9rem;
  cursor: pointer;
  transition: color 0.3s;
}
.lang-toggle button:hover {
  color: #2563eb;
}

/* 标题 */
h1 {
  text-align: center;
  font-size: 1.6rem;
  font-weight: bold;
  margin-bottom: 1.5rem;
}

/* 输入框 */
label {
  display: block;
  font-weight: 500;
  margin-bottom: 0.5rem;
}

input[type="text"] {
  width: 100%;
  padding: 0.6rem;
  border: 1px solid #ccc;
  border-radius: 8px;
  font-size: 1rem;
  outline: none;
  margin-bottom: 1rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}

input[type="text"]:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.2);
}

/* 按钮组 */
.button-group {
  display: flex;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

button {
  flex: 1;
  padding: 0.6rem;
  font-size: 1rem;
  font-weight: 500;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.2s, transform 0.1s;
}

button:active {
  transform: scale(0.97);
}

/* 主按钮 */
.btn-primary {
  background-color: #2563eb;
  color: #fff;
  border: none;
}
.btn-primary:hover {
  background-color: #1e40af;
}

/* 次按钮 */
.btn-secondary {
  background-color: #e5e7eb;
  color: #333;
  border: none;
}
.btn-secondary:hover {
  background-color: #d1d5db;
}

/* 结果提示 */
.result {
  text-align: center;
  color: #555;
  margin-top: 1rem;
  font-size: 0.95rem;
}

/* 响应式 */
@media (max-width: 480px) {
  .container {
    padding: 1.5rem;
  }
  h1 {
    font-size: 1.3rem;
  }
}
