
:root {
  --primary: #0F4C81;
  --secondary: #1E90FF;
  --accent: #6A5ACD;
  --success: #32CD32;
  --danger: #FF4500;
  --text: #E0E0E0;
  --bg-dark: #121212;
  --card-bg: rgba(30, 144, 255, 0.1);
  --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

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

body {
  font-family: 'Roboto', sans-serif;
  background: linear-gradient(135deg, var(--primary), var(--bg-dark));
  color: var(--text);
  line-height: 1.6;
  padding: 0;
  margin: 0;
  min-height: 100%;
  overflow-x: hidden;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

.header {
  text-align: center;
  padding: 40px 0;
  position: relative;
  overflow: hidden;
}

.header::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--secondary), transparent);
  animation: shine 3s infinite;
}

@keyframes shine {
  0% { opacity: 0; left: -100%; }
  50% { opacity: 1; }
  100% { opacity: 0; left: 100%; }
}

h1, h2, h3, h4 {
  font-weight: 700;
  margin-bottom: 20px;
  color: white;
}

h1 {
  font-size: 2.5rem;
  background: linear-gradient(to right, var(--secondary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 0 10px rgba(106, 90, 205, 0.3);
}

h2 {
  font-size: 2rem;
  border-left: 4px solid var(--secondary);
  padding-left: 15px;
  margin: 40px 0 20px;
}

h3 {
  font-size: 1.5rem;
  margin: 30px 0 15px;
  position: relative;
  padding-left: 15px;
}

h3::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 5px;
  height: 80%;
  background: var(--accent);
  border-radius: 3px;
}

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

strong {
  color: var(--secondary);
}

article {
  background: rgba(18, 18, 18, 0.8);
  border-radius: 15px;
  padding: 30px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  margin-bottom: 40px;
  border: 1px solid rgba(106, 90, 205, 0.2);
}

.code-container {
  position: relative;
  margin: 25px 0;
  border-radius: 8px;
  overflow: hidden;
}

pre {
  background: rgba(15, 76, 129, 0.3);
  padding: 20px;
  border-radius: 8px;
  overflow-x: auto;
  font-family: 'Courier New', monospace;
  font-size: 0.9rem;
  line-height: 1.5;
  border-left: 3px solid var(--accent);
  position: relative;
}

code {
  color: #E0E0E0;
  display: block;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
  margin: 40px 0;
}

.gallery img {
  width: 100%;
  height: auto;
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  transition: var(--transition);
  aspect-ratio: 1/1;
  object-fit: cover;
}

.gallery img:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(106, 90, 205, 0.5);
}

.note {
  background: var(--card-bg);
  padding: 20px;
  border-radius: 10px;
  margin: 30px 0;
  border-left: 4px solid var(--accent);
}

.note::before {
  content: "这是一个网页样式设计参考";
  display: block;
  font-weight: bold;
  margin-bottom: 10px;
  color: var(--secondary);
}

.card {
  background: var(--card-bg);
  border-radius: 10px;
  padding: 20px;
  margin: 20px 0;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  transition: var(--transition);
  border: 1px solid rgba(106, 90, 205, 0.2);
}

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

.highlight {
  background: rgba(106, 90, 205, 0.2);
  padding: 2px 5px;
  border-radius: 3px;
}

.tabs {
  display: flex;
  margin-bottom: 20px;
  border-bottom: 1px solid rgba(106, 90, 205, 0.3);
}

.tab {
  padding: 10px 20px;
  cursor: pointer;
  position: relative;
}

.tab.active {
  color: var(--secondary);
}

.tab.active::after {
  content: "";
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--secondary);
}

@media (max-width: 768px) {
  .container {
    padding: 15px;
  }
  
  h1 {
    font-size: 2rem;
  }
  
  h2 {
    font-size: 1.5rem;
  }
  
  h3 {
    font-size: 1.2rem;
  }
  
  .gallery {
    grid-template-columns: 1fr;
  }
}

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

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

.pulse {
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(106, 90, 205, 0.7); }
  70% { box-shadow: 0 0 0 10px rgba(106, 90, 205, 0); }
  100% { box-shadow: 0 0 0 0 rgba(106, 90, 205, 0); }
}

.neon-text {
  color: #fff;
  text-shadow:
    0 0 5px var(--accent),
    0 0 10px var(--accent),
    0 0 20px var(--accent),
    0 0 40px var(--accent);
  animation: neon 1.5s infinite alternate;
}

@keyframes neon {
  from {
    text-shadow:
      0 0 5px var(--accent),
      0 0 10px var(--accent),
      0 0 20px var(--accent),
      0 0 40px var(--accent);
  }
  to {
    text-shadow:
      0 0 10px #fff,
      0 0 20px #fff,
      0 0 30px #fff,
      0 0 50px #fff;
  }
}

.grid-system {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  margin: 30px 0;
}

.grid-item {
  background: rgba(30, 144, 255, 0.1);
  padding: 20px;
  border-radius: 10px;
  transition: var(--transition);
}

.grid-item:hover {
  transform: translateY(-5px);
  background: rgba(30, 144, 255, 0.2);
}

.footer {
  text-align: center;
  padding: 30px 0;
  margin-top: 50px;
  border-top: 1px solid rgba(106, 90, 205, 0.3);
}

/* 示例文章中提到的样式 */
.market-up {
  background: linear-gradient(135deg, var(--primary), var(--success));
}

.market-down {
  background: linear-gradient(135deg, var(--primary), var(--danger));
}

.chart {
  width: 100%;
  height: 400px;
  background: #000;
  border-radius: 10px;
  margin: 20px 0;
  transition: all 0.5s ease-in-out;
}

.chart:hover {
  transform: scale(1.02);
  box-shadow: 0 0 20px rgba(106, 90, 205, 0.5);
}

.button {
  background-color: var(--secondary);
  border: none;
  padding: 12px 24px;
  color: #fff;
  cursor: pointer;
  border-radius: 5px;
  font-weight: bold;
  transition: var(--transition);
  display: inline-block;
  margin: 10px 0;
}

.button:hover {
  background-color: var(--accent);
  box-shadow: 0 0 15px rgba(106, 90, 205, 0.5);
}

.page-transition {
  opacity: 0;
  transition: opacity 0.5s ease-in-out;
}

.page-transition.active {
  opacity: 1;
}

.data-update {
  animation: fadeIn 1s ease-in-out;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: rgba(15, 76, 129, 0.8);
  padding: 15px 30px;
  border-radius: 0 0 10px 10px;
  margin-bottom: 30px;
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(10px);
}

.nav-links {
  display: flex;
  gap: 20px;
}

.nav-links a {
  color: #fff;
  text-decoration: none;
  transition: var(--transition);
  font-weight: 500;
  position: relative;
  padding: 5px 0;
}

.nav-links a::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: var(--transition);
}

.nav-links a:hover::after {
  width: 100%;
}

.nav-links a:hover {
  color: var(--accent);
}

.card-expanded {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.5s ease;
}

.card-expanded.active {
  max-height: 500px;
}

