/*
Theme Name: Muyuyv毛玻璃主题
Theme URI: https://muyuyv233.github.io/
Author: Muyuyv
Description: 毛玻璃主题 - 重构版
Version: 2.0
*/

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

/* ===== 固定背景层 ===== */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  height: 100%;
  background: url('https://muyuyv.online/wp-content/themes/muyuyv-theme/bg.png') no-repeat center center fixed;
  background-size: cover;
  z-index: -2;
  pointer-events: none;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 20px;
  position: relative;
  overflow-x: hidden;
}

/* ===== 导航栏 ===== */
.glass-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  padding: 20px 40px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
  z-index: 1000;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.glass-header h1 {
  font-size: 2.2rem;
  color: white;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
  font-weight: 700;
}

.glass-header h1 a {
  color: white;
  text-decoration: none;
}

.header-subtitle {
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.85);
  font-weight: 300;
  margin-top: 5px;
}

/* ===== 内容区 ===== */
.content-wrapper {
  margin-top: 100px;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  flex-grow: 1;
}

/* ===== 卡片（毛玻璃效果） ===== */
.glass-container {
  will-change: transform, backdrop-filter;
  background: rgba(70, 70, 75, 0.55);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 24px;
  padding: 40px;
  max-width: 900px;
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.25);
  position: relative;
  overflow: hidden;
  z-index: 1;
  margin-bottom: 40px;
  transition: transform 0.3s ease;
}


/* ===== 内容文字 ===== */
.content {
  color: white;
}

.content h2 {
  font-size: 2.2rem;
  margin-bottom: 25px;
  color: rgba(255, 255, 255, 0.95);
  text-shadow: 0 2px 15px rgba(0, 0, 0, 0.8);
  position: relative;
  padding-bottom: 15px;
}

.content h2::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 80px;
  height: 3px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.6), transparent);
  border-radius: 3px;
}

.content p {
  font-size: 1.15rem;
  line-height: 1.8;
  margin-bottom: 25px;
  color: rgba(255, 255, 255, 0.85);
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.7);
}

.content .highlight {
  background: rgba(255, 255, 255, 0.1);
  padding: 20px;
  border-radius: 12px;
  border-left: 4px solid rgba(255, 255, 255, 0.3);
  margin: 25px 0;
}

/* ===== 导航菜单 ===== */
.nav-menu {
  display: flex;
  gap: 20px;
}

.nav-menu a {
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
  font-size: 1rem;
  padding: 8px 16px;
  border-radius: 20px;
  transition: all 0.3s ease;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}


.nav-menu a.blog-link {
  background: rgba(255, 255, 255, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.4);
}

/* ===== 浮动装饰 ===== */
.floating-elements {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  overflow: hidden;
  z-index: -1;
  pointer-events: none;
}

.floating-elements div {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  animation: float 15s infinite linear;
}

.floating-elements div:nth-child(1) {
  width: 80px;
  height: 80px;
  top: 15%;
  left: 10%;
  animation-delay: 0s;
}

.floating-elements div:nth-child(2) {
  width: 120px;
  height: 120px;
  top: 60%;
  left: 85%;
  animation-delay: -5s;
}

.floating-elements div:nth-child(3) {
  width: 60px;
  height: 60px;
  top: 80%;
  left: 20%;
  animation-delay: -10s;
}

@keyframes float {
  0% { transform: translateY(0) rotate(0deg); opacity: 0.5; }
  50% { transform: translateY(-20px) rotate(180deg); opacity: 0.8; }
  100% { transform: translateY(0) rotate(360deg); opacity: 0.5; }
}

/* ===== 响应式 ===== */
@media (max-width: 768px) {
  body { padding: 0; }
  .glass-header { padding: 15px 20px; flex-direction: column; gap: 10px; }
  .glass-header h1 { font-size: 1.8rem; }
  .content-wrapper { margin-top: 120px; padding: 0 15px; }
  .glass-container { padding: 30px 20px; }
  will-change: transform, backdrop-filter;
  .content h2 { font-size: 1.8rem; }
  .nav-menu { gap: 10px; }
  .nav-menu a { font-size: 0.9rem; padding: 6px 12px; }
}

@media (max-width: 480px) {
  .glass-header h1 { font-size: 1.5rem; }
  .header-subtitle { font-size: 0.8rem; }
  .content h2 { font-size: 1.5rem; }
  .nav-menu { flex-wrap: wrap; justify-content: center; }
}

/* Firefox 专用：强制保持合成层活跃 */
@keyframes firefoxFix {
  0% { opacity: 0.999; }
  100% { opacity: 1; }
}

.glass-container {
  animation: firefoxFix 0.01s infinite;
}

/* ===== Firefox 专用修复 ===== */
@-moz-document url-prefix() {
  .glass-container,
  .glass-header {
    animation: firefoxFix 0.01s infinite;
    will-change: transform, backdrop-filter;
    transform: translateZ(0);
  }
}

@keyframes firefoxFix {
  0% { opacity: 0.999; }
  100% { opacity: 1; }
}
