@font-face {
    font-family: 'Smileysans';
    src: url('../font/SmileySans.woff2') format('woff2');
    font-weight: normal;
    font-style: normal;
}

body {
    margin: 0;
    padding: 0;
    background-image: url('../img/pc.png');
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
    background-attachment: fixed;
    min-height: 100vh;
}

@media (max-width: 768px) {
    body {
        background-image: url('../img/mob.png');
    }
}

.topbar {
    width: 100%;
    height: 60px;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    padding-left: 24px;
    padding-right: 10px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(20px) saturate(120%);
    -webkit-backdrop-filter: blur(20px) saturate(120%);
    border: none;
    border-bottom: 2px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 2px 16px rgba(0, 0, 0, 0.12);
    transition: box-shadow 0.3s ease, backdrop-filter 0.3s ease, -webkit-backdrop-filter 0.3s ease;
    font-size: 20px;
    color: #222;
    box-sizing: border-box;
}

#topbar-logo {
    transition: width 150ms ease, height 150ms ease, opacity 150ms ease;
    opacity: 1;
    height: auto;
    max-height: 100%;
    display: inline-block;
    vertical-align: middle;
}

.topbar-links {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 10px;
}

.topbar a {
    background: transparent;
    color: inherit;
    box-shadow: none;
    padding: 0;
    margin: 0 3px 0 0;
    border-radius: 0;
}

.topbar a:last-child {
    margin-right: 0;
}

.topbar a:hover,
.topbar a:focus {
    background: transparent;
    color: inherit;
    box-shadow: none;
    text-decoration: none;
}

.topbar button {
    background: #00000000;
    border: 0;
    cursor: pointer;
}

a {
    display: inline-block;
    margin: 4px 6px 4px 0;
    padding: 4px 10px;
    color: #fff;
    background: #009dff;
    border-radius: 12px;
    text-decoration: none;
    font-weight: bold;
    font-size: 15px;
    transition: background 0.2s, box-shadow 0.2s;
    box-shadow: 0 1px 4px rgba(255, 152, 0, 0.08);
    border: none;
    outline: none;
    cursor: pointer;
}

.title {
    position: static;
    width: 600px;
    padding: 48px 0 32px 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    box-shadow: 0 4px 32px rgba(0, 0, 0, 0.12);
    backdrop-filter: blur(26px) saturate(140%);
    -webkit-backdrop-filter: blur(24px) saturate(140%);
    border: 2px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 8px 5px rgb(0, 0, 0, 0.25);
    transition: box-shadow 0.3s ease, backdrop-filter 0.3s ease, -webkit-backdrop-filter 0.3s ease;
    margin: 25vh auto 0 auto;
}

.title:hover {
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.18);
    backdrop-filter: blur(12px) saturate(120%);
}

.title_img {
    max-width: 70%;
    max-height: 70%;
    object-fit: contain;
}

.title_text {
    font-family: 'Smileysans', Arial, sans-serif;
    font-size: 2.5rem;
    color: #008cff;
    text-align: center;
    margin-top: 15px;
    margin-bottom: 12px;
    letter-spacing: 0.5px;
    user-select: none;
}

/* 瀑布流容器 - 电脑端相对定位，移动端自动降级 */
.sections {
    margin-top: 32px;
    padding: 0 40px 32px 40px;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    position: relative;
}

/* 移动端：单列普通文档流 */
@media (max-width: 899px) {
    .sections {
        margin-top: 220px;
        padding: 0 20px 24px 20px;
        position: static;
    }
    .section-card {
        position: static !important;
        width: 100% !important;
        margin-bottom: 18px;
    }
}

@media (max-width: 600px) {
    .sections {
        margin-top: 160px;
        padding: 0 16px 16px 16px;
    }
    .section-card {
        margin-bottom: 12px;
    }
}

/* 电脑端卡片样式 - 绝对定位由 JS 控制 */
@media (min-width: 900px) {
    .sections {
        position: relative;
    }
    .section-card {
        position: absolute;
        width: calc(50% - 16px);
        margin-bottom: 0;
        transition: box-shadow 0.3s ease, backdrop-filter 0.3s ease;
        display: grid !important;
        grid-template-columns: 110px 1fr !important;
        align-items: start !important;
    }
    .section-card.no-img {
        display: grid !important;
        padding-left: 22px;
        grid-template-columns: 1fr !important;
    }
    .section-card.no-img .section-info {
        padding-left: 0;
    }
    
    .section-card.no-img .section-info {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }
    
    /* 确保标题和链接正常显示 */
    .section-card.no-img .section-title,
    .section-card.no-img .section-subtitle,
    .section-card.no-img .section-link {
        width: 100%;
        box-sizing: border-box;
    }
    
    /* 链接按钮不要被压缩 */
    .section-card.no-img .section-link {
        display: inline-flex;
        white-space: nowrap;
        width: auto;
        min-width: 100px;
    }
}

.section-card {
    display: grid;
    grid-template-columns: 110px 1fr;
    align-items: start;
    background: rgba(255, 255, 255, 0.18);
    border-radius: 16px;
    box-shadow: 0 2px 16px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px) saturate(120%);
    -webkit-backdrop-filter: blur(18px) saturate(120%);
    border: 2px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 8px 5px rgb(0, 0, 0, 0.25);
    padding: 16px 22px;
    min-height: 0;
    overflow: hidden;
    box-sizing: border-box;
    transition: box-shadow 0.3s ease, backdrop-filter 0.3s ease, -webkit-backdrop-filter 0.3s ease;
}

.section-card:hover {
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.18);
    backdrop-filter: blur(18px) saturate(120%);
}

.section-card.no-img {
    display: block;
    padding-left: 22px;
}

.section-card.no-img .section-info {
    padding-left: 0;
}

.section-img {
    width: 150px;
    height: 95px;
    object-fit: cover;
    border-radius: 12px;
    background: #eee;
    display: block;
    margin-right: 18px;
}

.section-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    padding: 0 18px 0 55px;
    min-width: 0;
    word-break: break-word;
    overflow-wrap: break-word;
}

.section-title {
    font-size: 1.25rem;
    font-weight: bold;
    color: #007cff;
    margin-bottom: 6px;
    font-family: 'Smileysans', Arial, sans-serif;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    overflow: hidden;
}

.section-subtitle {
    font-size: 1rem;
    color: #232323;
    margin-bottom: 8px;
    font-family: Arial, sans-serif;
    word-break: break-word;
    overflow-wrap: break-word;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    line-clamp: 4;
    overflow: hidden;
}

@media (max-width: 700px) {
    .title {
        width: 90vw;
        min-height: 140px;
        padding: 24px 0 18px 0;
    }
    .title_img {
        width: 90vw;
        height: 140px;
    }
    .section-subtitle {
        display: none;
    }
    .section-link {
        min-width: 120px;
        max-width: none;
        width: auto;
        box-sizing: border-box;
        text-align: center;
        padding: 8px 0;
        font-size: 16px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
}

.section-link {
    margin-top: 0;
    padding: 4px 18px;
    font-size: 15px;
    border-radius: 10px;
    background: #006eff;
    color: #fff;
    text-decoration: none;
    font-weight: bold;
    box-shadow: 0 3px 3px rgb(0, 110, 255, 0.25);
    display: inline-flex;
    align-items: center;
    gap: 1px;
    min-width: 60px;
    max-width: none;
    white-space: nowrap;
    transition: background 0.2s, box-shadow 0.2s;
}

.section-link:hover {
    background: #0064e7;
    box-shadow: 0 1px 5px rgb(0, 110, 255, 0.1);
}

.section-link img,
.section-link svg {
    margin-right: 5px;
    margin-bottom: -0.5px;
    vertical-align: -1px;
}

.footer {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    margin: 32px 0 16px 0;
    gap: 8px;
}

.footer a {
    background: transparent;
    color: #007cff;
    box-shadow: none;
    border-radius: 0;
    padding: 0 8px;
    margin: 0 2px;
    font-weight: bold;
    text-decoration: none;
    font-size: 15px;
    transition: color 0.2s;
}

.footer a:hover,
.footer a:focus {
    color: #003cff;
    text-decoration: underline;
    background: transparent;
    box-shadow: none;
}

@keyframes footerCursorFade {
    0% { opacity: 0; }
    50% { opacity: 1; }
    100% { opacity: 0; }
}

.footer-cursor-blink {
    animation: footerCursorFade 1.2s ease-in-out infinite;
}

.gradient-text {
    display: inline;
    background: linear-gradient(90deg, #07B9FF, #075EFF);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    -webkit-box-decoration-break: clone;
    box-decoration-break: clone;
    background-repeat: no-repeat;
}

.no-gradient {
    display: inline;
    background: none !important;
    -webkit-text-fill-color: initial !important;
    color: inherit !important;
    -webkit-background-clip: initial !important;
    background-clip: initial !important;
}