:root {
  --primary-color: #3a7bd5;
  --secondary-color: #00d2ff;
  --accent-color: #ff9900;
  --bg-color: #f5f9fc;
  --card-color: #ffffff;
  --text-color: #333333;
  --border-radius: 12px;
  --shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}


.tooltip-icon {
  position: relative;
  cursor: help;
  color: var(--text-color);
  margin-left: 5px;
  display: inline-block;
}

.tooltip-icon::after {
  content: attr(data-tooltip);
  position: absolute;
  background: #666;
  color: white;
  border-radius: 4px;
  padding: 8px 12px;
  font-size: 0.9em;
  white-space: pre-wrap; /* 关键：允许自动换行 */
  word-break: break-word; /* 长单词自动断行 */
  max-width: 300px; /* 最大宽度限制 */
  min-width: 150px; /* 最小宽度保证可读性 */
  opacity: 0;
  transition: opacity 0.2s;
  z-index: 1000;
  text-align: center;
}

.tooltip-icon:hover::after {
  opacity: 1;
}

body {
  font-family: "Noto Sans SC", "Microsoft YaHei", sans-serif;
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
  margin: 0;
  padding: 0;
  color: var(--text-color);
  min-height: 100vh;
}

.container {
  max-width: 850px;
  margin: 40px auto;
  padding: 20px;
}

header {
  text-align: center;
  margin-bottom: 30px;
}

.header-icon {
  font-size: 40px;
  color: var(--primary-color);
  margin-bottom: 10px;
  background: linear-gradient(
    135deg,
    var(--primary-color),
    var(--secondary-color)
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

h1 {
  font-size: 2.2em;
  color: var(--primary-color);
  margin: 0;
  background: linear-gradient(
    135deg,
    var(--primary-color),
    var(--secondary-color)
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.card {
  background: var(--card-color);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  padding: 25px;
  margin-bottom: 30px;
  transition: all 0.3s ease;
}

form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.input-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

label {
  font-weight: 500;
  color: var(--primary-color);
  display: flex;
  align-items: center;
  gap: 8px;
}

input[type="number"] {
  padding: 12px 15px;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  font-size: 16px;
  transition: all 0.3s;
  background-color: #f9fafc;
}

input[type="number"]:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 2px rgba(58, 123, 213, 0.2);
}

.card button {
  background: linear-gradient(
    135deg,
    var(--primary-color),
    var(--secondary-color)
  );
  color: white;
  border: none;
  padding: 14px 20px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 16px;
  font-weight: 500;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.card button:hover {
  transform: translateY(-2px);
  box-shadow: 0 7px 14px rgba(58, 123, 213, 0.3);
}

#result {
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.5s ease;
}

#result.hidden {
  display: none;
}

#result:not(.hidden) {
  opacity: 1;
  transform: translateY(0);
}

.result-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
}

.result-icon {
  font-size: 24px;
  color: var(--accent-color);
}

h2 {
  margin: 0;
  color: var(--primary-color);
  font-size: 1.8em;
}

h3 {
  color: var(--primary-color);
  font-size: 1.3em;
  margin: 25px 0 15px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.current-stage,
.advice {
  margin: 20px 0;
}

.stage-box {
  padding: 15px;
  border-left: 4px solid var(--accent-color);
  background-color: rgba(242, 246, 252, 0.8);
  border-radius: 8px;
  transition: all 0.3s;
}

.stage-box:hover {
  transform: translateY(-2px);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.stage-name-wrapper {
  margin-bottom: 10px;
}

.stage-title {
  font-size: 1.2em;
  color: var(--primary-color);
  margin-bottom: 5px;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
}

.stage-name {
  font-size: 1.5em;
  font-weight: 700;
  color: var(--accent-color);
  padding: 5px 0;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
}

.description {
  margin: 0;
  line-height: 1.6;
  color: #555;
}

.stage-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.tag {
  padding: 5px 12px;
  border-radius: 6px;
  font-size: 0.9em;
  font-weight: 500;
  margin: 3px;
  transition: all 0.3s;
}

.magenta {
  background-color: #ffe6ee;
  color: #ff4081;
}

.cyan {
  background-color: #e6ffff;
  color: #00bcd4;
}

.orange {
  background-color: #fff3e6;
  color: #ff9800;
}

.green {
  background-color: #e6ffe6;
  color: #4caf50;
}

.future-stages {
  margin: 30px 0;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 15px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  border-radius: 8px;
  overflow: hidden;
}

th,
td {
  padding: 12px 15px;
  text-align: left;
  border-bottom: 1px solid #eaeaea;
}

th {
  background-color: #f7f9fc;
  font-weight: 600;
  color: var(--primary-color);
}

th i {
  margin-right: 5px;
}

tr:last-child td {
  border-bottom: none;
}

tr:nth-child(even) {
  background-color: #fbfbfd;
}

tr:hover {
  background-color: #f0f4fc;
}

.advice p {
  line-height: 1.7;
  margin: 0;
}

footer {
  text-align: center;
  margin-top: 40px;
  color: #888;
  font-size: 0.9em;
}

footer i {
  margin-right: 5px;
}

@media (max-width: 768px) {
  .container {
    margin: 20px auto;
    padding: 15px;
  }

  .card {
    padding: 20px;
  }

  table {
    display: block;
    overflow-x: auto;
  }
}

#annual-savings-display {
  margin: 15px 0;
  font-size: 1.1em;
  font-weight: bold;
}

.negative {
  color: #dc3545;
}

.v50 {
  text-align: center;
  padding: 20px;
  background-color: #fff;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.08);
  margin-top: 25px;
}
.appreciate-section {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.fa-heart {
  transition: color 0.3s, transform 0.3s;
  font-size: 2em;
  color: red;
  margin-bottom: 15px;
}
.fa-heart:hover {
  color: #e74c3c;
  transform: rotate(15deg);
}
.appreciate-img {
  width: 250px;
  height: 250px;
}
.appreciate-text {
  color: #333;
  font-weight: 500;
  font-size: 16px;
}
.v50 p {
  margin: 10px 0;
}
