/* 二次元风格CSS */
:root {
  --primary-color: #ff758f;
  --secondary-color: #8a2be2;
  --accent-color: #00bfff;
  --bg-color: #f0f4f8;
  --card-bg: #ffffff;
  --text-color: #333333;
  --border-radius: 16px;
  --shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
  --border: 2px solid #ffd700;
}

/* 全局样式 */
body {
  background-color: var(--bg-color);
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100"><circle cx="50" cy="50" r="1" fill="%23ff758f" opacity="0.2"/></svg>');
  background-attachment: fixed;
  color: var(--text-color);
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

/* 头部样式 */
.blog-header {
  background: linear-gradient(
    135deg,
    var(--primary-color),
    var(--secondary-color)
  );
  box-shadow: var(--shadow);
  border-radius: 0 0 var(--border-radius) var(--border-radius);
  padding: 1.5rem 0;
  position: relative;
  overflow: hidden;
}

.blog-header::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="40" height="40" viewBox="0 0 40 40"><circle cx="20" cy="20" r="1" fill="white" opacity="0.3"/></svg>');
  z-index: 0;
}

.blog-title {
  color: white;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
  font-size: 2.5rem;
  position: relative;
  z-index: 1;
  font-family: "Arial Rounded MT Bold", sans-serif;
}

/* 导航链接样式 */
.nav-link {
  color: white !important;
  background-color: rgba(255, 255, 255, 0.15);
  border-radius: 20px;
  padding: 0.5rem 1.2rem;
  margin: 0 0.5rem;
  transition: all 0.3s ease;
  border: 1px solid rgba(255, 255, 255, 0.3);
  position: relative;
  z-index: 1;
}

.nav-link:hover {
  background-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-3px);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15);
}

.nav-link.active {
  background-color: white;
  color: var(--primary-color) !important;
  font-weight: bold;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

/* 卡片样式 */
.card,
.article-content,
.comment-form,
.comment-list {
  background-color: var(--card-bg);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  border: var(--border);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  overflow: hidden;
  position: relative;
}

.card:hover,
.article-content:hover,
.comment-form:hover,
.comment-list:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
}

/* 按钮样式 */
.btn-primary {
  background: linear-gradient(
    45deg,
    var(--primary-color),
    var(--secondary-color)
  );
  border: none;
  border-radius: 20px;
  padding: 0.5rem 1.5rem;
  font-weight: bold;
  transition: all 0.3s ease;
  box-shadow: 0 4px 8px rgba(255, 117, 143, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(255, 117, 143, 0.4);
  opacity: 0.95;
}

/* 页脚样式 */
.footer {
  background: linear-gradient(
    135deg,
    var(--secondary-color),
    var(--primary-color)
  );
  color: white;
  border-radius: var(--border-radius) var(--border-radius) 0 0;
  position: relative;
  overflow: hidden;
}

.footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="40" height="40" viewBox="0 0 40 40"><circle cx="20" cy="20" r="1" fill="white" opacity="0.2"/></svg>');
}

/* 时间轴样式 */
.timeline::after {
  background-color: var(--primary-color);
  border-radius: 3px;
}

.timeline-item::after {
  background-color: white;
  border: 4px solid var(--primary-color);
  box-shadow: 0 0 10px rgba(255, 117, 143, 0.6);
}

/* 标签和徽章样式 */
.badge {
  border-radius: 15px;
  padding: 0.35em 0.75em;
  font-weight: 600;
  background: linear-gradient(
    45deg,
    var(--accent-color),
    var(--secondary-color)
  );
  color: white;
}

/* 搜索框样式 */
.form-control {
  border-radius: 20px;
  border: 2px solid #ddd;
  padding: 0.5rem 1.2rem;
  transition: all 0.3s ease;
}

.form-control:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 0.25rem rgba(255, 117, 143, 0.25);
}

/* 响应式调整 */
@media (max-width: 768px) {
  .blog-title {
    font-size: 2rem;
  }

  .nav-link {
    margin: 0.3rem 0;
    width: 100%;
    text-align: center;
  }
}

/* 动画效果 */
@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(255, 117, 143, 0.7);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(255, 117, 143, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(255, 117, 143, 0);
  }
}

/* 装饰元素 */
.decorative-element {
  position: fixed;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(255, 117, 143, 0.1) 0%,
    rgba(255, 117, 143, 0) 70%
  );
  z-index: -1;
}

div.decorative-element:nth-child(1) {
  top: 10%;
  right: 5%;
}

div.decorative-element:nth-child(2) {
  bottom: 10%;
  left: 5%;
  background: radial-gradient(
    circle,
    rgba(138, 43, 226, 0.1) 0%,
    rgba(138, 43, 226, 0) 70%
  );
}

div.decorative-element:nth-child(3) {
  top: 40%;
  left: 10%;
  background: radial-gradient(
    circle,
    rgba(0, 191, 255, 0.1) 0%,
    rgba(0, 191, 255, 0) 70%
  );
}

/* 文章卡片特别样式 */
.article-card {
  border-radius: var(--border-radius);
  overflow: hidden;
  transition: all 0.3s ease;
}

.article-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.article-card .card-title a {
  color: var(--primary-color);
  font-weight: bold;
  transition: color 0.3s ease;
}

.article-card .card-title a:hover {
  color: var(--secondary-color);
  text-decoration: underline;
}

/* 留言板样式 */
.comment-item {
  border-bottom: 2px dashed #ffd700;
}

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

.comment-username {
  color: var(--primary-color);
  font-weight: bold;
}

/* 音乐播放器样式 */
#floating-player {
  border-radius: 50px !important;
  background: linear-gradient(
    135deg,
    var(--primary-color),
    var(--secondary-color)
  ) !important;
  border: 2px solid white !important;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2) !important;
}
