/* 前台样式 - 基于你提供的代码优化 */
:root {
    --primary-color: #ff3366;
    --secondary-color: #ff9900;
    --accent-color: #00cc66;
    --light-color: #ffffff;
    --light-bg: #f9f9ff;
    --medium-bg: #f0f2ff;
    --dark-text: #333366;
    --medium-text: #666699;
    --light-text: #8888aa;
    --shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
    --border-radius: 8px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Microsoft YaHei', 'PingFang SC', sans-serif;
}

body {
    background-color: var(--light-bg);
    color: var(--dark-text);
    min-height: 100vh;
    padding-bottom: 30px;
}

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

/* 轮播图样式 */
.carousel-section {
    margin: 15px 0 20px;
}

.carousel {
    width: 100%;
    height: 200px;
    overflow: hidden;
    position: relative;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

.carousel-slide {
    width: 100%;
    height: 100%;
    display: flex;
    transition: transform 0.8s ease-in-out;
}

.carousel-item {
    min-width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    font-weight: bold;
    color: white;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.8);
    position: relative;
}

.carousel-item::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.2));
}

.carousel-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 80%;
}

.carousel-title {
    font-size: 1.6rem;
    margin-bottom: 8px;
}

.carousel-desc {
    font-size: 1rem;
    opacity: 0.9;
}

.carousel-control {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.9);
    color: var(--primary-color);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 10;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
}

.carousel-control:hover {
    background: white;
    transform: translateY(-50%) scale(1.1);
}

.carousel-control.prev {
    left: 10px;
}

.carousel-control.next {
    right: 10px;
}

.carousel-dots {
    position: absolute;
    bottom: 15px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    gap: 8px;
}

.carousel-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.6);
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.3s ease;
}

.carousel-dot.active {
    background: var(--accent-color);
    border-color: white;
    transform: scale(1.2);
}

/* 滚动公告样式 */
.announcement {
    background: white;
    border-left: 4px solid var(--accent-color);
    padding: 12px 15px;
    margin: 15px 0;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    overflow: hidden;
}

.announcement-icon {
    color: var(--accent-color);
    font-size: 1.5rem;
    margin-right: 12px;
    flex-shrink: 0;
}

.announcement-text {
    flex: 1;
    overflow: hidden;
    white-space: nowrap;
}

.announcement-content {
    display: inline-block;
    padding-left: 100%;
    animation: scroll-text 25s linear infinite;
}

@keyframes scroll-text {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-100%);
    }
}

/* 分类导航样式 - 固定一行四个 */
.nav-tabs {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin: 20px 0 15px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--medium-bg);
}

.tab-btn {
    padding: 12px 5px;
    background: white;
    color: var(--medium-text);
    border: 1px solid var(--medium-bg);
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 600;
    transition: all 0.3s ease;
    text-align: center;
}

.tab-btn.active {
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    color: white;
    border-color: transparent;
    box-shadow: var(--shadow);
}

.tab-btn:hover:not(.active) {
    background: var(--medium-bg);
    color: var(--dark-text);
}

/* 导航项目样式 - 一行两个排列 */
.nav-items {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-top: 15px;
}

.nav-item {
    background: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 15px;
    position: relative;
    border: 1px solid #f0f0f0;
}

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

/* 正方形logo - 缩小 */
.item-logo {
    width: 70px;
    height: 70px;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
    font-size: 1.8rem;
    color: white;
    box-shadow: 0 3px 8px rgba(255, 51, 102, 0.2);
    overflow: hidden;
    border: 3px solid white;
    outline: 1px solid #f0f0f0;
}

.item-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 5px;
}

.item-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--accent-color);
    color: white;
    font-size: 0.7rem;
    padding: 3px 8px;
    border-radius: 12px;
    font-weight: bold;
}

.item-title {
    font-size: 1.2rem;
    margin-bottom: 8px;
    text-align: center;
    color: var(--dark-text);
    line-height: 1.3;
}

.item-desc {
    text-align: center;
    color: var(--medium-text);
    margin-bottom: 15px;
    line-height: 1.4;
    flex-grow: 1;
    font-size: 0.85rem;
    min-height: 40px;
}

/* 呼吸式跳动按钮 - 缩小 */
.enter-btn {
    background: linear-gradient(to right, var(--accent-color), #00cc99);
    color: white;
    border: none;
    padding: 10px 25px;
    font-size: 1rem;
    border-radius: 20px;
    cursor: pointer;
    font-weight: bold;
    letter-spacing: 0.5px;
    box-shadow: 0 3px 8px rgba(0, 204, 102, 0.3);
    position: relative;
    overflow: hidden;
    animation: breath 2s infinite alternate;
    transition: all 0.3s ease;
    width: 100%;
    max-width: 180px;
}

@keyframes breath {
    0% {
        transform: scale(1);
        box-shadow: 0 3px 8px rgba(0, 204, 102, 0.3);
    }
    100% {
        transform: scale(1.03);
        box-shadow: 0 5px 12px rgba(0, 204, 102, 0.5);
    }
}

.enter-btn:hover {
    background: linear-gradient(to right, #00dd77, #00ddaa);
    animation: none;
    transform: scale(1.03);
    box-shadow: 0 5px 12px rgba(0, 204, 102, 0.5);
}

.enter-btn::after {
    content: '→';
    margin-left: 5px;
}

/* 底部版权信息 */
footer {
    background: linear-gradient(to right, #333366, #444477);
    text-align: center;
    padding: 12px 0;
    margin-top: 40px;
    border-top: 1px solid #555588;
}

.copyright {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.8rem;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .carousel {
        height: 160px;
    }
    
    .carousel-title {
        font-size: 1.3rem;
    }
    
    .carousel-desc {
        font-size: 0.85rem;
    }
    
    .carousel-control {
        width: 35px;
        height: 35px;
        font-size: 1.2rem;
    }
    
    .nav-tabs {
        grid-template-columns: repeat(4, 1fr);
        gap: 8px;
    }
    
    .tab-btn {
        padding: 10px 3px;
        font-size: 0.85rem;
    }
    
    .nav-items {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .nav-item {
        padding: 12px;
    }
    
    .item-logo {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }
    
    .item-title {
        font-size: 1.1rem;
    }
    
    .item-desc {
        font-size: 0.8rem;
    }
    
    .enter-btn {
        padding: 8px 20px;
        font-size: 0.9rem;
        max-width: 160px;
    }
}

@media (max-width: 480px) {
    .carousel {
        height: 140px;
    }
    
    .carousel-title {
        font-size: 1.1rem;
    }
    
    .carousel-desc {
        font-size: 0.8rem;
    }
    
    .carousel-control {
        width: 30px;
        height: 30px;
        font-size: 1rem;
    }
    
    .nav-tabs {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
        margin-bottom: 10px;
    }
    
    .nav-items {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .nav-item {
        padding: 10px;
    }
    
    .item-logo {
        width: 55px;
        height: 55px;
        font-size: 1.4rem;
    }
    
    .item-title {
        font-size: 1rem;
    }
    
    .item-desc {
        font-size: 0.75rem;
        min-height: 35px;
    }
    
    .enter-btn {
        padding: 7px 15px;
        font-size: 0.85rem;
        max-width: 140px;
    }
    
    .announcement {
        padding: 10px 12px;
    }
    
    .announcement-icon {
        font-size: 1.2rem;
        margin-right: 8px;
    }
    
    footer {
        padding: 10px 0;
        margin-top: 30px;
    }
}

/* 空状态提示 */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--medium-text);
}

.empty-state i {
    margin-bottom: 15px;
    opacity: 0.5;
}

.empty-state p {
    font-size: 1.1rem;
}

/* 后台链接（前台右下角） */
.admin-link {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: var(--primary-color);
    color: white;
    padding: 10px 15px;
    border-radius: 20px;
    text-decoration: none;
    font-size: 0.9rem;
    box-shadow: 0 3px 10px rgba(255, 51, 102, 0.3);
    transition: all 0.3s;
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 8px;
}

.admin-link:hover {
    background: #ff1a53;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 51, 102, 0.4);
}