:root {
  --bg1: #070b1a;
  --bg2: #0f1633;
  --panel: rgba(14, 23, 54, 0.62);
  --line: rgba(132, 168, 255, 0.25);
  --text: #e6eeff;
  --sub: #adc1ea;
  --brand: #7da8ff;
  --brand-soft: rgba(125, 168, 255, 0.18);
}

/* ============ Reset & Base ============ */
* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans SC", sans-serif;
  background: radial-gradient(circle at 18% 12%, #1f2f67 0%, transparent 28%),
              radial-gradient(circle at 86% 18%, #313887 0%, transparent 20%),
              linear-gradient(160deg, var(--bg1) 0%, var(--bg2) 100%);
  overflow-x: hidden;
  line-height: 1.6;
}

/* ============ Scrollbar ============ */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: var(--bg1);
}

::-webkit-scrollbar-thumb {
  background: rgba(132, 168, 255, 0.3);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(132, 168, 255, 0.5);
}

/* ============ Background effects ============ */
.stars,
.nebula {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.stars::before,
.stars::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(2px 2px at 20px 30px, #ffffffcc 60%, transparent 61%),
                    radial-gradient(1.5px 1.5px at 140px 80px, #d8e6ffcc 60%, transparent 61%),
                    radial-gradient(1.8px 1.8px at 260px 170px, #ffffffaa 60%, transparent 61%),
                    radial-gradient(1.2px 1.2px at 380px 50px, #d5e7ffcc 60%, transparent 61%);
  background-size: 420px 240px;
  animation: twinkle 7s linear infinite;
}

.stars::after {
  opacity: 0.5;
  transform: scale(1.15);
  animation-duration: 11s;
}

.nebula {
  background: radial-gradient(circle at 70% 72%, rgba(124, 95, 255, 0.16) 0%, transparent 32%),
              radial-gradient(circle at 26% 64%, rgba(60, 128, 255, 0.2) 0%, transparent 35%);
}

@keyframes twinkle {
  0%   { opacity: 0.78; transform: translateY(0); }
  50%  { opacity: 1; }
  100% { opacity: 0.8;  transform: translateY(-14px); }
}

/* ============ 七星连珠 ============ */
.seven-stars {
  position: fixed;
  z-index: 3;
  pointer-events: none;
  top: 4%;
  right: 2%;
  width: min(560px, 58vw);
  animation: constellationFloat 18s ease-in-out infinite;
}

.seven-stars svg {
  width: 100%;
  height: auto;
  filter: drop-shadow(0 0 8px rgba(140, 180, 255, 0.5));
}

/* 连线 —— 流光跑动 */
.star-line {
  fill: none;
  stroke: rgba(180, 215, 255, 0.55);
  stroke-width: 2.2;
  stroke-dasharray: 8 14;
  stroke-linejoin: round;
  animation: flowDash 3.5s linear infinite;
  filter: drop-shadow(0 0 4px rgba(180, 215, 255, 0.5));
}

@keyframes flowDash {
  to { stroke-dashoffset: -22; }
}

/* 星点光晕 —— 各自闪烁 */
.star-dot {
  animation: starPulse 3s ease-in-out infinite;
}
.star-dot.s1 { animation-delay: 0s; }
.star-dot.s2 { animation-delay: 0.5s; }
.star-dot.s3 { animation-delay: 1.2s; }
.star-dot.s4 { animation-delay: 0.3s; }
.star-dot.s5 { animation-delay: 0.9s; }
.star-dot.s6 { animation-delay: 1.7s; }
.star-dot.s7 { animation-delay: 0.6s; }

.star-core {
  animation: starPulse 3s ease-in-out infinite;
}
.star-core.s1 { animation-delay: 0s; }
.star-core.s2 { animation-delay: 0.5s; }
.star-core.s3 { animation-delay: 1.2s; }
.star-core.s4 { animation-delay: 0.3s; }
.star-core.s5 { animation-delay: 0.9s; }
.star-core.s6 { animation-delay: 1.7s; }
.star-core.s7 { animation-delay: 0.6s; }

@keyframes starPulse {
  0%, 100% { opacity: 0.55; transform: scale(1); }
  50%      { opacity: 1;     transform: scale(1.65); }
}

@keyframes constellationFloat {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  25%      { transform: translate(-12px, -18px) rotate(2deg); }
  50%      { transform: translate(14px, 8px) rotate(-1.5deg); }
  75%      { transform: translate(-6px, -14px) rotate(0.8deg); }
}

/* ============ 太极图 ============ */
.taiji-wrap {
  position: fixed;
  z-index: 3;
  pointer-events: none;
  top: 6%;
  left: 2%;
  width: min(130px, 15vw);
  animation: taijiRotate 26s linear infinite, taijiBreathe 8s ease-in-out infinite;
  filter: drop-shadow(0 0 14px rgba(120, 170, 240, 0.5));
}

.taiji-wrap img {
  width: 100%;
  height: auto;
  display: block;
}

@keyframes taijiRotate {
  to { transform: rotate(360deg); }
}

@keyframes taijiBreathe {
  0%, 100% { opacity: 0.35; }
  50%      { opacity: 0.7; }
}

/* ============ Entrance animation ============ */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(28px); }
  to   { opacity: 1; transform: translateY(0); }
}

#banner          { animation: fadeInUp 0.7s ease both; }
nav              { animation: fadeInUp 0.7s 0.1s ease both; }
#main            { animation: fadeInUp 0.7s 0.2s ease both; }
#luxing          { animation: fadeInUp 0.7s 0.3s ease both; }
.footer          { animation: fadeInUp 0.7s 0.4s ease both; }

/* ============ Layout ============ */
#bigbox {
  position: relative;
  z-index: 1;
  width: min(1140px, 92vw);
  margin: 26px auto 36px;
}

/* ============ Panel ============ */
.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 14px 34px rgba(2, 10, 35, 0.42);
  transition: border-color 0.3s ease;
}

.panel:hover {
  border-color: rgba(132, 168, 255, 0.42);
}

/* ============ Banner ============ */
#banner {
  padding: 40px 34px 34px;
  text-align: center;
}

#banner h1 {
  margin: 0 0 12px;
  font-size: 40px;
  font-weight: 700;
  letter-spacing: 3px;
  background: linear-gradient(135deg, #e6eeff 0%, #b0cbff 50%, #d6e4ff 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

#banner p {
  margin: 0;
  color: var(--sub);
  font-size: 17px;
  letter-spacing: 0.5px;
}

/* ============ Navigation ============ */
nav {
  margin-top: 14px;
  padding: 0 16px;
  display: flex;
  gap: 8px;
  height: 66px;
  align-items: center;
}

nav a {
  text-decoration: none;
  color: #dce8ff;
  padding: 10px 20px;
  border-radius: 10px;
  border: 1px solid transparent;
  font-size: 15px;
  transition: all 0.28s ease;
  position: relative;
}

nav a:hover,
nav a.dangqian {
  border-color: rgba(138, 177, 255, 0.45);
  background: linear-gradient(135deg, rgba(78, 121, 255, 0.28), rgba(113, 84, 255, 0.22));
  box-shadow: 0 8px 18px rgba(38, 80, 202, 0.3);
  transform: translateY(-1px);
}

/* ============ Main content ============ */
#main {
  margin-top: 14px;
  display: grid;
  grid-template-columns: 330px 1fr;
  gap: 14px;
}

#main_left,
#main_right,
#luxing,
footer {
  padding: 24px;
}

h2 {
  margin: 0 0 16px;
  font-size: 22px;
  font-weight: 600;
  color: #eaf1ff;
  letter-spacing: 1px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(132, 168, 255, 0.16);
}

/* ============ About me ============ */
.avatar-wrap {
  text-align: center;
  margin-bottom: 14px;
}

#main_left img {
  width: 170px;
  height: 170px;
  object-fit: cover;
  border-radius: 50%;
  border: 2px solid rgba(169, 194, 255, 0.58);
  box-shadow: 0 10px 26px rgba(52, 86, 187, 0.42);
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}

#main_left img:hover {
  transform: scale(1.04);
  box-shadow: 0 14px 32px rgba(78, 121, 255, 0.48);
}

#main_left p,
#main_right p {
  color: var(--sub);
  line-height: 2;
  font-size: 15px;
}

#main_left span {
  color: #e4edff;
  font-weight: 500;
}

/* ============ Love life ============ */
#main_right p {
  padding: 6px 0;
  border-left: 2px solid transparent;
  padding-left: 14px;
  margin: 2px 0;
  transition: border-color 0.3s ease, color 0.3s ease;
}

#main_right p:hover {
  border-left-color: var(--brand);
  color: #d6e4ff;
}

#main_right img {
  width: 100%;
  border-radius: 12px;
  margin-top: 14px;
  border: 1px solid rgba(149, 181, 255, 0.34);
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}

#main_right img:hover {
  transform: scale(1.01);
  box-shadow: 0 10px 28px rgba(52, 86, 187, 0.32);
}

/* ============ Travel ============ */
#luxing {
  margin-top: 14px;
}

.travel-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.picture {
  border: 1px solid rgba(145, 175, 255, 0.3);
  border-radius: 12px;
  overflow: hidden;
  background: rgba(8, 15, 39, 0.62);
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
  cursor: default;
}

.picture:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 28px rgba(38, 80, 202, 0.34);
  border-color: rgba(145, 175, 255, 0.55);
}

.picture img {
  width: 100%;
  height: 170px;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.picture:hover img {
  transform: scale(1.06);
}

.picture p {
  margin: 0;
  padding: 12px 8px;
  color: #d6e4ff;
  text-align: center;
  font-size: 14px;
  letter-spacing: 0.5px;
}

/* ============ Footer ============ */
.footer {
  margin-top: 14px;
  text-align: center;
  padding: 18px 24px;
}

.footer p {
  margin: 0;
  font-size: 14px;
}

.footer a {
  color: #d7e6ff;
  text-decoration: none;
  transition: color 0.25s ease;
}

.footer a:hover {
  color: #8db4ff;
}

/* ============ 短文页 ============ */
.post {
  padding: 20px 0;
  border-bottom: 1px solid rgba(132, 168, 255, 0.1);
}

.post:last-child {
  border-bottom: none;
}

.post h2 {
  font-size: 20px;
  margin-bottom: 6px;
  border-bottom: none;
  padding-bottom: 0;
}

.post time {
  display: inline-block;
  font-size: 13px;
  color: rgba(173, 193, 234, 0.55);
  margin-bottom: 10px;
  letter-spacing: 0.5px;
}

.post p {
  margin: 6px 0;
  color: var(--sub);
  line-height: 1.9;
  padding-left: 0;
  border-left: none;
}

/* ============ 日志页 ============ */
.log-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.log-item {
  display: flex;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid rgba(132, 168, 255, 0.08);
  transition: background 0.25s ease;
}

.log-item:last-child {
  border-bottom: none;
}

.log-item:hover {
  background: rgba(125, 168, 255, 0.04);
  margin: 0 -12px;
  padding-left: 12px;
  padding-right: 12px;
  border-radius: 6px;
}

.log-date {
  flex-shrink: 0;
  font-size: 14px;
  color: var(--brand);
  font-weight: 500;
  letter-spacing: 0.5px;
  min-width: 90px;
}

.log-content {
  color: var(--sub);
  font-size: 15px;
  line-height: 1.7;
}

/* ============ 留言板 ============ */
.msg-list {
  margin-bottom: 28px;
}

.msg-item {
  padding: 14px 0;
  border-bottom: 1px solid rgba(132, 168, 255, 0.08);
}

.msg-item:last-child {
  border-bottom: none;
}

.msg-meta {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 6px;
}

.msg-author {
  font-size: 15px;
  font-weight: 600;
  color: #eaf1ff;
}

.msg-time {
  font-size: 12px;
  color: rgba(173, 193, 234, 0.45);
}

.msg-text {
  margin: 4px 0 0;
  color: var(--sub);
  font-size: 15px;
  line-height: 1.7;
  border-left: none;
  padding-left: 0;
}

/* 留言表单 */
.msg-form {
  border-top: 1px solid rgba(132, 168, 255, 0.14);
  padding-top: 20px;
}

.msg-form h3 {
  margin: 0 0 14px;
  font-size: 17px;
  color: #eaf1ff;
  font-weight: 500;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 10px;
}

.msg-form input,
.msg-form textarea {
  width: 100%;
  padding: 11px 14px;
  border-radius: 8px;
  border: 1px solid rgba(132, 168, 255, 0.22);
  background: rgba(8, 15, 39, 0.5);
  color: #eaf1ff;
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
  resize: vertical;
}

.msg-form input::placeholder,
.msg-form textarea::placeholder {
  color: rgba(173, 193, 234, 0.35);
}

.msg-form input:focus,
.msg-form textarea:focus {
  border-color: rgba(138, 177, 255, 0.55);
  box-shadow: 0 0 0 3px rgba(125, 168, 255, 0.1);
}

.msg-form textarea {
  margin-bottom: 12px;
}

.msg-form button {
  padding: 10px 28px;
  border-radius: 8px;
  border: 1px solid rgba(138, 177, 255, 0.4);
  background: linear-gradient(135deg, rgba(78, 121, 255, 0.32), rgba(113, 84, 255, 0.25));
  color: #eaf1ff;
  font-size: 15px;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.25s ease;
}

.msg-form button:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(38, 80, 202, 0.3);
  border-color: rgba(138, 177, 255, 0.6);
}

/* ============ Responsive ============ */
@media (max-width: 980px) {
  #main {
    grid-template-columns: 1fr;
  }
  .travel-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  #banner h1 {
    font-size: 32px;
    letter-spacing: 2px;
  }
  #banner p {
    font-size: 15px;
  }
}

@media (max-width: 600px) {
  #banner h1 {
    font-size: 26px;
    letter-spacing: 1.5px;
  }
  #banner {
    padding: 28px 18px 24px;
  }
  nav {
    flex-wrap: wrap;
    height: auto;
    padding: 10px 12px;
    gap: 6px;
  }
  nav a {
    padding: 8px 14px;
    font-size: 14px;
  }
  .travel-grid {
    grid-template-columns: 1fr;
  }
  #main_left,
  #main_right,
  #luxing,
  footer {
    padding: 18px;
  }
  #banner h1 {
    font-size: 28px;
  }
}
