
:root {
  --primary: #0f2027;
  --secondary: #203a43;
  --accent: #00ffcc;
  --highlight: #ff6600;
  --text: #ffffff;
  --card-bg: #0f3460;
  --nav-bg: #1a1a2e;
  --content-bg: #16213e;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Roboto', sans-serif;
  background: linear-gradient(135deg, var(--primary), var(--secondary), #2c5364);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
}

.header {
  text-align: center;
  padding: 2rem 0;
  position: relative;
  margin-bottom: 3rem;
}

.header::after {
  content: "这是一个网页样式设计参考";
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  color: var(--accent);
  font-size: 0.9rem;
  opacity: 0.8;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  display: grid;
  grid-template-columns: 250px 1fr;
  gap: 2rem;
}

.sidebar {
  background: var(--nav-bg);
  padding: 2rem 1rem;
  border-radius: 0 20px 20px 0;
  clip-path: polygon(0 0, 100% 0, 100% 100%, 0 85%);
  box-shadow: 5px 0 15px rgba(0,0,0,0.3);
}

.nav-item {
  display: flex;
  align-items: center;
  padding: 0.8rem 0;
  color: var(--text);
  text-decoration: none;
  transition: all 0.3s ease;
  position: relative;
}

.nav-item:hover {
  color: var(--accent);
  transform: translateX(10px);
}

.nav-item::before {
  content: "";
  width: 8px;
  height: 8px;
  background: var(--accent);
  border-radius: 50%;
  margin-right: 1rem;
  transition: all 0.3s ease;
}

.nav-item:hover::before {
  transform: scale(1.5);
}

.content {
  background: var(--content-bg);
  padding: 2rem;
  border-radius: 20px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

h1, h2, h3, h4 {
  margin: 1.5rem 0;
  font-weight: 500;
  line-height: 1.2;
}

h1 {
  font-size: 2.5rem;
  background: linear-gradient(90deg, var(--accent), var(--highlight));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

h2 {
  font-size: 1.8rem;
  color: var(--accent);
  padding-bottom: 0.5rem;
  border-bottom: 2px solid rgba(0,255,204,0.3);
}

h3 {
  font-size: 1.4rem;
  color: var(--highlight);
}

p {
  margin-bottom: 1.5rem;
  font-size: 1.1rem;
}

.card {
  background: var(--card-bg);
  padding: 1.5rem;
  border-radius: 10px;
  margin-bottom: 2rem;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
  transition: all 0.3s ease;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}

.code-block {
  background: #1e2a3a;
  padding: 1.5rem;
  border-radius: 8px;
  margin: 1.5rem 0;
  overflow: auto;
  position: relative;
}

.code-block::before {
  content: "CSS";
  position: absolute;
  top: 0;
  right: 0;
  background: var(--accent);
  color: var(--primary);
  padding: 0.2rem 0.8rem;
  border-radius: 0 8px 0 8px;
  font-size: 0.8rem;
  font-weight: bold;
}

pre {
  margin: 0;
  font-family: 'Courier New', monospace;
  font-size: 0.9rem;
  line-height: 1.5;
  color: #a7c4d4;
}

code {
  font-family: 'Courier New', monospace;
  background: rgba(0,255,204,0.1);
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
  color: var(--accent);
}

.img-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
}

.img-card {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0,0,0,0.2);
  transition: all 0.3s ease;
}

.img-card:hover {
  transform: scale(1.03);
  box-shadow: 0 10px 25px rgba(0,0,0,0.3);
}

.img-card img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.5s ease;
}

.img-card:hover img {
  transform: scale(1.1);
}

.img-card::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(0,255,204,0.3), rgba(255,102,0,0.3));
  opacity: 0;
  transition: opacity 0.3s ease;
}

.img-card:hover::after {
  opacity: 1;
}

.footer {
  text-align: center;
  padding: 2rem 0;
  margin-top: 3rem;
  border-top: 1px solid rgba(255,255,255,0.1);
}

@media (max-width: 768px) {
  .container {
    grid-template-columns: 1fr;
  }
  
  .sidebar {
    clip-path: none;
    border-radius: 0 0 20px 20px;
  }
  
  .img-grid {
    grid-template-columns: 1fr;
  }
}

@keyframes float {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

.floating {
  animation: float 3s ease-in-out infinite;
}

