
/* 基础样式与全局设置 */
:root {
    --primary-color: #121212;
    --secondary-color: #00d4ff;
    --accent-color: #54ff9f;
    --text-color: #ffffff;
    --box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --transition-speed: 0.3s;
}

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

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

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

header {
    text-align: center;
    padding: 20px;
    background: linear-gradient(45deg, var(--secondary-color), var(--accent-color));
    margin-bottom: 20px;
    border-radius: 10px;
    position: relative;
}

header h1 {
    font-size: 2rem;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 2px;
    background: linear-gradient(90deg, var(--secondary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

header::after {
    content: "这是一个网页样式设计参考";
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.7);
}

article {
    background: rgba(0, 0, 0, 0.7);
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: var(--box-shadow);
}

article h2 {
    font-size: 1.8rem;
    margin-bottom: 10px;
    text-align: center;
    color: var(--secondary-color);
}

article h3 {
    font-size: 1.4rem;
    margin-bottom: 10px;
    color: var(--accent-color);
}

article p {
    margin-bottom: 15px;
    text-indent: 20px;
}

article ul {
    list-style-type: none;
    padding-left: 0;
}

article li {
    margin-bottom: 10px;
    position: relative;
    padding-left: 20px;
}

article li::before {
    content: "•";
    position: absolute;
    left: 0;
    color: var(--secondary-color);
}

pre {
    background: #1e1e1e;
    color: #00d4ff;
    padding: 15px;
    border-radius: 10px;
    overflow-x: auto;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    white-space: pre-wrap;
}

button {
    background: var(--secondary-color);
    color: var(--text-color);
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    transition: all var(--transition-speed) ease;
    margin-top: 10px;
}

button:hover {
    background: var(--accent-color);
    transform: scale(1.1);
}

img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    margin-bottom: 20px;
}

.grid-item {
    background: rgba(0, 0, 0, 0.8);
    border-radius: 10px;
    padding: 15px;
    box-shadow: var(--box-shadow);
    text-align: center;
    transition: transform var(--transition-speed) ease;
}

.grid-item:hover {
    transform: translateY(-5px);
}

footer {
    text-align: center;
    padding: 20px;
    background: linear-gradient(45deg, var(--accent-color), var(--secondary-color));
    margin-top: 20px;
    border-radius: 10px;
}

@media (max-width: 768px) {
    .container {
        grid-template-columns: 1fr;
    }

    article h2 {
        font-size: 1.5rem;
    }

    article h3 {
        font-size: 1.2rem;
    }
}

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

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

