/* 重置样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #000;
    color: #fff;
    overflow: hidden;
    user-select: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
}

/* 页面容器 */
.page {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: none;
    flex-direction: column;
}

.page.active {
    display: flex;
}

/* 首页样式 */
#homePage {
    position: relative;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    background: #000;
    min-height: 100vh;
    min-width: 100vw;
}

.countdown {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.9);
    color: #333;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: bold;
    z-index: 20;
}

.home-image {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    object-fit: cover;
    z-index: 1;
    display: block;
    background: linear-gradient(45deg, #667eea, #764ba2);
}

.enter-btn {
    position: absolute;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 255, 255, 0.9);
    color: #333;
    border: none;
    padding: 15px 30px;
    border-radius: 25px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    z-index: 20;
    transition: all 0.3s ease;
}

.enter-btn:active {
    transform: translateX(-50%) scale(0.95);
    background: rgba(255, 255, 255, 0.7);
}

/* 目录页面样式 */
#catalogPage {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    padding: 20px;
}

.catalog-header {
    text-align: center;
    margin-bottom: 30px;
}

.catalog-header h1 {
    font-size: 28px;
    color: #fff;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    font-weight: 600;
    letter-spacing: 1px;
}

.catalog-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex: 1;
    overflow-y: auto;
    padding-bottom: 20px;
}


.catalog-item {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    padding: 12px 16px;
    min-height: 60px;
}

.catalog-item.clickable {
    cursor: pointer;
}

.catalog-item.clickable:active {
    transform: scale(0.95);
    background: rgba(255, 255, 255, 0.7);
}

.catalog-item.non-clickable {
    cursor: default;
    opacity: 0.8;
}

.catalog-item img {
    width: 100%;
    height: 70%;
    object-fit: cover;
    border-radius: 12px;
    margin-bottom: 8px;
}

.catalog-item .item-name {
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    padding: 6px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    text-align: center;
    width: 100%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.catalog-item .item-name.no-image {
    font-size: 16px;
    font-weight: 600;
    padding: 0;
    background: none;
    border-radius: 0;
    box-shadow: none;
    color: #333;
    text-align: center;
    width: 100%;
}

/* 分类标题样式 */
.category-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 16px 0 8px 0;
    padding: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    position: relative;
    overflow: hidden;
    min-height: 50px;
}

.category-title {
    background: rgba(255, 255, 255, 0.9);
    color: #333;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    text-align: center;
    width: 100%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}


/* 响应式设计 */
@media (max-width: 480px) {
    .catalog-grid {
        gap: 10px;
    }
    
    .catalog-item {
        min-height: 50px;
        padding: 10px 12px;
    }
    
    .catalog-item .item-name {
        font-size: 11px;
        padding: 4px 8px;
    }
    
    .category-header {
        min-height: 45px;
        padding: 12px;
        margin: 12px 0 6px 0;
    }
    
    .category-title {
        font-size: 14px;
        padding: 6px 12px;
    }
    
    .catalog-item .item-name.no-image {
        font-size: 14px;
        padding: 0;
    }
    
    .catalog-header h1 {
        font-size: 24px;
    }
}

/* 滚动条样式 */
.catalog-grid::-webkit-scrollbar {
    width: 4px;
}

.catalog-grid::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
}

.catalog-grid::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
}

.catalog-grid::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}
