* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  transition: all 0.3s ease;
}

html {
  scroll-behavior: smooth
}

body {
  background-color: #1c1c1c;
  color: #cccccc;
  line-height: 1.6;
  padding: 20px;
  transition: background-color 0.3s ease;
  overflow-y: scroll;
}

/* 个人信息标签样式 */
.info-tag {
  position: fixed;
  top: 0;
  left: 0;
  width: 350px;
  height: 60px;
  display: flex;
  background-color: #3c3c3c;
  padding: 5px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
  z-index: 1000;
  clip-path: polygon(0 0, 100% 0, calc(100% - 20px) 100%, 0 100%);
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.info-tag:hover {
  background-color: #2e2e2e;
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.5);
}

.avatar {
  width: 50px;
  height: 50px;
  background-size: cover;
  background-position: center;
  margin-right: 10px;
  flex-shrink: 0;
  position: relative;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.6);
  transition: box-shadow 0.3s ease;
}

.avatar::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.3) 10%, rgba(0, 0, 0, 0) 70%);
  pointer-events: none;
}

.separator {
  width: 1px;
  height: 100%;
  background-color: #999;
  margin-right: 10px;
}

.info-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  height: 100%;
  width: calc(100% - 70px);
  overflow-y: auto;
}

.basic-info,
.contact-info {
  flex: 1;
  line-height: 1.4;
  font-size: 0.85em;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.basic-info h3,
.basic-info p,
.contact-info p {
  margin: 0;
  color: #f0f0f0;
  word-wrap: break-word;
}

header {
  background-color: #2e2e2e;
  color: #f0f0f0;
  padding: 20px;
  text-align: center;
  border-radius: 4px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  border: 1px solid #3c3c3c;
  margin-top: 80px;
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
  opacity: 0;
  transform: translateY(-20px);
  animation: fadeInDown 0.6s ease forwards;
}

header h1 {
  font-size: 2em;
  font-weight: bold;
  letter-spacing: 2px;
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

nav {
  position: relative;
  background-color: #2e2e2e;
  margin-bottom: 30px;
  padding: 15px;
  border-radius: 4px;
  text-align: center;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  border: 1px solid #3c3c3c;
  opacity: 0;
  transform: translateY(-20px);
  animation: fadeInDown 0.6s ease forwards 0.2s;
}

nav a {
  color: #66b2ff;
  margin: 0 15px;
  text-decoration: none;
  font-weight: bold;
  letter-spacing: 1px;
  padding: 5px 0;
  position: relative;
  transition: color 0.3s ease;
}

nav a:hover {
  color: #ffffff;
}

nav a::before {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 100%;
  height: 3px;
  background-color: #66b2ff;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.3s ease;
}

nav a:hover::before {
  transform: scaleX(1);
  transform-origin: left;
}

a {
  color: #66b2ff;
  text-decoration: none;
  position: relative;
  transition: color 0.3s ease;
}

a:hover {
  color: #ffffff;
}

a::before {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0px;
  width: 100%;
  height: 1px;
  background-color: #66b2ff;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.3s ease;
}

a:hover::before {
  transform: scaleX(1);
  transform-origin: left;
}

section {
  background-color: #2e2e2e;
  padding: 20px;
  border-radius: 4px;
  margin-bottom: 30px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  border: 1px solid #3c3c3c;
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 0.6s ease forwards;
}

h2 {
  color: #66b2ff;
  margin-bottom: 20px;
  font-size: 1.5em;
  border-bottom: 2px solid #3c3c3c;
  padding-bottom: 10px;
}

p {
  margin-bottom: 20px;
  font-size: 1.1em;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.skills {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 15px;
  padding: 0;
  list-style-type: none;
  margin: 0;
  width: 100%;
  max-width: 1200px;
  margin: auto;
}

.skills li {
  list-style-type: none;
  background-color: #3c3c3c;
  color: #ffffff;
  border-radius: 4px;
  box-shadow: inset 0 0px 2px rgba(0, 0, 0, 0.2);
  transition: background-color 0.3s ease;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 10px;
}

.skills li:hover {
  background-color: #788490;
  color: #000000;
}

.skills li iframe {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  border: none;
  margin-bottom: 10px;
}

@keyframes fadeInScale {
  from {
    opacity: 0;
    transform: scale(0.95);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

.contact-info {
  list-style-type: none;
}

.contact-info li {
  margin-bottom: 10px;
  font-size: 1.1em;
}

.contact-info a {
  color: #66b2ff;
  text-decoration: none;
  transition: color 0.3s ease;
}

.contact-info a:hover {
  color: #3399ff;
}

.spinner {
  margin: 20px auto;
  border: 4px solid #f3f3f3;
  border-top: 4px solid #66b2ff;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

.hidden {
  display: none;
}

iframe {
  margin-bottom: 20px;
  font-size: 1.1em;
}

img {
  -webkit-user-select: none;
  /* Chrome/Safari */
  -moz-user-select: none;
  /* Firefox */
  -ms-user-select: none;
  /* IE10+ */
  user-select: none;
  /* Standard */
  pointer-events: none;
}

/* 错误提示样式 */
.error {
  text-align: center;
  padding: 50px;
  color: #ff6666;
}

.error h2 {
  font-size: 2em;
  margin-bottom: 20px;
}

/* 动态加载过渡效果 */
#sectionsContainer {
  opacity: 0;
  animation: fadeInUp 0.6s ease forwards 0.4s;
}
/* 音乐播放器增强样式 */
.music-container {
  margin: 1.5rem 0;
  position: relative;
}

.music-controls {
  text-align: right;
  margin-bottom: 8px;
}

.shuffle-btn {
  background: none;
  border: 1px solid #66b2ff;
  color: #66b2ff;
  padding: 6px 12px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 0.9em;
}

.shuffle-btn:hover {
  background: rgba(102, 178, 255, 0.1);
}

.player-wrapper {
  transition: opacity 0.3s ease;
  min-height: 66px;
}

.music-iframe {
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* styles.css 新增内容 */
/* 资源分享装饰 */
.resource-list {
  background: #2a2a2a;
  border-radius: 8px;
  padding: 15px;
}

.resource-item {
  position: relative;
  margin-bottom: 12px;
  padding-left: 28px;
  list-style: none;
}

.link-decoration {
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  background: rgba(102, 178, 255, 0.15);
  border-radius: 4px;
  transition: all 0.3s ease;
}

.resource-item:hover .link-decoration {
  background: rgba(102, 178, 255, 0.25);
  transform: translateY(-50%) rotate(45deg);
}

.link-icon {
  margin-right: 8px;
  vertical-align: middle;
}

.link-text {
  border-bottom: 1px dashed rgba(102, 178, 255, 0.5);
}

/* 音乐播放器增强 */
.music-container {
  margin: 1.5rem 0;
}

.music-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.now-playing {
  color: #88c9ff;
  font-size: 0.95em;
  max-width: 70%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.shuffle-btn {
  background: none;
  border: 1px solid #66b2ff;
  color: #66b2ff;
  padding: 6px 12px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.shuffle-btn:hover {
  background: rgba(102, 178, 255, 0.1);
}

.player-wrapper {
  transition: opacity 0.3s ease;
}

/* 移动端适配 */
@media (max-width: 768px) {
  .music-header {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .now-playing {
    max-width: 100%;
    margin-bottom: 8px;
  }

  .resource-item {
    padding-left: 24px;
  }
  
  .link-decoration {
    width: 18px;
    height: 18px;
  }
}

/* 在现有样式添加 */
.works-list,
.contact-list {
  list-style-type: none;
  padding-left: 0;
}

/* 调整作品列表间距 */
.work-item {
  margin-bottom: 30px;
  padding: 15px;
  background: #3c3c3c;
  border-radius: 4px;
}

/* 联系列表优化 */
.contact-list li {
  padding: 8px 0;
  border-bottom: 1px solid #3c3c3c;
}

/* 添加加载动画 */
@keyframes pulse {
  0% { opacity: 0.6; }
  50% { opacity: 1; }
  100% { opacity: 0.6; }
}

.loading-state {
  color: #66b2ff;
  text-align: center;
  animation: pulse 1.5s infinite;
}