/* 全局样式重置 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  width: 100vw;
  height: 100vh;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background-color: #ffffff;
  color: #333;
  line-height: 1.6;
  background-image: url("bgs.png");
  background-size: cover;
  background-position: center;
  font-family: "ywfont", sans-serif;
}

.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 20px;
}

/* 个人资料头部 */
.profile-header {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  padding: 20px;
  border-radius: 12px;
}

.avatar-container {
  flex-shrink: 0;
}

.avatar {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  background-color: #f0f0f0;
}

.profile-info {
  flex-grow: 1;
  min-width: 0;
}

.name-section {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.username {
  font-size: 22px;
  font-weight: 600;
  color: #111;
  margin: 0;
}

.emoji {
  font-size: 20px;
}

.bio {
  font-size: 14px;
  color: #666;
  margin-bottom: 8px;
  line-height: 1.4;
}

.location {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: #888;
  margin-bottom: 8px;
}

.location-icon {
  font-size: 13px;
}

.location-text {
  white-space: nowrap;
}

.stats {
  display: flex;
  gap: 16px;
  font-size: 13px;
  color: #666;
}

.stat {
  display: flex;
  align-items: center;
  gap: 4px;
}

.stat {
  font-weight: 500;
}

/* 代码展示区域 */
.code-display {
  margin-bottom: 20px;
}

.code-display .bg-img {
  width: 100%;
}

.code-block {
  color: #333;
  padding: 25px;
  border-radius: 12px;
  font-family: "Monaco", "Menlo", "Ubuntu Mono", monospace;
  font-size: 14px;
  line-height: 1.8;
  overflow-x: auto;
  border: 1px solid #e9ecef;
}

/* 代码语法高亮 */
.keyword {
  color: #0070c9;
  font-weight: 600;
}

.function {
  color: #795e26;
}

.boolean {
  color: #0070c9;
  font-weight: 600;
}

/* 引言区域 */
.quote {
  font-size: 14px;
  color: #666;
  text-align: center;
  line-height: 1.8;
  padding: 20px;
  border-radius: 12px;
}

/* 联系信息 */
.contact-info {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
  text-align: left;
  font-size: 13px;
  padding: 10px;
  border-radius: 12px;
}

.contact-item {
  padding: 8px;
  display: flex;
  align-items: center;
}

.contact-item .icon-svg{
    width: 25px;
}

.contact-item a {
  color: #292929;
  text-decoration: none;
  transition: color 0.3s ease;
  font-size: 14px;
}

.contact-item a:hover {
  color: #2980b9;
  text-decoration: underline;
}

/* 自适应设计 */
@media (max-width: 768px) {
  .container {
    padding: 15px;
  }

  .profile-header {
    /* flex-direction: column; */
    text-align: left;
    align-items: center;
    gap: 15px;
    padding: 15px;
  }

  .name-section {
    justify-content: left;
  }

  .username {
    font-size: 20px;
  }

  .avatar {
    width: 80px;
    height: 80px;
  }

  .location {
    justify-content: left;
    flex-wrap: wrap;
  }

  .stats {
    justify-content: left;
    gap: 12px;
  }

  .code-block {
    padding: 20px;
    font-size: 14px;
  }

  .contact-info {
    grid-template-columns: 1fr;
    gap: 10px;
  }
}

@media (max-width: 480px) {
  .code-block {
    padding: 15px;
    font-size: 13px;
  }

  .quote {
    font-size: 14px;
  }
}
