/* 全局变量（深夜星空版） */
:root {
    --bg-color: #0f172a;
    --card-bg: rgba(255, 255, 255, 0.08);
    --card-dark: rgba(15, 25, 40, 0.85);
    --text-white: #a7afc4;
    --text-light: #b878c2;
    --text-dark: #94a3b8;
    --highlight-pink: #f867ca;
    --highlight-blue: #7dd3fc;
    --border-radius: 14px;
    --blur: 12px;
}

/* 深色模式
.dark-mode {
    --bg-color: #020617;
    --card-bg: rgba(255, 255, 255, 0.06);
    --card-dark: rgba(2, 6, 23, 0.9);
    --text-white: #f1f5f9;
    --text-light: #e2e8f0;
    --text-dark: #94a3b8;
}

/* 深色模式 */
/* .dark-mode {
    --bg-color: #1a2a3a;
    --card-bg: rgba(30, 50, 70, 0.8);
    --card-dark: rgba(20, 30, 45, 0.9);
    --text-white: #e0e0e0;
    --text-light: #cccccc;
    --text-dark: #a0d8ff;
} */ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Microsoft YaHei", "Segoe UI", sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-white);
    min-height: 100vh;
    overflow-x: hidden;
    padding-bottom: 150px;
    transition: background-color 0.3s;
}

/* ============== 实时信息模块样式 ==============
.real-time-info {
  display: flex;
  flex-wrap: wrap;
  gap: 30px;
  padding: 20px;
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  margin: 20px 0;
}
.info-item {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.info-label {
  font-size: 14px;
  color: var(--text-secondary);
}
.info-value {
  font-size: 20px;
  font-weight: 600;
  color: var(--primary-color);
} */

/* 手机端适配 */
/* @media (max-width: 767px) {
  .real-time-info {
    gap: 15px;
  }`
  .info-value {
    font-size: 18px;
  }
} */
/* ============== 实时信息模块样式 结束 ============== */

/* FPS计数器
.fps-counter {
    position: fixed;
    top: 10px;
    left: 10px;
    font-size: 14px;
    font-weight: bold;
    z-index: 100;
} */

/* 灯笼样式
.lantern {
    position: fixed;
    top: 10px;
    z-index: 99;
    animation: lantern-swing 3s ease-in-out infinite alternate;
}

.lantern-left {
    left: 20px;
}

.lantern-right {
    right: 20px;
    animation-delay: 0.5s;
}

.lantern-body {
    width: 80px;
    height: 100px;
    background: #d82020;
    border-radius: 50%/30%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    box-shadow: 0 0 30px rgba(255, 180, 0, 0.8);
    position: relative;
}

.lantern-body span {
    color: #ffdd00;
    font-size: 28px;
    font-weight: bold;
}

.lantern-tassel {
    width: 4px;
    height: 40px;
    background: #ffdd00;
    margin: 0 auto;
}

@keyframes lantern-swing {
    0% { transform: rotate(-3deg); }
    100% { transform: rotate(3deg); }
} */

/* 侧边栏样式 */
.sidebar {
    position: fixed;
    left: 100px;
    top: 50%;
    transform: translateY(-50%);
    width: 300px;
    display: flex;
    flex-direction: column;
    gap: 40px;
    z-index: 90;
}

.avatar {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    overflow: hidden;
    border: 4px solid #fff;
    margin: 0 auto;
}

.avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hello-btn {
    background: var(--card-bg);
    backdrop-filter: blur(var(--blur));
    padding: 10px 20px;
    border-radius: var(--border-radius);
    text-align: center;
    font-size: 18px;
    font-weight: bold;
}

.tag-group {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    background: var(--card-bg);
    backdrop-filter: blur(var(--blur));
    padding: 15px;
    border-radius: var(--border-radius);
}

.tag {
    background: rgba(255,255,255,0.2);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 14px;
}

/* 主内容区样式 */
.main-content {
    margin-left: 350px;
    padding: 40px 30px;
    max-width: 1400px;
    text-align: center; /* 所有文字默认居中 */
    display: flex;
    flex-direction: column;
    align-items: center; /* 所有子元素强制居中对齐 */
}

/* 天气卡片 */
.weather-card {
    background: var(--card-bg);
    backdrop-filter: blur(var(--blur));
    padding: 8px 15px;
    border-radius: 20px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
    margin-bottom: 30px;
}

.hero-title {
    font-size: 50px;
    margin-bottom: 20px;
}

.title-highlight {
    color: var(--highlight-pink);
}

.hero-desc {
    font-size: 20px;
    line-height: 1.6;
    margin-bottom: 15px;
}

.text-highlight {
    color: var(--highlight-blue);
    font-weight: bold;
}

.hero-quote-en {
    font-size: 18px;
    line-height: 1.8;
    color: var(--text-light);
    margin-bottom: 15px;
}

.text-dark {
    background: var(--card-dark);
    padding: 2px 8px;
    border-radius: 6px;
}

.hero-quote-zh {
    font-size: 22px;
    color: var(--highlight-blue);
    margin-bottom: 20px;
}

/* 信息组 */
.info-group {
    font-size: 18px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 20px;
}

.info-more {
    cursor: pointer;
}

/* 社交图标组 */
.social-group {
    display: flex;
    gap: 15px;
    align-items: center;
    margin-top: 10px;
}

.social-icon {
    width: 40px;
    height: 40px;
    background: var(--card-bg);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 18px;
    text-decoration: none;
    transition: all 0.3s;
}

.social-icon:hover {
    transform: translateY(-3px);
    background: rgba(255,255,255,0.3);
}

/* 深色模式开关
.toggle-switch {
    position: relative;
    width: 50px;
    height: 25px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-switch label {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 25px;
}

.toggle-switch label:before {
    position: absolute;
    content: "";
    height: 17px;
    width: 17px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + label {
    background-color: var(--highlight-pink);
}

input:checked + label:before {
    transform: translateX(25px);
}

翻页时钟
.clock-container {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 80;
}

.clock-card {
    width: 80px;
    height: 120px;
    background: var(--card-dark);
    backdrop-filter: blur(var(--blur));
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 70px;
    font-weight: bold;
}

.clock-colon {
    font-size: 50px;
    animation: blink 1s infinite;
}

@keyframes blink {
    0%,100%{opacity:1;}50%{opacity:0.3;}
}

/* 音乐播放器
.music-player {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 500px;
    background: var(--card-bg);
    backdrop-filter: blur(var(--blur));
    padding: 20px;
    border-radius: var(--border-radius);
    display: flex;
    gap: 15px;
    z-index: 80;
}

.music-cover {
    width: 100px;
    height: 100px;
    border-radius: 8px;
    overflow: hidden;
}

.music-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.music-info {
    flex:1;
}

.music-title {
    font-size: 16px;
    margin-bottom: 5px;
}

.music-author {
    font-size: 14px;
    opacity: 0.8;
    margin-bottom: 3px;
}

.music-lyric {
    font-size: 12px;
    opacity: 0.6;
    margin-bottom: 8px;
}

.music-progress {
    position: relative;
    width: 100%;
    height: 4px;
    background: rgba(255,255,255,0.2);
    border-radius: 4px;
    margin-top: 5px;
}

.progress-bar {
    width: 0%;
    height: 100%;
    background: var(--highlight-pink);
    border-radius: 4px;
}

.time-current {
    position: absolute;
    left: 0;
    top: 10px;
    font-size: 12px;
}

.time-total {
    position: absolute;
    right: 0;
    top: 10px;
    font-size: 12px;
}

.music-controls {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.control-btn {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    border: none;
    color: #fff;
    cursor: pointer;
    transition: all 0.3s;
}

.control-btn:hover {
    background: rgba(255,255,255,0.3);
} */

/* 深夜星空背景 */
body {
    background-color: var(--bg-color);
    background-image:
        radial-gradient(1px 1px at 25% 35%, #ffffff, transparent),
        radial-gradient(1.5px 1.5px at 45% 75%, #ffffff, transparent),
        radial-gradient(1px 1px at 75% 25%, #ffffff, transparent),
        radial-gradient(2px 2px at 85% 65%, #ffffff, transparent),
        radial-gradient(0.8px 0.8px at 15% 85%, #ffffff, transparent);
    background-size: 2000px 2000px;
    animation: starsMove 40s linear infinite;
    position: relative;
}

/* 云朵飘动效果 */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 200%;
    height: 100%;
    background-image:
        url("https://picsum.photos/id/928/1200/300"),
        url("https://picsum.photos/id/929/1500/350");
    background-repeat: repeat-x;
    background-position: 0 8%, 0 85%;
    background-size: 1200px auto, 1500px auto;
    opacity: 0.05;
    z-index: -1;
    animation: cloudMove 100s linear infinite;
    pointer-events: none;
}

/* 星空动画 */
@keyframes starsMove {
    0% { background-position: 0 0; }
    100% { background-position: -2000px -2000px; }
}

/* 云朵动画 */
@keyframes cloudMove {
    0% { background-position: 0 8%, 0 85%; }
    100% { background-position: 2000px 8%, -1500px 85%; }
}

/* 卡片悬浮动画 */
.nav-card, .project-card, .tag {
    transition: all 0.3s ease-out;
}
.nav-card:hover, .project-card:hover {
    transform: translateY(-6px);
    background: rgba(255,255,255,0.12);
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}
.tag:hover {
    background: rgba(255,255,255,0.3);
    transform: translateY(-2px);
}

/* 移动端适配 */
@media screen and (max-width: 768px) {
    .sidebar {
        position: relative;
        left: 0;
        top: 0;
        transform: none;
        width: 100%;
        margin-bottom: 30px;
        padding: 0 20px;
    }
    .main-content {
        margin-left: 0;
        padding: 20px;
    }
    .hero-title {
        font-size: 36px;
    }
    .clock-container {
        position: relative;
        bottom: 0;
        left: 0;
        transform: none;
        margin: 30px auto;
        justify-content: center;
    }
    .clock-card {
        width: 50px;
        height: 80px;
        font-size: 40px;
    }
    .music-player {
        position: relative;
        bottom: 0;
        right: 0;
        width: 100%;
        margin-top: 30px;
        flex-wrap: wrap;
    }
    .lantern {
        display: none;
    }
    .fps-counter {
        display: none;
    }
}

/* 沙滩贝壳文案 - 居中排版+放大字体+动画 */
.beach-quote {
  margin: 50px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  line-height: 1.9;
  width: 100%;
}

.beach-quote .quote-line {
  opacity: 0;
  transform: translateY(10px);
  animation: quoteFadeIn 0.9s ease-out forwards;
  text-shadow: 0 0 12px rgba(255, 255, 255, 0.25);
}

/* 逐行出现动画延迟+放大字体 */
.beach-quote .line-1 { 
  animation-delay: 0.7s; 
  font-size: 21px; /* 从18px放大到21px */
  color: var(--text-light);
  text-align: center;
  max-width: 900px;
}
.beach-quote .line-2 { 
  animation-delay: 1.8s; 
  font-size: 20px; /* 从17px放大到20px */
  color: var(--text-white);
}
.beach-quote .line-3 { 
  animation-delay: 2.9s; 
  font-size: 20px; /* 从17px放大到20px */
  color: var(--text-white);
}
.beach-quote .line-4 { 
  animation-delay: 4.0s; 
  font-size: 20px; /* 从17px放大到20px */
  color: var(--text-white);
}
.beach-quote .line-5 { 
  animation-delay: 5.1s; 
  font-size: 28px; /* 从22px放大到28px，重点突出 */
  font-weight: 500;
  color: var(--highlight-pink);
  text-shadow: 0 0 18px rgba(244, 114, 182, 0.6);
  margin-top: 10px;
}

/* 浮现动画 */
@keyframes quoteFadeIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 移动端适配，手机上字体同步适配 */
@media screen and (max-width: 768px) {
  .beach-quote .line-1 {
    font-size: 18px;
    padding: 0 20px;
  }
  .beach-quote .line-2,
  .beach-quote .line-3,
  .beach-quote .line-4 {
    font-size: 17px;
  }
  .beach-quote .line-5 {
    font-size: 24px;
  }
}

/* 天气模块核心样式 - 深色毛玻璃适配 */
.weather-card {
  width: 320px;
  padding: 20px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #ffffff;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  box-sizing: border-box;
}

/* 加载&错误状态 */
.weather-loading, .weather-error {
  text-align: center;
  padding: 30px 0;
  opacity: 0.8;
  font-size: 14px;
}

/* 实时天气头部 */
.weather-now {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.weather-city {
  font-size: 18px;
  font-weight: 500;
  margin-bottom: 8px;
}

.weather-temp {
  font-size: 36px;
  font-weight: 600;
  line-height: 1;
  margin-bottom: 4px;
}

.weather-desc {
  font-size: 14px;
  opacity: 0.8;
}

.weather-icon img {
  width: 60px;
  height: 60px;
}

/* 详情信息栏 */
.weather-detail {
  display: flex;
  justify-content: space-around;
  padding: 12px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  margin-bottom: 16px;
}

.detail-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.detail-label {
  font-size: 12px;
  opacity: 0.7;
}

.detail-value {
  font-size: 14px;
  font-weight: 500;
}

/* 未来预报栏 */
.weather-forecast {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.forecast-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 8px 0;
  border-radius: 8px;
  transition: background 0.2s;
}

.forecast-item:hover {
  background: rgba(255, 255, 255, 0.05);
}

.forecast-date {
  font-size: 12px;
  opacity: 0.7;
}

.forecast-icon img {
  width: 36px;
  height: 36px;
}

.forecast-temp {
  font-size: 12px;
  display: flex;
  gap: 4px;
}

.temp-max {
  font-weight: 500;
}

.temp-min {
  opacity: 0.6;
}