
/* 全局样式 */
body {
    margin: 0;
    padding: 0;
    font-family: 'Montserrat', sans-serif;
    background: linear-gradient(135deg, #4e54c8, #8f94fb);
    color: #ffffff;
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    animation: gradientAnimation 15s ease infinite;
}

@keyframes gradientAnimation {
    0% {
        background: linear-gradient(135deg, #4e54c8, #8f94fb);
    }
    50% {
        background: radial-gradient(circle, #3dccc0, #ff7a5c);
    }
    100% {
        background: linear-gradient(135deg, #8f94fb, #4e54c8);
    }
}

header {
    padding: 20px;
    text-align: center;
    background: rgba(0, 0, 0, 0.5);
}

header h1 {
    font-size: 2.5rem;
    margin: 0;
    background: -webkit-linear-gradient(#4e54c8, #8f94fb);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

main {
    flex: 1;
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
}

section {
    margin-bottom: 40px;
}

h2, h3, h4 {
    font-family: 'Roboto', sans-serif;
    color: #ffffff;
}

h2 {
    font-size: 2rem;
    margin-bottom: 20px;
    border-bottom: 2px solid #ffffff;
    padding-bottom: 10px;
}

h3 {
    font-size: 1.5rem;
    margin-top: 30px;
}

h4 {
    font-size: 1.2rem;
    margin-top: 20px;
}

p {
    font-size: 1rem;
    color: #e0e0e0;
}

pre {
    background: #2c2c2c;
    padding: 15px;
    border-radius: 10px;
    overflow-x: auto;
    margin: 20px 0;
}

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

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

th, td {
    border: 1px solid #ffffff;
    padding: 10px;
    text-align: center;
}

th {
    background: #4e54c8;
}

tr:nth-child(even) {
    background: rgba(255, 255, 255, 0.1);
}

button {
    background: linear-gradient(135deg, #4e54c8, #8f94fb);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 25px;
    cursor: pointer;
    transition: background 0.3s ease;
    font-size: 1rem;
}

button:hover {
    background: linear-gradient(135deg, #8f94fb, #4e54c8);
}

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

.card {
    background: linear-gradient(135deg, #3dccc0, #ff7a5c);
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease;
}

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

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

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

@media (max-width: 1440px) {
    header h1 {
        font-size: 2.2rem;
    }
    h2 {
        font-size: 1.8rem;
    }
}

@media (max-width: 1200px) {
    main {
        padding: 15px;
    }
    h1 {
        font-size: 2rem;
    }
}

@media (max-width: 1024px) {
    .container {
        grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    }
}

@media (max-width: 768px) {
    body {
        padding: 10px;
    }
    h2 {
        font-size: 1.6rem;
    }
}

@media (max-width: 480px) {
    header h1 {
        font-size: 1.8rem;
    }
    h2 {
        font-size: 1.4rem;
    }
    p, code {
        font-size: 0.9rem;
    }
}

@media (max-width: 320px) {
    header h1 {
        font-size: 1.5rem;
    }
    h2 {
        font-size: 1.2rem;
    }
}

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

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

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

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

.navbar a {
    color: #ffffff;
    text-decoration: none;
    font-size: 1rem;
    transition: color 0.3s ease;
}

.navbar a:hover {
    color: #00ffcc;
}

.gradient-text {
    background: -webkit-linear-gradient(#4e54c8, #8f94fb);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.feature-list {
    list-style: none;
    padding: 0;
}

.feature-list li {
    background: rgba(255, 255, 255, 0.1);
    margin: 10px 0;
    padding: 10px;
    border-radius: 10px;
}

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

.modal {
    display: none; 
    position: fixed; 
    z-index: 10; 
    padding-top: 100px; 
    left: 0;
    top: 0;
    width: 100%; 
    height: 100%; 
    overflow: auto; 
    background-color: rgba(0,0,0,0.8); 
}

.modal-content {
    background-color: #fefefe;
    margin: auto;
    padding: 20px;
    border: 1px solid #888;
    width: 80%;
    border-radius: 15px;
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover,
.close:focus {
    color: black;
}

.alert {
    padding: 20px;
    background-color: #4e54c8;
    color: white;
    margin-bottom: 15px;
    border-radius: 10px;
}

.alert.success {background-color: #4CAF50;}
.alert.info {background-color: #2196F3;}
.alert.warning {background-color: #ff9800;}
.alert.error {background-color: #f44336;}

.loader {
    border: 16px solid #f3f3f3;
    border-top: 16px solid #4e54c8;
    border-radius: 50%;
    width: 120px;
    height: 120px;
    animation: spin 2s linear infinite;
    margin: 0 auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.carousel {
    display: flex;
    overflow-x: scroll;
    scroll-snap-type: x mandatory;
}

.carousel img {
    scroll-snap-align: center;
    flex-shrink: 0;
    width: 320px;
    height: 320px;
    margin-right: 20px;
    border-radius: 10px;
}

blockquote {
    border-left: 5px solid #8f94fb;
    padding-left: 15px;
    color: #d1d1d1;
    font-style: italic;
}

