* {
  margin: 0;
  padding: 0;
}

body {
  background-color: #f1f2f3;
}

.container {
  box-sizing: border-box;
  width: 100%;
  max-width: 1600px;
  min-width: 1240px;
  margin: 25px auto;
  color: #333;
  display: flex;
  flex-direction: column;
}

.container * {
  box-sizing: border-box;
}

/* 头部样式 */
header {
  position: relative;
  margin-bottom: 20px;
  text-align: center;
}

header h1 {
  font-size: 32px;
  margin-bottom: 5px;
}

header p {
  font-size: 16px;
  line-height: 1.6;
}

.hero {
  background: linear-gradient(135deg, #6a11cb 0%, #2575fc 100%);
  color: white;
  border-radius: 15px;
  padding: 20px;
  margin-bottom: 25px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
  position: relative;
  overflow: hidden;
}

.hero-content {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.hero-text {
  flex: 1;
}

.hero h2 {
  font-size: 1.5rem;
  margin-bottom: 10px;
  font-weight: 600;
}

.hero p {
  font-size: 0.9rem;
  opacity: 0.9;
  margin-bottom: 10px;
}

.stats {
  display: flex;
  gap: 25px;
}

.stat-box {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 10px;
  padding: 15px 35px;
  text-align: center;
  min-width: 160px;
  backdrop-filter: blur(5px);
}

.stat-value {
  font-size: 2.2rem;
  font-weight: 700;
  margin-bottom: 5px;
}

.stat-label {
  font-size: 0.95rem;
  opacity: 0.85;
}

.key-info {
  background: white;
  border-radius: 15px;
  padding: 20px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.06);
  margin-bottom: 25px;
}

.info-display {
  display: flex;
  gap: 20px;
  margin-top: 10px;
}

.info-item {
  flex: 1;
  display: flex;
  background: #f8f9fa;
  border-radius: 12px;
  padding: 15px;
  align-items: center;
  transition: all 0.3s ease;
  border: 1px solid #eef2f7;
}

.info-item:hover {
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
}

.info-label {
  font-weight: bold;
  min-width: 120px;
  color: #2c3e50;
  font-size: 1.1rem;
}

.info-value {
  flex: 1;
  font-family: 'Courier New', monospace;
  font-size: 1.3rem;
  padding: 10px 15px;
  background: white;
  border-radius: 8px;
  border: 1px solid #e0e0e0;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
}

.info-value:hover {
  background: #f0f7ff;
  border-color: #3498db;
}

.info-value::after {
  content: "点击复制";
  position: absolute;
  right: 15px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.8rem;
  color: #3498db;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.info-value:hover::after {
  opacity: 1;
}

.keyboard-container {
  background: white;
  border-radius: 15px;
  padding: 20px;
  margin-bottom: 25px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.06);
}

.keyboard-layout {
  display: flex;
  gap: 25px;
}

.main-keyboard {
  flex: 3;
}

.numpad {
  display: flex;
}

.keyboard {
  background: #d6e4f0;
  border-radius: 12px;
  padding: 20px;
  box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.08), 0 8px 25px rgba(0, 0, 0, 0.1);
}

.keyboard-row {
  display: flex;
  justify-content: center;
  margin-bottom: 8px;
}

.key {
  background: white;
  border-radius: 8px;
  padding: 18px 0;
  min-width: 50px;
  min-height: 50px;
  margin: 0 4px;
  text-align: center;
  font-weight: bold;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  transition: all 0.1s ease;
  position: relative;
  border: 1px solid #d1d9e6;
  user-select: none;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
}

.key.active {
  background: linear-gradient(135deg, #3498db 0%, #2c80d0 100%);
  color: white;
  transform: translateY(2px);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.key.space {
  min-width: 350px;
}

.key.enter {
  min-width: 90px;
}

.key.shift {
  min-width: 100px;
}

.key.tab {
  min-width: 75px;
}

.key.caps {
  min-width: 90px;
}

.key.backspace {
  min-width: 95px;
}

.key.ctrl {
  min-width: 70px;
}

.key.alt {
  min-width: 70px;
}

.key.function {
  min-width: 50px;
  padding: 18px 5px;
}

.key.arrow {
  min-width: 50px;
}

.key.special {
  background: #eef2f7;
}

.key .secondary {
  position: absolute;
  bottom: 2px;
  left: 0;
  right: 0;
  font-size: 0.65rem;
  color: #7f8c8d;
}

.key.active .secondary {
  color: #d6eaf8;
}

.key-code {
  position: absolute;
  top: 5px;
  left: 5px;
  font-size: 0.6rem;
  color: #95a5a6;
}

.key.active .key-code {
  color: #d6eaf8;
}

.key.numpad-key {
  min-width: 60px;
}

.key.numpad-0 {
  min-width: 128px;
}

.key.numpad-enter,
.key.numpad-plus {
  min-width: 60px;
  min-height: 118px;
  position: absolute;
  left: -4px;
  top: 0px;
  /* 调整到正确行位置 */
}

/* 调整小键盘容器 */
.numpad .keyboard {
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  /* 为绝对定位的子元素提供参照 */
  padding-bottom: 20px;
}

/* 移除不必要的空白键 */
.keyboard-row .key[style="visibility: hidden;"] {
  display: none;
}

.key.null-key {
  position: relative;
  background: none;
  border: none;
  box-shadow: none;
  min-width: 60px;
}

.progress-container {
  background: #eef2f7;
  border-radius: 10px;
  height: 20px;
  margin: 25px 0 15px;
  overflow: hidden;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
}

.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #3498db, #2ecc71);
  width: 0%;
  transition: width 0.5s ease;
  border-radius: 10px;
  position: relative;
}

.progress-text {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: white;
  font-size: 0.8rem;
  font-weight: bold;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.key-count {
  text-align: center;
  margin-top: 20px;
  font-size: 1.2rem;
  color: #5a6a7f;
}

.key-count span {
  font-weight: bold;
  color: #3498db;
  font-size: 1.4rem;
}


footer {
  background: white;
  border-radius: 15px;
  padding: 20px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.06);
}

.footer-content {
  display: flex;
  gap: 25px;
}

.footer-section {
  flex: 1;
}

.footer-section h3 {
  margin-bottom: 10px;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  gap: 10px;
}

.footer-section p {
  margin-bottom: 10px;
  font-size: 15px;
  opacity: 0.85;
}

.features {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-top: 15px;
}

.feature {
  background: #f8f9fa;
  border-radius: 10px;
  padding: 20px;
  flex: 1 0 calc(50% - 20px);
  display: flex;
  align-items: center;
  transition: all 0.3s ease;
  border: 1px solid #eef2f7;
}

.feature:hover {
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
}

.feature-icon {
  font-size: 1.8rem;
  margin-right: 15px;
  min-width: 40px;
  text-align: center;
}

.copyright {
  text-align: center;
  margin-top: 20px;
  padding-top: 15px;
  border-top: 1px solid #eee;
  color: #7f8c8d;
  font-size: 0.9rem;
}

.copyright a {
  color: #3498db;
  text-decoration: none;
  font-weight: 500;
}

.copyright a:hover {
  text-decoration: underline;
}

.highlight {
  background-color: #3498db;
  color: white;
  padding: 2px 8px;
  border-radius: 5px;
  font-weight: 500;
}

.test-button {
  background: linear-gradient(135deg, #2ecc71 0%, #27ae60 100%);
  color: white;
  border: none;
  padding: 14px 35px;
  font-size: 1.1rem;
  border-radius: 50px;
  cursor: pointer;
  font-weight: 600;
  box-shadow: 0 5px 15px rgba(46, 204, 113, 0.4);
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.test-button:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(46, 204, 113, 0.6);
}

.tooltip {
  position: relative;
  display: inline-block;
}

.tooltip .tooltiptext {
  visibility: hidden;
  width: 140px;
  background-color: #2c3e50;
  color: #fff;
  text-align: center;
  border-radius: 6px;
  padding: 8px;
  position: absolute;
  z-index: 1;
  bottom: 125%;
  left: 50%;
  transform: translateX(-50%);
  opacity: 0;
  transition: opacity 0.3s;
  font-size: 0.9rem;
}

.tooltip .tooltiptext::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  margin-left: -5px;
  border-width: 5px;
  border-style: solid;
  border-color: #2c3e50 transparent transparent transparent;
}

.tooltip:hover .tooltiptext {
  visibility: visible;
  opacity: 1;
}
