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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f7fa;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* 头部样式 */
.header {
    background: linear-gradient(135deg, #15d065, #0ea452);
    color: white;
    padding: 0.5rem 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo {
    font-size: 1.3rem;
    font-weight: 600;
    text-align: center;
}

/* 轮播图样式 */
.carousel {
    position: relative;
    overflow: hidden;
    height: 200px;
    background: #f0f0f0;
}

.carousel-container {
    position: relative;
    height: 100%;
    display: flex;
    transition: transform 0.5s ease;
}

.carousel-item {
    min-width: 100%;
    height: 100%;
}

.carousel-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.carousel-prev,
.carousel-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.3);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    transition: all 0.3s ease;
    z-index: 20;
    opacity: 0.7;
}

.carousel-prev:hover,
.carousel-next:hover {
    background: rgba(0, 0, 0, 0.5);
    transform: translateY(-50%) scale(1.05);
    opacity: 1;
}

.carousel-prev {
    left: 15px;
}

.carousel-next {
    right: 15px;
}

.carousel-indicators {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
}

.indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    border: none;
    cursor: pointer;
    transition: background 0.3s;
}

.indicator.active {
    background: white;
}

/* 分类标签样式 */
.categories {
    padding: 1.5rem 0;
}

.category-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.category-tab {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    background: white;
    border-radius: 20px;
    color: #666;
    text-decoration: none;
    font-size: 0.9rem;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    transition: all 0.3s;
}

.category-tab i {
    margin-right: 6px;
    font-size: 0.9rem;
}

.category-tab:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.category-tab.active {
    background: #15d065;
    color: white;
}

/* 导航网格样式 */
.navigation-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    padding: 1rem 0 2rem;
}

.nav-item {
    display: flex;
    align-items: center;
    background: white;
    border-radius: 10px;
    padding: 15px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    transition: all 0.3s;
    text-decoration: none;
    color: inherit;
    overflow: hidden;
    position: relative;
}

.nav-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.nav-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: #15d065;
    transform: scaleY(0);
    transition: transform 0.3s;
}

.nav-item:hover::before {
    transform: scaleY(1);
}

.nav-icon {
    width: 60px;
    height: 60px;
    flex-shrink: 0;
    margin-right: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f5f7fa;
    border-radius: 10px;
    overflow: hidden;
}

.nav-icon img {
    width: 80%;
    height: 80%;
    object-fit: contain;
}

.nav-content {
    flex: 1;
    min-width: 0;
}

.nav-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.nav-description {
    font-size: 0.85rem;
    color: #666;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 空状态样式 */
.empty-state {
    text-align: center;
    padding: 3rem 0;
    color: #999;
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 1rem;
}

/* 页脚样式 */
.footer {
    background: #2c3e50;
    color: white;
    text-align: center;
    padding: 1.5rem 0;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .carousel {
        height: 150px;
    }
    
    .navigation-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 15px;
    }
    
    .nav-item {
        padding: 12px;
    }
    
    .nav-icon {
        width: 50px;
        height: 50px;
        margin-right: 12px;
    }
    
    .category-tabs {
        justify-content: flex-start;
        overflow-x: auto;
        padding-bottom: 5px;
        -webkit-overflow-scrolling: touch;
    }
    
    .category-tab {
        flex-shrink: 0;
    }
}

@media (max-width: 480px) {
    .navigation-grid {
        grid-template-columns: 1fr;
    }
    
    .logo {
        font-size: 1.2rem;
    }
}

/* 加载动画 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.nav-item {
    animation: fadeIn 0.5s ease forwards;
}

/* 导航项动画 - 为更多导航项提供动画延迟 */
.nav-item:nth-child(1) { animation-delay: 0.05s; }
.nav-item:nth-child(2) { animation-delay: 0.1s; }
.nav-item:nth-child(3) { animation-delay: 0.15s; }
.nav-item:nth-child(4) { animation-delay: 0.2s; }
.nav-item:nth-child(5) { animation-delay: 0.25s; }
.nav-item:nth-child(6) { animation-delay: 0.3s; }
.nav-item:nth-child(7) { animation-delay: 0.35s; }
.nav-item:nth-child(8) { animation-delay: 0.4s; }
.nav-item:nth-child(9) { animation-delay: 0.45s; }
.nav-item:nth-child(10) { animation-delay: 0.5s; }
.nav-item:nth-child(11) { animation-delay: 0.55s; }
.nav-item:nth-child(12) { animation-delay: 0.6s; }
.nav-item:nth-child(13) { animation-delay: 0.65s; }
.nav-item:nth-child(14) { animation-delay: 0.7s; }
.nav-item:nth-child(15) { animation-delay: 0.75s; }
.nav-item:nth-child(16) { animation-delay: 0.8s; }
.nav-item:nth-child(17) { animation-delay: 0.85s; }
.nav-item:nth-child(18) { animation-delay: 0.9s; }
.nav-item:nth-child(19) { animation-delay: 0.95s; }
.nav-item:nth-child(20) { animation-delay: 1s; }
.nav-item:nth-child(21) { animation-delay: 0.05s; }
.nav-item:nth-child(22) { animation-delay: 0.1s; }
.nav-item:nth-child(23) { animation-delay: 0.15s; }
.nav-item:nth-child(24) { animation-delay: 0.2s; }
.nav-item:nth-child(25) { animation-delay: 0.25s; }
.nav-item:nth-child(26) { animation-delay: 0.3s; }
.nav-item:nth-child(27) { animation-delay: 0.35s; }
.nav-item:nth-child(28) { animation-delay: 0.4s; }
.nav-item:nth-child(29) { animation-delay: 0.45s; }
.nav-item:nth-child(30) { animation-delay: 0.5s; }

/* 弹窗样式 */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal {
    background: white;
    border-radius: 10px;
    width: 90%;
    max-width: 500px;
    max-height: 80vh;
    overflow: auto;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.modal-overlay.active .modal {
    transform: scale(1);
}

.modal-header {
    padding: 1rem;
    border-bottom: 1px solid #eee;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #999;
    transition: color 0.2s;
}

.modal-close:hover {
    color: #333;
}

.modal-countdown {
    padding: 0.5rem 1rem;
    background: rgba(15, 212, 101, 0.1);
    text-align: center;
    font-size: 0.9rem;
    color: #15d065;
    font-weight: 500;
}

#countdown-timer {
    font-weight: bold;
    color: #0ea452;
}

.modal-body {
    padding: 1rem;
}

.modal-image {
    width: 100%;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.modal-content {
    font-size: 1rem;
    line-height: 1.6;
    color: #333;
}

.modal-footer {
    padding: 1rem;
    border-top: 1px solid #eee;
    text-align: right;
}

.modal-btn {
    background: #15d065;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    transition: background 0.2s;
}

.modal-btn:hover {
    background: #0ea452;
}

.modal-btn-close {
    background: #6c757d;
}

.modal-btn-close:hover {
    background: #5a6268;
}

/* 弹窗控制按钮样式 */
.popup-control-btn {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.popup-control-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-50%) scale(1.1);
}

/* 弹窗控制面板样式 */
.popup-control-panel {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1001;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.popup-control-panel.active {
    opacity: 1;
    visibility: visible;
}

.popup-control-content {
    background: white;
    border-radius: 10px;
    width: 90%;
    max-width: 400px;
    padding: 20px;
    position: relative;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.popup-control-panel.active .popup-control-content {
    transform: scale(1);
}

.popup-control-content h3 {
    margin-top: 0;
    margin-bottom: 20px;
    color: #333;
    text-align: center;
}

.control-group {
    margin-bottom: 20px;
}

.control-group label {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
    font-weight: 500;
    color: #555;
}

.control-group input[type="checkbox"] {
    width: auto;
    margin-right: 8px;
    padding: 0;
}

.control-group input[type="number"] {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
}

.close-panel-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #999;
    transition: color 0.2s;
}

.close-panel-btn:hover {
    color: #333;
}