
/* CSS Variables */
:root {
  --primary-color: #1E274B; /* 深蓝 */
  --secondary-color: #6F38C5; /* 紫色 */
  --highlight-color: #FFA500; /* 橙色 */
  --background-gradient: linear-gradient(135deg, #1E274B, #6F38C5);
  --font-primary: 'Open Sans', sans-serif;
  --font-secondary: 'Roboto Mono', monospace;
  --text-color: #FFFFFF;
  --card-bg: rgba(255, 255, 255, 0.1);
  --shadow-color: rgba(0, 0, 0, 0.2);
}

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

body {
  font-family: var(--font-primary);
  background: var(--background-gradient);
  color: var(--text-color);
  line-height: 1.6;
  padding: 20px;
  transition: background-color 1s ease-in-out;
}

h1, h2, h3, h4 {
  font-family: var(--font-secondary);
  color: var(--highlight-color);
  margin-bottom: 20px;
}

h1 {
  font-size: 2.5rem;
  text-align: center;
  text-shadow: 2px 2px 5px rgba(0,0,0,0.5);
}

h2 {
  font-size: 2rem;
}

h3 {
  font-size: 1.5rem;
  margin-top: 30px;
}

p {
  margin-bottom: 1.5em;
}

pre {
  background: rgba(255, 255, 255, 0.2);
  padding: 15px;
  border-radius: 8px;
  overflow-x: auto;
  margin-bottom: 1.5em;
}

code {
  font-family: var(--font-secondary);
  color: #FFD700;
}

.container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  padding: 20px;
}

.card {
  background-color: var(--card-bg);
  border-radius: 10px;
  padding: 20px;
  box-shadow: 0 4px 6px var(--shadow-color);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
  transform: translateY(-10px);
  box-shadow: 0 8px 12px var(--shadow-color);
}

img {
  width: 100%;
  height: auto;
  border-radius: 8px;
  margin-bottom: 15px;
}

button {
  background: linear-gradient(to right, var(--secondary-color), var(--highlight-color));
  border: none;
  padding: 10px 20px;
  border-radius: 5px;
  cursor: pointer;
  color: var(--text-color);
  font-size: 1rem;
  transition: background 0.3s ease;
}

button:hover {
  background: linear-gradient(to right, var(--highlight-color), var(--secondary-color));
}

a {
  color: var(--highlight-color);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.button-ripple {
  position: relative;
  overflow: hidden;
}

.button-ripple::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 5px;
  height: 5px;
  background: rgba(255, 255, 255, 0.5);
  border-radius: 50%;
  transform: scale(1) translate(-50%, -50%);
  opacity: 0;
  animation: ripple-effect 0.6s ease-out;
}

@keyframes ripple-effect {
  0% {
    transform: scale(1) translate(-50%, -50%);
    opacity: 0.5;
  }
  100% {
    transform: scale(25) translate(-50%, -50%);
    opacity: 0;
  }
}

.card-code pre {
  background: rgba(255, 255, 255, 0.15);
  padding: 10px;
  border-radius: 5px;
  overflow-x: auto;
}

.footer {
  text-align: center;
  margin-top: 40px;
  font-size: 1rem;
  color: #FFD700;
}

/* Responsive Design */
@media (max-width: 1440px) {
  h1 {
    font-size: 2.2rem;
  }
}

@media (max-width: 1200px) {
  .container {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  }
}

@media (max-width: 1024px) {
  h1 {
    font-size: 2rem;
  }
}

@media (max-width: 768px) {
  body {
    padding: 15px;
  }
  h1 {
    font-size: 1.8rem;
  }
}

@media (max-width: 480px) {
  h1 {
    font-size: 1.5rem;
  }
}

@media (max-width: 320px) {
  h1 {
    font-size: 1.2rem;
  }
}

