/* 基础设置 */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", system-ui, sans-serif;
  background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('bg.jpg'); 
  background-size: cover; background-position: center; background-attachment: fixed;
  color: #ffffff; line-height: 1.2; -webkit-font-smoothing: antialiased;
}

.container { width: 100%; max-width: 1500px; margin: 0 auto; padding: 0 15px; }

/* 顶部导航 */
.site-header {
  position: sticky; top: 0; z-index: 100;
  backdrop-filter: blur(20px); background: rgba(0, 0, 0, 0.4); 
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.nav-container { display: flex; align-items: center; justify-content: space-between; padding: 14px 20px; }
.header-left { display: flex; align-items: center; gap: 15px; }

.logo { 
  font-weight: 600; font-size: 15px; letter-spacing: 0.1em; 
  color: #ffffff; text-decoration: none; 
}
.logo:hover { color: #ff5e5e; } /* 悬停变红提示刷新 */

.visitor-badge {
  display: flex; align-items: center; gap: 6px;
  background: rgba(255, 255, 255, 0.1); padding: 4px 10px;
  border-radius: 12px; font-size: 11px; border: 1px solid rgba(255, 255, 255, 0.1); color: #ccc;
}
.v-num { font-weight: 700; color: #fff; font-family: monospace; }

/* Hero 内容 */
.hero { padding: 40px 0 40px; }
.hero-content { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 15px; }
.hero-text { width: 100%; display: flex; flex-direction: column; align-items: center; }

/* --- 新增：正上方位置标签样式 --- */
.top-location {
  margin-bottom: 15px;
  font-size: 14px;
  letter-spacing: 2px;
  color: #ddd;
  background: rgba(255, 255, 255, 0.1);
  padding: 6px 18px;
  border-radius: 100px;
  backdrop-filter: blur(5px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  animation: fadeIn 2s ease; /* 增加一个淡入效果 */
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.hero-title-with-img { margin: 0; display: flex; justify-content: center; align-items: center; }
.name-as-image { 
  height: clamp(80px, 15vw, 145px); border-radius: 20px; 
  border: 2px solid rgba(255, 255, 255, 0.3); box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

/* 仪表盘样式 */
.clock-dashboard {
  margin: 30px 0; padding: 20px 40px; background: rgba(0, 0, 0, 0.4); 
  border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 32px;
  backdrop-filter: blur(10px); display: flex; flex-direction: column; align-items: center; gap: 8px;
}
.clock-date { font-family: monospace; font-size: 15px; color: #ccc; }
.beijing-clock { font-family: monospace; font-size: clamp(30px, 6vw, 42px); letter-spacing: 4px; }

.hero-avatar { margin-top: 10px; display: flex; justify-content: center; }
.avatar-image { max-width: 300px; border-radius: 12px; border: 1px solid rgba(255, 255, 255, 0.2); }

/* 指数 */
.indices-container { display: flex; justify-content: center; flex-wrap: wrap; gap: 15px; width: 100%; margin: 30px 0 20px; }
.index-card {
  background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 15px 20px; border-radius: 20px; backdrop-filter: blur(10px);
  flex: 1; max-width: 300px; min-width: 180px; text-align: center;
}
.index-name { font-size: 14px; color: #aaa; margin-bottom: 5px; }
.index-price { font-size: 20px; font-weight: 800; margin-bottom: 3px; }
.index-up { color: #ff5e5e; }
.index-down { color: #4ade80; }

/* 资产面板 */
.portfolio-dashboard {
  display: flex; flex-direction: column; align-items: center; gap: 20px;
  margin: 20px 0 40px; padding: 25px 60px;
  background: rgba(255, 255, 255, 0.08); border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 32px; backdrop-filter: blur(15px); box-shadow: 0 15px 40px rgba(0,0,0,0.3);
}
.portfolio-title { font-size: 20px; font-weight: 600; letter-spacing: 2px; color: #e0e0e0; padding-bottom: 10px; border-bottom: 1px solid rgba(255,255,255,0.1); width: 100%; text-align: center; }
.portfolio-row { display: flex; justify-content: center; align-items: center; gap: 60px; width: 100%; }
.portfolio-item { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.p-label { font-size: 14px; color: #bbb; letter-spacing: 1px; }
.p-value { font-family: "Courier New", monospace; font-size: clamp(24px, 5vw, 36px); font-weight: 800; color: #fff; }

/* 股票列表 */
.stocks-container { display: flex; flex-direction: row; flex-wrap: wrap; justify-content: center; gap: 20px; width: 100%; margin-top: 20px; }
.stock-widget {
  width: calc(33.333% - 15px); min-width: 250px; padding: 24px; border-radius: 28px;
  background: rgba(0, 0, 0, 0.6); border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(15px); display: flex; flex-direction: column; align-items: center; text-align: center; transition: transform 0.3s ease;
}
.stock-widget:hover { transform: translateY(-5px); border-color: rgba(255, 255, 255, 0.2); }
.daily-profit { font-size: 15px; font-weight: 700; margin-bottom: 12px; padding: 6px 16px; background: rgba(0,0,0,0.4); border-radius: 100px; letter-spacing: 0.5px; border: 1px solid rgba(255,255,255,0.1); }
.stock-name { font-size: 16px; font-weight: 600; margin-bottom: 12px; color: #fff; }
.stock-info { display: flex; flex-direction: column; align-items: center; gap: 6px; margin-bottom: 15px; width: 100%; }
.stock-price { font-size: 22px; font-weight: 800; }
.stock-up { color: #ff5e5e; }
.stock-down { color: #4ade80; }
.stock-detail { color: #bbb; font-size: 12px; display: block; margin-top: 4px; }
.stock-chart { width: 100%; display: flex; justify-content: center; margin-top: 5px; border-radius: 10px; overflow: hidden; }
.stock-chart img { width: 100%; height: auto; filter: invert(1) hue-rotate(180deg) brightness(1.1); }

.site-footer { padding: 40px 0; }

@media (max-width: 950px) { .stock-widget { width: calc(50% - 10px); } }
@media (max-width: 650px) {
  .stock-widget { width: 100%; }
  .index-card { flex: none; width: calc(50% - 10px); }
  .avatar-image { max-width: 600px; width: 95%; }
  .portfolio-row { flex-direction: column; gap: 20px; }
  .portfolio-dashboard { padding: 20px; width: 95%; }
  .top-location { font-size: 12px; padding: 4px 12px; }
}