* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    background-color: #000;
    color: #fff;
}

.top-menu {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(0,0,0,0.95);
    z-index: 1000;
    border-bottom: 1px solid #333;
}

.menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: rgba(0,0,0,0.9);
}

.menu-header h3 {
    color: #fff;
    font-size: 18px;
    margin: 0;
}

.menu-toggle {
    background: #007acc;
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 5px;
    font-size: 18px;
    cursor: pointer;
    min-width: 40px;
}

.menu-items {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 10px;
    padding: 15px;
    max-height: 70vh;
    overflow-y: auto;
}

.menu-items.hidden {
    display: none;
}

.menu-item {
    background: #333;
    color: #fff;
    border: none;
    padding: 15px 10px;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    text-align: center;
    transition: all 0.3s ease;
}

.menu-item:hover {
    background: #555;
}

.menu-item.active {
    background: #007acc;
}

.gallery-container {
    width: 100vw;
    height: 100vh;
    display: flex;
    flex-direction: column;
    padding-top: 60px; /* 为固定菜单留出空间 */
}

.current-category {
    position: fixed;
    top: 15px;
    left: 20px;
    background: rgba(0,0,0,0.8);
    color: #007acc;
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 14px;
    z-index: 999;
}

.image-display {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden;
    touch-action: pan-x pan-y; /* 禁用双击缩放 */
}

.image-display img {
    max-width: 90%;
    max-height: 85%;
    object-fit: contain;
    touch-action: none; /* 禁用图片的触摸操作 */
}

.image-info {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(0,0,0,0.7);
    padding: 10px;
    border-radius: 5px;
    font-size: 14px;
}

.controls {
    padding: 15px;
    background: rgba(0,0,0,0.8);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-btn {
    background: #007acc;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 5px;
    font-size: 16px;
    min-width: 80px;
}

.nav-btn:disabled {
    background: #555;
    color: #999;
}

.counter {
    font-size: 16px;
    text-align: center;
}

.no-images {
    text-align: center;
    font-size: 18px;
    color: #999;
}

/* 移动端优化 */
@media (max-width: 768px) {
    .image-display img {
        max-width: 85%;
        max-height: 80%;
    }
    
    .controls {
        padding: 20px 15px;
        background: rgba(0,0,0,0.9);
    }
    
    .nav-btn {
        padding: 15px 25px;
        font-size: 18px;
        min-width: 90px;
    }
}

@media (max-width: 480px) {
    .image-display img {
        max-width: 80%;
        max-height: 75%;
    }
    
    .nav-btn {
        padding: 12px 20px;
        font-size: 16px;
        min-width: 80px;
    }
}
