* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

a{
    text-decoration: none;
}

body {
    font-family: 'Arial', sans-serif;
    background-color: #f5f5f5;
    padding-top: 20px;
}

.main-box {
    background-color: #f5f5f5;
    min-height: 100vh;
}

nav {
    width: 80%;
    max-width: 1200px;
    height: 80px;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: #fff;
    padding: 0 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

nav > img {
    width: 80px;
    cursor: pointer;
}

nav > input {
    flex: 1;
    margin-left: 50px;
    height: 40px;
    border-radius: 5px;
    border: 1px solid #ccc;
    padding-left: 10px;
    transition: all 0.3s ease;
}

nav > input:focus {
    outline: none;
    border-color: #409eff;
    box-shadow: 0 0 0 2px rgba(64, 158, 255, 0.2);
}

main {
    width: 80%;
    max-width: 1200px;
    margin: 0 auto 20px;
}

/* 标题部分美化 */
.title-section {
    font-size: 30px;
    background: linear-gradient(45deg, #ff6b6b, #4ecdc4, #45b7d1, #96ceb4);
    background-size: 300% 300%;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    margin-bottom: 30px;
    animation: gradientTransition 5s ease infinite;
    color: white;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    transition: all 0.3s ease;
}

@keyframes gradientTransition {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* 内容部分美化 */
.content-section {
    background-color: #fff;
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
}

.content-section h2 {
    margin: 20px 0;
    padding: 15px 0;
    border-bottom: 2px solid #eee;
}

.content-section p {
    margin: 15px 0;
    line-height: 1.8;
    font-size: 16px;
    text-indent: 2em;
    background-color: rgba(176, 171, 171, 0.11);
    border-radius: 8px;
    padding: 20px;
    transition: all 0.3s ease;
}

.content-section p:hover {
    background-color: rgba(176, 171, 171, 0.41);
    transform: translateY(-3px);
}

.content-section a {
    color: #45b7d1;
    padding: 10px;
    border-radius: 4px;
    transition: all 0.3s ease;
    display: block;
    background-color: rgba(176, 171, 171, 0.11);
}

.content-section a:hover {
    background-color: rgba(69, 183, 209, 0.2);
    color: white;
}

.content-section img {
    border-radius: 8px;
    margin: 15px 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    display: block;
    transition: all 0.3s ease;
}

.content-section img:hover {
    transform: scale(1.1);
    box-shadow: 0 5px 20px rgba(0,0,0,0.2);
}

.image-container {
    text-align: center;
    margin: 20px 0;
}

.image-wrapper {
    position: relative;
    display: inline-block;
    width: 100%;
    max-width: 800px;
    min-height: 200px;
    border-radius: 8px;
    overflow: hidden;
}

.image-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(120deg, #e5e5e5 30%, #f5f5f5 50%, #e5e5e5 70%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: opacity 0.3s ease;
}

.image-placeholder::after {
    content: "图片加载中...";
    color: #999;
    font-size: 16px;
    font-weight: 500;
}

.image-placeholder.hidden {
    opacity: 0;
    pointer-events: none;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

.image-container img {
    max-width: 100%;
    height: auto;
    display: none;
    border-radius: 8px;
}

.image-container img.loaded {
    display: block;
}

/* 图片预览蒙版 */
.image-preview-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.image-preview-overlay.active {
    opacity: 1;
    visibility: visible;
}

.image-preview-overlay img {
    max-width: 90%;
    max-height: 90%;
    border-radius: 8px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.image-preview-overlay.active img {
    transform: scale(1);
}

.image-preview-overlay .close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    color: white;
    font-size: 30px;
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.1);
    transition: background-color 0.3s ease;
}

.image-preview-overlay .close-btn:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.content-section .image-container p {
    text-align: center;
    color: #666;
    font-style: italic;
    margin-top: 10px;
    background-color: #fff;
    padding: 0;
    text-indent: 0;
}

.content-section .image-container p:hover {
    transform: translateY(0);
}

.content-section video {
    border-radius: 8px;
    margin: 15px 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.content-section pre {
    background-color: #f8f9fa;
    border-radius: 5px;
    padding: 15px;
    overflow-x: auto;
    margin: 20px 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05) inset;
}

.code-container{
    position: relative;
}

.copy-button {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: #f0f0f0;
    border: none;
    border-radius: 4px;
    padding: 5px 10px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.3s ease;
    z-index: 10;
}

.copy-button:hover {
    background-color: #e0e0e0;
}

.copy-button.copied {
    background-color: #4caf50;
    color: white;
}

/* 推荐部分美化 */
.recommend-section {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 30px;
}

.recommend-card {
    flex: 1;
    background-color: #fff;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    cursor: pointer;
}

.recommend-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
}

.recommend-card:first-child {
    margin-right: 10px;
}

.recommend-card:last-child {
    margin-left: 10px;
}

.recommend-card h3 {
    color: #45b7d1;
    margin-bottom: 10px;
}

.recommend-card p {
    color: #666;
}

.top-up {
    position: fixed;
    right: 5%;
    bottom: -60px;
    cursor: pointer;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    background-color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.5s ease-in-out;
}

.top-up.show {
    bottom: 50px;
}

.top-up:hover {
    background-color: #f0f0f0;
}

.top-up > img {
    width: 30px;
}

.font-style{
    font-family: '杨任东竹石体-Light', Arial, sans-serif;
}

@font-face {
    font-family: '演示春风楷';
    src: url('../font/演示春风楷.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: '杨任东竹石体-Light';
    src: url('../font/杨任东竹石体-Light.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: '杨任东竹石体-Bold';
    src: url('../font/杨任东竹石体-Bold.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}