:root {
  --bg-color: #ffffff;
  --text-color: #121212;
  --accent-color: #00D1B2;
  --border-color: #e0e0e0;
  --input-bg: #fafafa;
  --shadow: rgba(0, 0, 0, 0.05) 0px 2px 8px;
  --logo-color: #3B82F6;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Segoe UI", "Helvetica Neue", sans-serif;
  background: var(--bg-color);
  color: var(--text-color);
  line-height: 1.6;
  font-size: 16px;
}

/* 语言选择器样式 */
.language-selector {
  position: absolute;
  top: 40px;
  right: 20px;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  z-index: 1000;
}

#language-selector {
  padding: 0.5rem 1rem;
  border: 1px solid #ddd;
  border-radius: 4px;
  background-color: white;
  font-size: 0.9rem;
  cursor: pointer;
  outline: none;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 20px;
  position: relative; /* 为绝对定位的语言选择器提供参照 */
}

h1 {
  font-size: 2.4rem;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  position: relative; /* 确保h1作为定位上下文 */
}

h1, h2 {
  font-weight: 600;
  color: var(--text-color);
  margin-bottom: 12px;
}

/* 网站描述样式 */
.site-description {
  text-align: center;
  max-width: 800px;
  margin: 20px auto 40px;
  font-size: 1.1rem;
  color: #555;
  line-height: 1.6;
}

/* 页脚样式 */
footer {
  margin-top: 60px;
  padding-top: 30px;
  border-top: 1px solid var(--border-color);
  text-align: center;
  color: #888;
  font-size: 0.9rem;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px 30px;
}

/* 语义化元素样式 */
header {
  margin-bottom: 40px;
  text-align: center;
}

main {
  margin-bottom: 60px;
}

h1 {
  font-size: 2.4rem;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
}

.logo-icon {
  color: var(--logo-color);
  height: 2.4rem;
  width: 2.4rem;
}

h2 {
  font-size: 1.5rem;
  margin-top: 40px;
  border-left: 4px solid var(--accent-color);
  padding-left: 12px;
}

.row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
}

textarea {
  font-family: monospace;
  padding: 10px;
  font-size: 1rem;
  background: var(--input-bg);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  resize: none;
  height: 40px;
  white-space: nowrap;
  overflow-x: auto;
  flex: 1 1 200px;
}

select {
  padding: 10px;
  font-size: 1rem;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  background: #fff;
  height: 40px;
  flex: 0 0 200px;
}

button {
  padding: 10px 14px;
  font-size: 1rem;
  background: var(--accent-color);
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s ease;
  box-shadow: var(--shadow);
  flex-shrink: 0;
  height: 40px;
}

button:hover {
  background: #00bfa1;
}

.copy-wrapper {
  position: relative;
  display: inline-block;
}

.copy-tip {
  position: absolute;
  left: 100%;
  top: 50%;
  transform: translate(10px, -50%);
  background: #ffffff;
  color: var(--accent-color);
  font-size: 0.9rem;
  font-weight: 500;
  pointer-events: none;
  white-space: nowrap;
  opacity: 1;
  animation: fadeInOut 1.5s ease-out forwards;
}

@keyframes fadeInOut {
  0%   { opacity: 0; transform: translate(10px, -50%) scale(0.95); }
  10%  { opacity: 1; transform: translate(10px, -50%) scale(1); }
  90%  { opacity: 1; }
  100% { opacity: 0; transform: translate(10px, -50%) scale(0.95); }
}

hr {
  margin: 40px 0;
  border: none;
  border-top: 1px solid #eee;
}

/* 日期选择器按钮样式 */
.date-picker-btn {
  padding: 8px 12px;
  background: #f0f0f0;
  border: 1px solid #ddd;
  border-radius: 4px;
  cursor: pointer;
  font-size: 1rem;
  transition: background-color 0.2s ease;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.date-picker-btn:hover {
  background: #e0e0e0;
}

/* 输入框和按钮组合样式 */
.input-with-button {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1 1 200px;
}

.input-with-button textarea {
  flex: 1;
  margin: 0;
}

.input-with-button .date-picker-btn {
  flex-shrink: 0;
  margin: 0;
}

/* 隐藏的日期时间选择器 */
#datetime-picker {
  position: absolute;
  top: 0;
  left: 0;
  width: 1px;
  height: 1px;
  opacity: 0;
}

/* 自定义日期时间选择器样式 */
.custom-datetime-picker {
  position: fixed;
  z-index: 10000;
  background: white;
  border: 1px solid #ccc;
  border-radius: 8px;
  padding: 15px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  min-width: 280px;
}

/* 日期选择容器样式 - 与时间选择器对齐 */
.custom-datetime-picker > div:first-child {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 12px;
}

/* 年月日时分秒标签样式 */
.custom-datetime-picker label {
  font-size: 14px;
  color: #666;
  white-space: nowrap;
  min-width: 20px;
}

/* 年月日下拉选择框样式 - 与时间输入框对齐 */
.custom-datetime-picker select {
  padding: 8px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
  height: 36px;
  min-width: 50px;
  flex: 1;
}

/* 确保下拉选择框和输入框焦点样式一致 */
.custom-datetime-picker select:focus {
  outline: none;
  border-color: #007bff;
  box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

.custom-datetime-picker input[type="number"] {
  padding: 8px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
  text-align: center;
  height: 36px; /* 与日期选择框高度保持一致 */
  min-width: 60px;
}

.custom-datetime-picker input[type="number"]:focus {
  outline: none;
  border-color: #007bff;
  box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

.custom-datetime-picker .time-container {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 12px;
}

.custom-datetime-picker .time-container span {
  font-weight: bold;
  color: #666;
}

.custom-datetime-picker .button-container {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.custom-datetime-picker button {
  padding: 6px 12px;
  font-size: 14px;
  border-radius: 4px;
  cursor: pointer;
  border: none;
  transition: all 0.2s ease;
}

.custom-datetime-picker button.confirm {
  background: #007bff;
  color: white;
}

.custom-datetime-picker button.confirm:hover {
  background: #0056b3;
}

.custom-datetime-picker button.cancel {
  background: #6c757d;
  color: white;
}

.custom-datetime-picker button.cancel:hover {
  background: #545b62;
}
