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

body {
  min-height: 100vh;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
  font-family: -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
}

.container {
  max-width: 500px;
  width: 100%;
  text-align: center;
}

/* ===== 猫咪 ===== */
.cat-area {
  position: relative;
  margin-bottom: 30px;
}

.cat {
  position: relative;
  width: 140px;
  height: 120px;
  margin: 0 auto 10px;
  animation: catBounce 3s ease-in-out infinite;
}

@keyframes catBounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.cat-body {
  position: relative;
  width: 100px;
  height: 80px;
  background: #f5a623;
  border-radius: 50% 50% 45% 45%;
  margin: 20px auto 0;
}

/* 耳朵 */
.cat-ear {
  position: absolute;
  top: -18px;
  width: 30px;
  height: 30px;
  background: #f5a623;
  border-radius: 50% 50% 0 0;
  z-index: -1;
}
.cat-ear.left { left: 12px; transform: rotate(-15deg); }
.cat-ear.right { right: 12px; transform: rotate(15deg); }
.cat-ear::after {
  content: '';
  position: absolute;
  top: 5px;
  left: 5px;
  width: 20px;
  height: 20px;
  background: #f7c873;
  border-radius: 50% 50% 0 0;
}

/* 脸 */
.cat-face {
  position: absolute;
  top: 8px;
  left: 10px;
  width: 80px;
  height: 60px;
}

/* 眼睛 */
.cat-eye {
  position: absolute;
  top: 10px;
  width: 22px;
  height: 24px;
  background: #fff;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: all 0.3s;
}
.cat-eye.left { left: 6px; }
.cat-eye.right { right: 6px; }

.pupil {
  width: 10px;
  height: 14px;
  background: #2d2d2d;
  border-radius: 50%;
  transition: all 0.3s;
}

/* 猫咪眨眼动画 */
.cat.blink .cat-eye {
  height: 4px;
  margin-top: 10px;
}
.cat.blink .pupil { height: 0; }

/* 鼻子 */
.cat-nose {
  position: absolute;
  top: 30px;
  left: 50%;
  transform: translateX(-50%);
  width: 8px;
  height: 6px;
  background: #e88d8d;
  border-radius: 50%;
}

/* 嘴巴 */
.cat-mouth {
  position: absolute;
  top: 36px;
  left: 50%;
  transform: translateX(-50%);
  width: 16px;
  height: 8px;
  border-bottom: 2px solid #8b5e3c;
  border-radius: 0 0 50% 50%;
}

/* 尾巴 */
.cat-tail {
  position: absolute;
  bottom: 5px;
  right: -20px;
  width: 40px;
  height: 12px;
  background: #f5a623;
  border-radius: 0 50% 50% 0;
  transform-origin: left center;
  animation: tailWag 1.5s ease-in-out infinite;
}

@keyframes tailWag {
  0%, 100% { transform: rotate(0deg); }
  25% { transform: rotate(15deg); }
  75% { transform: rotate(-10deg); }
}

/* ===== 对话框 ===== */
.speech-bubble {
  background: rgba(255,255,255,0.12);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 20px;
  padding: 20px 24px;
  color: #e0e0e0;
  font-size: 16px;
  line-height: 1.7;
  min-height: 80px;
  position: relative;
  transition: all 0.4s;
}
.speech-bubble::before {
  content: '';
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 10px solid transparent;
  border-right: 10px solid transparent;
  border-bottom: 10px solid rgba(255,255,255,0.12);
}

/* 猫咪兴奋跳跳 */
.cat.excited {
  animation: catJump 0.5s ease-in-out 3;
}
@keyframes catJump {
  0%, 100% { transform: translateY(0) scale(1); }
  30% { transform: translateY(-30px) scale(1.1); }
  60% { transform: translateY(-15px) scale(0.95); }
}

/* ===== 输入区 ===== */
.input-area {
  background: rgba(255,255,255,0.06);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 20px;
  padding: 24px;
  margin-bottom: 20px;
}

.input-group {
  margin-bottom: 16px;
  text-align: left;
}

.input-group label {
  display: block;
  color: #b0b0d0;
  font-size: 14px;
  margin-bottom: 6px;
}

input[type="date"], select {
  width: 100%;
  padding: 12px 14px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 12px;
  color: #e0e0e0;
  font-size: 15px;
  outline: none;
  transition: border 0.3s;
}
input[type="date"]:focus, select:focus {
  border-color: #f5a623;
}
input[type="date"]::-webkit-calendar-picker-indicator {
  filter: invert(0.8);
}

button {
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, #f5a623, #e88d1a);
  border: none;
  border-radius: 14px;
  color: #1a1a2e;
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}
button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(245,166,35,0.4);
}
button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* ===== 历史记录 ===== */
.history {
  margin-top: 20px;
  text-align: left;
}
.history-item {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px;
  padding: 12px 16px;
  margin-bottom: 10px;
  color: #a0a0c0;
  font-size: 13px;
  line-height: 1.6;
}
.history-item .h-date {
  color: #f5a623;
  font-weight: 600;
}
.history-item .h-mood {
  color: #7ec8e3;
}

/* ===== 加载动画 ===== */
.loading-dots::after {
  content: '';
  animation: dots 1.2s steps(4, end) infinite;
}
@keyframes dots {
  0% { content: ''; }
  25% { content: '.'; }
  50% { content: '..'; }
  75% { content: '...'; }
}

/* ===== 星星背景 ===== */
body::before {
  content: '';
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background-image:
    radial-gradient(1px 1px at 10% 20%, rgba(255,255,255,0.4), transparent),
    radial-gradient(1px 1px at 30% 60%, rgba(255,255,255,0.3), transparent),
    radial-gradient(1.5px 1.5px at 50% 10%, rgba(255,255,255,0.5), transparent),
    radial-gradient(1px 1px at 70% 40%, rgba(255,255,255,0.3), transparent),
    radial-gradient(1.5px 1.5px at 90% 80%, rgba(255,255,255,0.4), transparent),
    radial-gradient(1px 1px at 20% 90%, rgba(255,255,255,0.3), transparent),
    radial-gradient(1px 1px at 80% 15%, rgba(255,255,255,0.2), transparent),
    radial-gradient(1.5px 1.5px at 45% 75%, rgba(255,255,255,0.4), transparent);
  pointer-events: none;
  z-index: -1;
}
