@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap');

body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f4f4f4;
    color: #333;
    min-height: 100vh;
    position: relative;
}

header {
    background-color: #333;
    color: #fff;
    padding: 10px 0;
    text-align: center;
    position: relative;
}

nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

nav ul li {
    display: inline-block;
    margin: 0 15px;
}

nav ul li a {
    color: #fff;
    text-decoration: none;
    font-weight: bold;
}

main {
    padding: 20px 20px 80px;
}

footer {
    background-color: #333;
    color: #fff;
    text-align: center;
    padding: 10px 0;
    position: fixed;
    width: 100%;
    bottom: 0;
}

.download-section {
    margin: 15px auto;
    max-width: 90%;
    padding: 15px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: opacity 0.3s ease;
}

.download-button {
    display: inline-block;
    padding: 10px 20px;
    background-color: #007BFF;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-size: 0.95rem;
    transition: background-color 0.2s;
}

.download-button:hover {
    background-color: #0069d9;
}

.download-note {
    font-size: 0.95rem;
    color: #555;
    margin-top: 10px;
}

/* ===== SPLASH样式 ===== */
.splash {
    position: absolute;
    top: 40px;
    right: 50px;
    transform: skewX(-25deg) rotate(-15deg);
    color: yellow;
    font-family: 'Press Start 2P', 'Microsoft YaHei', sans-serif;
    font-size: 18px;
    animation: splash-pulse 0.8s infinite;
    pointer-events: none;
    text-shadow: 2px 2px #000;
    z-index: 999;
    will-change: transform;
    backface-visibility: hidden;
    transition: opacity 0.1s ease;
    white-space: nowrap;
}

@keyframes splash-pulse {

    0%,
    100% {
        transform: skewX(-25deg) rotate(-15deg) scale(1);
    }

    50% {
        transform: skewX(-25deg) rotate(-15deg) scale(1.15);
    }
}

.splash-hidden {
    opacity: 0 !important;
    pointer-events: none !important;
}

/* 字体大小自适应 */
.splash[data-text-length="7"],
.splash[data-text-length="8"],
.splash[data-text-length="9"],
.splash[data-text-length="10"] {
    font-size: 18px;
}

.splash[data-text-length="11"],
.splash[data-text-length="12"],
.splash[data-text-length="13"],
.splash[data-text-length="14"],
.splash[data-text-length="15"] {
    font-size: 16px;
}

.splash[data-text-length="16"],
.splash[data-text-length="17"],
.splash[data-text-length="18"],
.splash[data-text-length="19"],
.splash[data-text-length="20"] {
    font-size: 14px;
}

.splash[data-text-length="21"],
.splash[data-text-length="22"],
.splash[data-text-length="23"],
.splash[data-text-length="24"],
.splash[data-text-length="25"] {
    font-size: 13px;
}

.splash[data-text-length="26"],
.splash[data-text-length="27"],
.splash[data-text-length="28"],
.splash[data-text-length="29"],
.splash[data-text-length="30"] {
    font-size: 12px;
}

/* 分类选择器样式 - 优化文字间距 */
.category-filter {
    display: flex;
    justify-content: center;
    margin: 10px 0 15px;
    padding: 12px 0;
    background-color: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    flex-wrap: wrap;
    /* 允许在小屏幕上换行 */
}

.category-item {
    margin: 0 12px;
    cursor: pointer;
    font-size: 1.1rem;
    color: #6c757d;
    transition: all 0.3s ease;
    padding: 5px 0;
    position: relative;
    white-space: nowrap;
    /* 防止文字换行 */
    letter-spacing: 0.5px;
    /* 增加字母间距 */
}

.category-item:hover {
    color: #495057;
}

.category-item.active {
    color: #007bff;
    font-size: 1.3rem;
    font-weight: bold;
    letter-spacing: 0.8px;
    /* 激活状态增加更多间距 */
}

/* 添加底部指示条 */
.category-item.active::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: #007bff;
    border-radius: 2px;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .category-filter {
        padding: 10px 0;
    }

    .category-item {
        margin: 0 10px;
        font-size: 1rem;
    }

    .category-item.active {
        font-size: 1.1rem;
    }
}

@media (max-width: 480px) {
    .category-item {
        margin: 0 8px;
        font-size: 0.9rem;
        padding: 3px 0;
    }

    .category-item.active {
        font-size: 1rem;
    }

    /* 在小屏幕上减少分类项数量或调整布局 */
    .category-filter {
        justify-content: space-around;
    }
}