
/* Importing Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;600&family=Montserrat:wght@400;600&display=swap');

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

body {
    font-family: 'Montserrat', sans-serif;
    background: linear-gradient(135deg, #0f2027, #203a43, #2c5364);
    color: #ffffff;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Sidebar */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 220px;
    height: 100%;
    background: rgba(27, 30, 36, 0.9);
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    z-index: 1000;
}

.sidebar h1 {
    font-family: 'Poppins', sans-serif;
    font-size: 1.5rem;
    margin-bottom: 30px;
    color: #a29bfe;
}

.sidebar nav a {
    color: #ffffff;
    text-decoration: none;
    margin-bottom: 20px;
    font-size: 1rem;
    transition: color 0.3s ease;
}

.sidebar nav a:hover {
    color: #ff7675;
}

/* Main Content */
.main-content {
    margin-left: 220px;
    padding: 40px;
    background: rgba(255, 255, 255, 0.05);
    flex: 1;
    overflow-y: auto;
}

h2, h3 {
    font-family: 'Poppins', sans-serif;
    color: #ffeaa7;
    margin-bottom: 20px;
}

p {
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 20px;
    color: #dfe6e9;
}

pre {
    background: rgba(0, 0, 0, 0.6);
    padding: 15px;
    border-radius: 8px;
    overflow-x: auto;
    margin-bottom: 20px;
}

code {
    font-family: 'Montserrat', monospace;
    color: #81ecec;
    font-size: 0.95rem;
}

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

table, th, td {
    border: 1px solid #b2bec3;
}

th, td {
    padding: 12px;
    text-align: left;
}

th {
    background: #fdcb6e;
    color: #2d3436;
}

.button {
    background-color: #6c5ce7;
    color: #ffffff;
    border: none;
    padding: 10px 20px;
    cursor: pointer;
    border-radius: 5px;
    transition: all 0.3s ease;
    font-family: 'Montserrat', sans-serif;
}

.button:hover {
    transform: scale(1.1);
    background-color: #a29bfe;
}

/* Animation for Background */
@keyframes aurora-move {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.background-animation {
    background: radial-gradient(circle, rgba(255,87,34,1) 0%, rgba(255,87,34,0) 70%);
    animation: aurora-move 15s linear infinite;
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: -1;
}

/* Responsive Design */
@media (max-width: 1440px) {
    .main-content {
        padding: 30px;
    }
}

@media (max-width: 1200px) {
    .sidebar {
        width: 200px;
        padding: 15px;
    }

    .main-content {
        margin-left: 200px;
        padding: 25px;
    }
}

@media (max-width: 1024px) {
    .sidebar {
        width: 180px;
        padding: 10px;
    }

    .main-content {
        margin-left: 180px;
        padding: 20px;
    }
}

@media (max-width: 768px) {
    .sidebar {
        width: 160px;
        padding: 10px;
    }

    .main-content {
        margin-left: 160px;
        padding: 15px;
    }
}

@media (max-width: 480px) {
    .sidebar {
        display: none;
    }

    .main-content {
        margin-left: 0;
        padding: 10px;
    }

    h2 {
        font-size: 1.8rem;
    }

    h3 {
        font-size: 1.4rem;
    }

    p {
        font-size: 0.9rem;
    }
}

@media (max-width: 320px) {
    .main-content {
        padding: 5px;
    }

    h2 {
        font-size: 1.5rem;
    }

    h3 {
        font-size: 1.2rem;
    }

    p {
        font-size: 0.8rem;
    }
}

/* Image Styles */
img {
    width: 100%;
    height: auto;
    border-radius: 10px;
    margin-bottom: 20px;
}

/* Code Block Styling */
.code-block {
    background: rgba(0, 0, 0, 0.6);
    padding: 15px;
    border-radius: 8px;
    overflow-x: auto;
    margin-bottom: 20px;
}

.code-block code {
    font-family: 'Montserrat', monospace;
    color: #81ecec;
    font-size: 0.95rem;
}

/* Highlighting for示例展示区 */
.sample-display {
    background: rgba(44, 83, 100, 0.8);
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 40px;
}

.sample-display h2 {
    color: #ffeaa7;
}

.sample-display pre {
    background: rgba(0, 0, 0, 0.7);
    padding: 15px;
    border-radius: 8px;
    overflow-x: auto;
}

.sample-display table {
    background: rgba(255, 255, 255, 0.1);
    color: #dfe6e9;
}

.sample-display th {
    background: #fdcb6e;
    color: #2d3436;
}

