@font-face {
  font-family: 'main';
  src: url('main.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
}

body, h1, h2, h3, h4, h5, h6, p, a, li, button {
  font-family: 'main', Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

body, html {
  margin: 0; 
  padding: 0; 
  height: 100%;
  background-image: url('img/bg0.png');
  background-repeat: repeat;
  color: #333;
  overflow-x: hidden;
  font-family: Arial, sans-serif; 
}

.container {
  display: flex;
  height: 100vh;
}

nav.sidebar {
  width: 240px;
  background: linear-gradient(to bottom, #45417a, #5a5694);
  color: #dfdeed;
  overflow-y: auto;
  padding: 1em;
  box-sizing: border-box;
  transition: transform 0.3s ease;
  box-shadow: 2px 0 10px rgba(0,0,0,0.1);
  position: relative;
  z-index: 100;
}

nav.sidebar h2 {
  font-size: 1.5em;
  border-bottom: 1px solid #6b67a3;
  padding-bottom: 0.5em;
  margin-bottom: 1em;
  color: #fff;
  text-align: center;
  font-weight: 700;
}

nav.sidebar ul {
  list-style: none;
  padding-left: 0;
}

nav.sidebar ul li {
  margin-bottom: 0.7em;
}

nav.sidebar ul li a {
  color: #b4b1d6;
  text-decoration: none;
  display: block;
  padding: 10px 15px;
  border-radius: 6px;
  transition: all 0.3s;
  position: relative;
  overflow: hidden;
}

nav.sidebar ul li a:hover,
nav.sidebar ul li a.active {
  color: #fff;
  background-color: rgba(255, 255, 255, 0.15);
  font-weight: bold;
  transform: translateX(5px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

nav.sidebar ul li a::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 4px;
  background: #C93756;
  transform: scaleY(0);
  transition: transform 0.3s;
}

nav.sidebar ul li a:hover::before,
nav.sidebar ul li a.active::before {
  transform: scaleY(1);
}

main.content {
  flex: 1;
  padding: 2em;
  overflow-y: auto;
  background: rgba(255, 255, 255, 0.8);
  box-sizing: border-box;
  border-left: 1px solid #ddd;
  box-shadow: -2px 0 10px rgba(0,0,0,0.05);
  position: relative;
}

.title-container {
  position: relative;
  margin-bottom: 2em;
  overflow: hidden;
  text-align: center;
  padding: 2em 0;
}

.title-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(45deg, #C93756, #45417a, #5a5694);
  opacity: 0.1;
  z-index: 0;
  border-radius: 10px;
}

.meme-title {
  font-size: 4em;
  font-weight: 900;
  color: #C93756;
  text-transform: uppercase;
  letter-spacing: 2px;
  position: relative;
  z-index: 1;
  text-shadow: 
    3px 3px 0 #000,
    6px 6px 0 rgba(0,0,0,0.2);
  animation: glitch 5s infinite;
  margin: 0;
}

.meme-title::before,
.meme-title::after {
  content: attr(data-text);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
}

.meme-title::before {
  color: #00FFFF;
  animation: glitch-1 2s infinite;
}

.meme-title::after {
  color: #FF00FF;
  animation: glitch-2 3s infinite;
}

@keyframes glitch {
  0%, 100% {
    transform: translate(0);
  }
  20% {
    transform: translate(-2px, 2px);
  }
  40% {
    transform: translate(-2px, -2px);
  }
  60% {
    transform: translate(2px, 2px);
  }
  80% {
    transform: translate(2px, -2px);
  }
}

@keyframes glitch-1 {
  0%, 100% {
    transform: translate(0);
    opacity: 0.8;
  }
  10% {
    transform: translate(-2px, -2px);
    opacity: 0.6;
  }
  20% {
    transform: translate(2px, 2px);
    opacity: 0.4;
  }
  30% {
    transform: translate(-2px, 2px);
    opacity: 0.8;
  }
  40% {
    transform: translate(2px, -2px);
    opacity: 0.6;
  }
  50% {
    transform: translate(-2px, -2px);
    opacity: 0.4;
  }
  60% {
    transform: translate(2px, 2px);
    opacity: 0.8;
  }
  70% {
    transform: translate(-2px, 2px);
    opacity: 0.6;
  }
  80% {
    transform: translate(2px, -2px);
    opacity: 0.4;
  }
  90% {
    transform: translate(-2px, -2px);
    opacity: 0.8;
  }
}

@keyframes glitch-2 {
  0%, 100% {
    transform: translate(0);
    opacity: 0.8;
  }
  10% {
    transform: translate(2px, 2px);
    opacity: 0.6;
  }
  20% {
    transform: translate(-2px, -2px);
    opacity: 0.4;
  }
  30% {
    transform: translate(2px, -2px);
    opacity: 0.8;
  }
  40% {
    transform: translate(-2px, 2px);
    opacity: 0.6;
  }
  50% {
    transform: translate(2px, 2px);
    opacity: 0.4;
  }
  60% {
    transform: translate(-2px, -2px);
    opacity: 0.8;
  }
  70% {
    transform: translate(2px, -2px);
    opacity: 0.6;
  }
  80% {
    transform: translate(-2px, 2px);
    opacity: 0.4;
  }
  90% {
    transform: translate(2px, 2px);
    opacity: 0.8;
  }
}

.subtitle {
  font-size: 1.5em;
  color: #45417a;
  margin-top: 0.5em;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 3px;
  animation: subtitle-pulse 3s infinite;
}

@keyframes subtitle-pulse {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.7;
    transform: scale(1.05);
  }
}

main.content h2 {
  color: #45417a;
  border-left: 4px solid #C93756;
  padding-left: 10px;
  margin-top: 1.5em;
  position: relative;
  overflow: hidden;
}

main.content h2::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, #C93756, transparent);
  transform: translateX(-100%);
  transition: transform 0.5s;
}

main.content h2:hover::after {
  transform: translateX(0);
}

main.content p {
  line-height: 1.6;
  font-size: 1.05em;
  margin-bottom: 1.2em;
}

main.content pre {
  background: #f4f4f4;
  padding: 1em;
  overflow-x: auto;
  border-radius: 5px;
  border: 1px solid #ddd;
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.1);
}

.menu-toggle {
  display: none;
  position: fixed;
  top: 15px;
  left: 15px;
  background: #45417a;
  color: white;
  border: none;
  border-radius: 16px;
  padding: 10px 15px;
  z-index: 1000;
  cursor: pointer;
  font-size: 16px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
  transition: all 0.3s;
}

.menu-toggle:hover {
  background: #5a5694;
  transform: translateY(-2px);
}

@media (max-width: 768px) {
  .menu-toggle {
    display: block;
  }
  
  nav.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100%;
    width: 280px;
    transform: translateX(-100%);
    z-index: 999;
    box-shadow: 2px 0 10px rgba(0,0,0,0.1);
  }
  
  nav.sidebar.active {
    transform: translateX(0);
  }
  
  main.content {
    padding: 1em;
    padding-top: 60px;
    width: 100%;
  }
  
  .overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 998;
  }
  
  .overlay.active {
    display: block;
  }
  
  .menu-toggle.hidden {
    opacity: 0;
    pointer-events: none;
  }
  
  .meme-title {
    font-size: 2.5em;
  }
  
  .subtitle {
    font-size: 1.2em;
  }
}

.feature-card {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  border-radius: 8px;
  padding: 1.5em;
  margin: 1.5em 0;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
  border-left: 4px solid #C93756;
  position: relative;
  overflow: hidden;
  transition: transform 0.3s, box-shadow 0.3s;
}

.feature-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0,0,0,0.15);
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(45deg, transparent, rgba(201, 55, 86, 0.05), transparent);
  transform: translateX(-100%);
  transition: transform 0.6s;
}

.feature-card:hover::before {
  transform: translateX(100%);
}

.feature-card h3 {
  margin-top: 0;
  color: #45417a;
}

a {
  color: #C93756;
  text-decoration: none;
  transition: color 0.3s;
}

a:hover {
  color: #45417a;
  text-decoration: underline;
}

footer {
  margin-top: 3em;
  padding-top: 1em;
  border-top: 1px solid #ddd;
  text-align: center;
  color: #777;
  font-size: 0.9em;
}

.meme-element {
  position: absolute;
  z-index: 0;
  opacity: 0.1;
  pointer-events: none;
}

.meme-element:nth-child(1) {
  top: 10%;
  left: 5%;
  font-size: 3em;
  animation: float 8s infinite ease-in-out;
}

.meme-element:nth-child(2) {
  top: 20%;
  right: 5%;
  font-size: 2.5em;
  animation: float 10s infinite ease-in-out 1s;
}

.meme-element:nth-child(3) {
  bottom: 20%;
  left: 10%;
  font-size: 2em;
  animation: float 12s infinite ease-in-out 2s;
}

.meme-element:nth-child(4) {
  bottom: 10%;
  right: 10%;
  font-size: 2.5em;
  animation: float 9s infinite ease-in-out 0.5s;
}

@keyframes float {
  0%, 100% {
    transform: translateY(0) rotate(0deg);
  }
  50% {
    transform: translateY(-20px) rotate(5deg);
  }
}

.download-btn {
  display: inline-block;
  background: linear-gradient(45deg, #C93756, #e74c3c);
  color: white;
  padding: 8px 16px;
  border-radius: 20px;
  text-decoration: none;
  font-weight: bold;
  margin-top: 10px;
  box-shadow: 0 4px 6px rgba(201, 55, 86, 0.3);
  transition: all 0.3s;
  position: relative;
  overflow: hidden;
}

.download-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
  transition: left 0.5s;
}

.download-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(201, 55, 86, 0.4);
}

.download-btn:hover::before {
  left: 100%;
}

.team-showcase {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin: 2em 0;
}

.team-member {
  flex: 1 1 200px;
  background: #f8f9fa;
  border-radius: 10px;
  padding: 1em;
  text-align: center;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  transition: transform 0.3s;
}

.team-member:hover {
  transform: translateY(-5px);
}

.team-member img {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 10px;
  border: 3px solid #C93756;
}

.image-placeholder {
  width: 100%;
  height: 200px;
  background: linear-gradient(45deg, #e6e6fa, #f0f0ff);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 1em 0;
  position: relative;
  overflow: hidden;
}

.image-placeholder::before {
  content: '🖼️ 图片未加载';
  color: #999;
  font-size: 1.2em;
}

.image-placeholder::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transition: left 0.5s;
}

.image-placeholder:hover::after {
  left: 100%;
}