
/* 全局样式设置 */
body {
    margin: 0;
    padding: 0;
    background: linear-gradient(135deg, #000033, #330066);
    color: #ffffff;
    font-family: 'Montserrat', sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3, h4 {
    font-family: 'Exo 2', sans-serif;
    text-shadow: 0 0 10px #0ff;
    margin-bottom: 20px;
}

h1 {
    font-size: 3em;
    text-align: center;
    margin-top: 40px;
}

h2 {
    font-size: 2.5em;
    margin-top: 60px;
}

h3 {
    font-size: 2em;
    margin-top: 40px;
}

h4 {
    font-size: 1.5em;
    margin-top: 30px;
}

p {
    font-size: 1em;
    margin-bottom: 20px;
    padding: 0 20px;
}

a {
    color: #00ff99;
    text-decoration: none;
    position: relative;
}

a::after {
    content: '';
    position: absolute;
    width: 100%;
    transform: scaleX(0);
    height: 2px;
    bottom: -2px;
    left: 0;
    background-color: #00ff99;
    transform-origin: bottom right;
    transition: transform 0.25s ease-out;
}

a:hover::after {
    transform: scaleX(1);
    transform-origin: bottom left;
}

button {
    padding: 10px 20px;
    background: #00f;
    color: #fff;
    border: none;
    cursor: pointer;
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
    font-size: 1em;
    margin: 10px;
}

button:hover {
    transform: scale(1.1) rotate(2deg);
    box-shadow: 0 0 10px rgba(0, 255, 255, 0.8);
}

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

article {
    background: rgba(0, 0, 0, 0.6);
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.2);
}

pre {
    background: #1e1e1e;
    padding: 15px;
    border-radius: 5px;
    overflow: auto;
    font-size: 0.9em;
    margin-bottom: 20px;
}

code {
    color: #00ff99;
    font-family: 'Courier New', Courier, monospace;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

th, td {
    border: 1px solid #00ff99;
    padding: 10px;
    text-align: left;
}

th {
    background: #330066;
}

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

.notice {
    text-align: center;
    font-size: 1.2em;
    margin: 20px 0;
    color: #ff6600;
}

@media (max-width: 1440px) {
    h1 {
        font-size: 2.5em;
    }
    h2 {
        font-size: 2em;
    }
    h3 {
        font-size: 1.8em;
    }
    h4 {
        font-size: 1.3em;
    }
}

@media (max-width: 1200px) {
    .container {
        padding: 30px;
    }
}

@media (max-width: 1024px) {
    h1 {
        font-size: 2.2em;
    }
    h2 {
        font-size: 1.8em;
    }
}

@media (max-width: 768px) {
    h1 {
        font-size: 2em;
    }
    h2 {
        font-size: 1.5em;
    }
    .container {
        grid-template-columns: 1fr;
        padding: 20px;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 1.8em;
    }
    h2 {
        font-size: 1.2em;
    }
    p {
        padding: 0 10px;
    }
}

@media (max-width: 320px) {
    h1 {
        font-size: 1.5em;
    }
    h2 {
        font-size: 1em;
    }
    button {
        padding: 8px 16px;
        font-size: 0.9em;
    }
}

.code-preview {
    background: #1e1e1e;
    padding: 20px;
    border-radius: 8px;
    overflow-x: auto;
    margin-bottom: 30px;
}

.code-preview::before {
    content: 'CSS 示例代码';
    display: block;
    font-weight: bold;
    margin-bottom: 10px;
    color: #00ff99;
}

.code-preview pre {
    margin: 0;
    font-size: 0.9em;
}

.footer {
    text-align: center;
    padding: 20px;
    background: rgba(51, 0, 102, 0.8);
    color: #ffffff;
    position: fixed;
    width: 100%;
    bottom: 0;
}

.particles {
    position: fixed;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: -1;
    background: transparent;
}

.button-link {
    display: inline-block;
    margin: 10px 0;
}

.link-button {
    text-decoration: none;
}

.link-button:hover {
    text-decoration: none;
}


