
/* 引入Google字体 */
@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;700&family=Roboto:wght@400;700&display=swap');

/* 全局样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', sans-serif;
    background: linear-gradient(135deg, #1e3c72, #2a5298);
    color: #ffffff;
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Orbitron', sans-serif;
    color: #ff77ff;
    margin-bottom: 20px;
}

p {
    margin-bottom: 20px;
}

a {
    color: #ff77ff;
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: #ffffff;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 0;
}

.header {
    text-align: center;
    padding: 60px 0;
    background: linear-gradient(135deg, #000046, #1CB5E0);
    border-radius: 10px;
    margin-bottom: 40px;
}

.header h1 {
    font-size: 3em;
    margin-bottom: 20px;
}

.header p {
    font-size: 1.2em;
}

.section {
    margin-bottom: 60px;
}

.section-title {
    font-size: 2.5em;
    margin-bottom: 20px;
    text-align: center;
    position: relative;
}

.section-title::after {
    content: '';
    width: 100px;
    height: 4px;
    background: #ff77ff;
    display: block;
    margin: 10px auto 0;
    border-radius: 2px;
}

.article {
    background: rgba(255, 255, 255, 0.1);
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.3);
}

.article h2 {
    font-size: 2em;
    margin-bottom: 15px;
}

.article p {
    font-size: 1em;
    margin-bottom: 15px;
}

.article pre {
    background: #2a2a2a;
    padding: 15px;
    border-radius: 5px;
    overflow-x: auto;
}

.article code {
    color: #ff77ff;
    font-family: 'Courier New', Courier, monospace;
}

.table-responsive {
    overflow-x: auto;
}

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

table th, table td {
    padding: 12px 15px;
    border: 1px solid #ffffff;
    text-align: left;
}

table th {
    background: #ff77ff;
}

.image-gallery {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
}

.image-gallery img {
    width: 100%;
    max-width: 320px;
    border-radius: 10px;
    transition: transform 0.3s ease;
}

.image-gallery img:hover {
    transform: scale(1.05);
}

.footer {
    text-align: center;
    padding: 20px 0;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 10px;
}

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

.code-preview pre {
    margin: 0;
    font-family: 'Courier New', Courier, monospace;
    color: #00ff00;
}

@media (max-width: 1440px) {
    .header h1 {
        font-size: 2.5em;
    }
}

@media (max-width: 1200px) {
    .container {
        width: 95%;
    }
}

@media (max-width: 1024px) {
    .image-gallery {
        flex-direction: column;
        align-items: center;
    }
}

@media (max-width: 768px) {
    .header h1 {
        font-size: 2em;
    }
    .section-title {
        font-size: 2em;
    }
}

@media (max-width: 480px) {
    .header p, .article p, .article h2, .section-title {
        font-size: 1em;
    }
}

@media (max-width: 320px) {
    .header h1 {
        font-size: 1.5em;
    }
    .section-title {
        font-size: 1.5em;
    }
}

button, .button {
    background: #ff77ff;
    color: #ffffff;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s ease;
}

button:hover, .button:hover {
    background: #e066e0;
}

.navbar {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 40px;
}

.navbar a {
    font-size: 1em;
}

.parallax {
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    height: 50vh;
    border-radius: 10px;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.animate-fadeIn {
    animation: fadeIn 2s ease-in-out;
}

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

.card {
    background: rgba(255, 255, 255, 0.1);
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    transition: transform 0.3s ease;
}

.card:hover {
    transform: translateY(-10px);
}

.icon {
    width: 60px;
    height: 60px;
    background-color: #ff77ff;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 15px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.icon:hover {
    transform: scale(1.1);
    box-shadow: 0 10px 20px rgba(255, 119, 255, 0.5);
}

@media (prefers-reduced-motion: reduce) {
    * {
        animation: none !important;
        transition: none !important;
    }
}

