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

h1, h2, h3, h4 {
    font-family: 'Montserrat', sans-serif;
    font-weight: bold;
    color: #ffffff;
    margin-top: 20px;
    margin-bottom: 10px;
}

p {
    font-family: 'Roboto', sans-serif;
    color: #d0d0d0;
    margin-bottom: 15px;
}

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

a:hover {
    color: #4f6ef7;
}

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

.header {
    background: linear-gradient(90deg, #1e3c72, #2a5298);
    padding: 20px 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.header::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('https://images.gptkong.com/demo/sample1.png') no-repeat center center;
    background-size: cover;
    opacity: 0.2;
    animation: moveBackground 10s linear infinite;
}

@keyframes moveBackground {
    0% { transform: translateX(0); }
    100% { transform: translateX(-100%); }
}

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

.navbar a {
    font-size: 18px;
    position: relative;
}

.navbar a::after {
    content: '';
    display: block;
    width: 0;
    height: 2px;
    background: #a142f4;
    transition: width 0.3s;
}

.navbar a:hover::after {
    width: 100%;
}

.main {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    margin-top: 40px;
}

.sidebar {
    flex: 1 1 300px;
}

.content {
    flex: 2 1 600px;
}

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

.card:hover {
    transform: scale(1.05);
    background: rgba(255, 255, 255, 0.2);
}

.icon {
    width: 50px;
    height: 50px;
    margin-bottom: 15px;
}

.icon-shield {
    background: radial-gradient(circle, #4f6ef7, #a142f4);
    mask: url('https://images.gptkong.com/demo/sample2.png') no-repeat center;
    mask-size: cover;
}

.icon-lock {
    background: radial-gradient(circle, #a142f4, #4f6ef7);
    mask: url('https://images.gptkong.com/demo/sample3.png') no-repeat center;
    mask-size: cover;
}

.article {
    background: rgba(255, 255, 255, 0.1);
    padding: 20px;
    border-radius: 10px;
    margin-top: 40px;
}

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

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

.footer {
    background: linear-gradient(90deg, #2a5298, #1e3c72);
    text-align: center;
    padding: 20px 0;
    margin-top: 60px;
    position: relative;
}

.footer::before {
    content: '';
    position: absolute;
    top: -50px;
    left: 50%;
    transform: translateX(-50%);
    width: 120px;
    height: 120px;
    background: url('https://images.gptkong.com/demo/sample4.png') no-repeat center center;
    background-size: cover;
    border-radius: 50%;
    opacity: 0.3;
    animation: rotateIcon 20s linear infinite;
}

@keyframes rotateIcon {
    from { transform: translateX(-50%) rotate(0deg); }
    to { transform: translateX(-50%) rotate(360deg); }
}

.button {
    background: linear-gradient(to right, #4f6ef7, #a142f4);
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: transform 0.3s ease-in-out, background 0.3s ease;
}

.button:hover {
    transform: scale(1.1);
    background: linear-gradient(to right, #a142f4, #4f6ef7);
}

@media (max-width: 1440px) {
    .main {
        gap: 30px;
    }
}

@media (max-width: 1200px) {
    .navbar a {
        font-size: 16px;
    }
}

@media (max-width: 1024px) {
    .sidebar, .content {
        flex: 1 1 100%;
    }

    .header {
        padding: 15px 0;
    }
}

@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
        gap: 15px;
    }

    .header::after {
        background-size: contain;
    }
}

@media (max-width: 480px) {
    .button {
        width: 100%;
        padding: 15px 0;
        font-size: 16px;
    }

    .icon {
        width: 40px;
        height: 40px;
    }
}

@media (max-width: 320px) {
    .header {
        padding: 10px 0;
    }

    h1 {
        font-size: 24px;
    }

    h2 {
        font-size: 20px;
    }

    .navbar a {
        font-size: 14px;
    }
}

.gradient-background {
    background: linear-gradient(135deg, #1e3c72, #2a5298, #a142f4);
    animation: gradientMove 15s ease infinite;
    background-size: 400% 400%;
}

@keyframes gradientMove {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.code-highlight {
    background: #2a5298;
    padding: 10px;
    border-radius: 5px;
    overflow-x: auto;
}

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

.image-decor {
    width: 100%;
    max-width: 320px;
    height: auto;
    border-radius: 10px;
    margin-bottom: 20px;
}

.tooltip {
    position: relative;
    display: inline-block;
    cursor: pointer;
}

.tooltip .tooltiptext {
    visibility: hidden;
    width: 200px;
    background-color: rgba(0,0,0,0.7);
    color: #fff;
    text-align: center;
    border-radius: 6px;
    padding: 10px;
    position: absolute;
    z-index: 1;
    bottom: 125%; 
    left: 50%;
    margin-left: -100px;
    opacity: 0;
    transition: opacity 0.3s;
}

.tooltip:hover .tooltiptext {
    visibility: visible;
    opacity: 1;
}

@media (max-width: 768px) {
    .tooltip .tooltiptext {
        width: 150px;
        margin-left: -75px;
    }
}

