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

body {
    font-family: Arial, sans-serif;
    background-color: #ffffff;
    color: #000000;
    line-height: 1.6;
}

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

/* 顶部导航栏 */
.top-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    background-color: #ffffff;
    border-bottom: 1px solid #e0e0e0;
}

.logo-section {
    display: flex;
    align-items: center;
}

.logo {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    margin-right: 10px;
}

.site-title {
    font-size: 18px;
    font-weight: bold;
    color: #000000;
}

.share-btn {
    background-color: #000000;
    color: #ffffff;
    border: none;
    border-radius: 20px;
    padding: 8px 16px;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    transition: all 0.3s ease;
}

.share-btn:hover {
    background-color: #333333;
}

.share-btn i {
    margin-right: 5px;
}

/* 主横幅和轮播图 */
.banner {
    margin: 20px auto;
    text-align: center;
}

.banner img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* 现代轮播图样式 */
.modern-carousel {
    position: relative;
    width: 100%;
    max-width: 1200px;
    margin: 20px auto;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    height: 600px;
    padding: 0;
    border: none;
    background: transparent;
    cursor: grab;
    user-select: none;
}

/* 拖拽时的光标样式 */
.modern-carousel:active {
    cursor: grabbing;
}

/* 轮播容器 */
.carousel-container {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    padding: 0;
    margin: 0;
}

/* 轮播项 */
.carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    visibility: hidden;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1;
}

.carousel-slide.active {
    opacity: 1;
    visibility: visible;
    z-index: 2;
}

/* 轮播图片 */
.carousel-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 10px;
    transition: transform 0.5s ease;
    display: block;
    padding: 0;
    margin: 0;
}

/* 轮播链接 */
.carousel-link {
    display: block;
    width: 100%;
    height: 100%;
    padding: 0;
    margin: 0;
    text-decoration: none;
    cursor: pointer;
}

/* 轮播控制按钮 */
.carousel-control {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    width: 50px;
    height: 50px;
    background-color: rgba(0, 0, 0, 0.3);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    opacity: 0.7;
    padding: 0;
    margin: 0 20px;
}

.carousel-control:hover {
    background-color: rgba(0, 0, 0, 0.6);
    opacity: 1;
    transform: translateY(-50%) scale(1.1);
}

.carousel-control-prev {
    left: 0;
}

.carousel-control-next {
    right: 0;
}

/* 轮播箭头 */
.carousel-arrow {
    font-size: 24px;
    font-weight: bold;
    line-height: 1;
    color: white;
    font-family: sans-serif;
}

/* 轮播指示器 */
.carousel-dots {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    display: flex;
    gap: 10px;
    padding: 0;
    margin: 0;
}

.carousel-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.5);
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
    margin: 0;
}

.carousel-dot.active {
    background-color: white;
    transform: scale(1.3);
}

/* 轮播动画效果 */
@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(-100%);
        opacity: 0;
    }
}

.carousel-slide.active {
    animation: slideIn 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.carousel-slide:not(.active) {
    animation: slideOut 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 默认横幅样式 */
.banner {
    width: 100%;
    max-width: 1200px;
    margin: 20px auto;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.banner-image {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 10px;
    transition: transform 0.5s ease;
}

/* 响应式设计 */
@media (max-width: 1200px) {
    .modern-carousel,
    .banner {
        margin: 15px auto;
        max-width: 95%;
    }
    
    .modern-carousel {
        height: 500px;
    }
}

@media (max-width: 992px) {
    .modern-carousel {
        height: 400px;
    }
    
    .carousel-control {
        width: 45px;
        height: 45px;
        margin: 0 15px;
        font-size: 24px;
    }
    
    .carousel-arrow {
        font-size: 20px;
    }
    
    .carousel-dot {
        width: 10px;
        height: 10px;
    }
    
    /* 平板端保持居中显示 */
    .nav-buttons {
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .modern-carousel {
        height: 300px;
        margin: 10px auto;
        border-radius: 8px;
    }
    
    .banner {
        margin: 10px auto;
        border-radius: 8px;
    }
    
    .carousel-control {
        width: 40px;
        height: 40px;
        margin: 0 10px;
        font-size: 20px;
    }
    
    .carousel-arrow {
        font-size: 18px;
    }
    
    .carousel-dots {
        bottom: 15px;
        gap: 8px;
    }
    
    .carousel-dot {
        width: 8px;
        height: 8px;
    }
}

@media (max-width: 576px) {
    .modern-carousel {
        height: 250px;
        border-radius: 6px;
    }
    
    .banner {
        border-radius: 6px;
    }
    
    .carousel-control {
        width: 35px;
        height: 35px;
        margin: 0 8px;
    }
    
    .carousel-arrow {
        font-size: 16px;
    }
    
    .carousel-dots {
        bottom: 10px;
        gap: 6px;
    }
    
    .carousel-dot {
        width: 8px;
        height: 8px;
    }
}

/* 确保没有默认样式干扰 */
.modern-carousel * {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    border: none;
    outline: none;
}

/* 移除Bootstrap相关样式的干扰 */
.carousel,
.carousel-inner,
.carousel-item,
.carousel-indicators,
.carousel-control-prev,
.carousel-control-next,
.carousel-control-prev-icon,
.carousel-control-next-icon,
.sr-only {
    display: none !important;
}

/* 平滑过渡 */
* {
    transition-property: all;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

/* 禁用图片拖拽 */
.carousel-image {
    user-select: none;
    -webkit-user-drag: none;
    -khtml-user-drag: none;
    -moz-user-drag: none;
    -o-user-drag: none;
}

/* 滚动公告栏 */
.site-bar {
    background-color: #000000;
    color: #ffffff;
    text-align: center;
    padding: 10px 0;
    margin: 20px 0;
    border-radius: 25px;
    box-shadow: 0 0 10px rgba(255, 0, 0, 0.5);
    animation: glow 1.5s ease-in-out infinite alternate;
    overflow: hidden;
}

@keyframes glow {
    from {
        box-shadow: 0 0 10px rgba(255, 0, 0, 0.5);
    }
    to {
        box-shadow: 0 0 20px rgba(255, 0, 0, 0.8), 0 0 30px rgba(255, 0, 0, 0.5);
    }
}

.marquee-container {
    width: 100%;
    overflow: hidden;
    position: relative;
    height: 40px;
    display: flex;
    align-items: center;
    background-color: #000;
}

.marquee-content {
    display: inline-block;
    white-space: nowrap;
    font-size: 24px;
    font-weight: bold;
    margin: 0;
    background: linear-gradient(90deg, #ff0000, #00ff00, #0000ff, #ff0000);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-size: 400% 400%;
    animation: gradient 3s ease infinite, marquee 20s linear infinite;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
}

@keyframes marquee {
    0% {
        left: 100%;
        transform: translateY(-50%);
    }
    100% {
        left: -100%;
        transform: translateY(-50%);
    }
}

/* 鼠标悬停时暂停滚动 */
.marquee-container:hover .marquee-content {
    animation-play-state: paused;
}

/* 导航按钮组 */
.nav-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin: 20px 0;
    overflow-x: auto;
    overflow-y: hidden;
    white-space: nowrap;
    padding: 0 10px;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

/* 隐藏滚动条但保留滚动功能 */
.nav-buttons::-webkit-scrollbar {
    display: none;
}

.nav-buttons {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.nav-btn {
    background-color: #000000;
    color: #ffffff;
    border: none;
    border-radius: 25px;
    padding: 10px 25px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.nav-btn.outline {
    background-color: #ffffff;
    color: #000000;
    border: 2px solid #000000;
}

.nav-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* 卡片区域 */
.cards-section {
    margin: 30px auto;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    width: 100%;
    max-width: 1200px;
}

/* 重新设计的链接卡片 */
.card {
    background: #ffffff;
    border: 1px solid #e8e8e8;
    border-radius: 16px;
    padding: 20px;
    margin: 0;
    max-width: 100%;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
    position: relative;
    height: 100%;
    min-height: 120px;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    text-align: left;
}

/* 卡片悬停效果 */
.card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
    border-color: #d0d0d0;
}

/* 卡片左侧内容 */
.card-content {
    display: flex;
    align-items: flex-start;
    flex: 1;
    gap: 16px;
    justify-content: flex-start;
}

/* 网站图标 */
.card-icon {
    width: 80px;
    height: 80px;
    border-radius: 6px;
    object-fit: cover;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    background: #ffffff;
    border: 1px solid #f0f0f0;
    flex-shrink: 0;
}

/* 网站信息 */
.card-info {
    flex: 1;
    min-width: 0;
    text-align: left;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
}

.card-info h3 {
    font-size: 18px;
    font-weight: 700;
    margin: 0 0 6px 0;
    color: #222222;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.card-info p {
    font-size: 14px;
    color: #666666;
    margin: 0 0 4px 0;
    line-height: 1.4;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* 访问按钮 */
.visit-btn {
    background: #000000;
    color: #ffffff;
    border: none;
    border-radius: 6px;
    padding: 10px 24px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    align-self: center;
    margin-left: auto;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.15);
    flex-shrink: 0;
}

/* 按钮悬停效果 */
.visit-btn:hover {
    background: #333333;
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.2);
}

/* 按钮点击效果 */
.visit-btn:active {
    transform: translateY(0);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* 响应式设计 */
@media (max-width: 767px) {
    .cards-section {
        margin: 20px auto;
        gap: 16px;
        max-width: 90%;
        grid-template-columns: 1fr;
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    
    .card {
        padding: 16px;
        margin: 0 auto;
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        max-width: 400px;
        width: 100%;
        text-align: left;
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
        transform: translateY(0);
        transition: all 0.3s ease;
    }
    
    .card:hover {
        box-shadow: 0 12px 32px rgba(0, 0, 0, 0.18);
        transform: translateY(-4px);
    }
    
    .card-content {
        width: 100%;
        gap: 14px;
        justify-content: flex-start;
    }
    
    .card-icon {
        width: 70px;
        height: 70px;
    }
    
    .card-info h3 {
        font-size: 17px;
        text-align: left;
    }
    
    .card-info p {
        font-size: 13px;
        text-align: left;
    }
    
    .visit-btn {
        width: 100%;
        padding: 12px 20px;
        margin-left: 0;
    }
}

@media (max-width: 480px) {
    .cards-section {
        margin: 16px auto;
        gap: 16px;
        max-width: 90%;
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    
    .card {
        padding: 14px;
        margin: 0 auto;
        max-width: 350px;
        width: 100%;
        text-align: left;
        border-radius: 12px;
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
        transform: translateY(0);
        transition: all 0.3s ease;
    }
    
    .card:hover {
        box-shadow: 0 12px 32px rgba(0, 0, 0, 0.18);
        transform: translateY(-4px);
    }
    
    .card-content {
        gap: 12px;
        justify-content: flex-start;
    }
    
    .card-icon {
        width: 60px;
        height: 60px;
        border-radius: 4px;
    }
    
    .card-info h3 {
        font-size: 16px;
        text-align: left;
    }
    
    .card-info p {
        font-size: 12px;
        text-align: left;
    }
    
    .visit-btn {
        padding: 10px 18px;
        font-size: 13px;
    }
}

/* 响应式设计 */
@media (max-width: 768px) {
    /* 全局缩小适配手机端 */
    html {
        font-size: 14px;
    }
    
    .top-nav {
        padding: 5px 10px;
    }
    
    .logo {
        width: 36px;
        height: 36px;
        margin-right: 8px;
    }
    
    .site-title {
        font-size: 16px;
    }
    
    .share-btn {
        padding: 6px 12px;
        font-size: 12px;
    }
    
    /* 轮播图适配 */
    #carouselExample {
        height: 400px;
    }
    
    /* 滚动公告栏适配 */
    .marquee-container {
        height: 30px;
    }
    
    .marquee-content {
        font-size: 18px;
    }
    
    /* 导航按钮组适配 */
    .nav-buttons {
        gap: 10px;
        margin: 15px 0;
        justify-content: flex-start;
    }
    
    .nav-btn {
        padding: 8px 20px;
        font-size: 14px;
    }
    
    /* 卡片区域适配 */
    .cards-section {
        margin: 20px auto;
        gap: 16px;
        max-width: 90%;
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    
    .card {
        padding: 15px;
        margin: 0 auto;
        max-width: 400px;
        width: 100%;
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
        transform: translateY(0);
        transition: all 0.3s ease;
    }
    
    .card:hover {
        box-shadow: 0 12px 32px rgba(0, 0, 0, 0.18);
        transform: translateY(-4px);
    }
    
    .card-icon {
        width: 60px;
        height: 60px;
        margin-right: 15px;
    }
    
    .card-info h3 {
        font-size: 16px;
    }
    
    .card-info p {
        font-size: 14px;
    }
    
    .visit-btn {
        padding: 6px 16px;
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    /* 进一步缩小适配小屏手机 */
    html {
        font-size: 12px;
    }
    
    /* 轮播图适配 */
    #carouselExample {
        height: 300px;
    }
    
    /* 滚动公告栏适配 */
    .marquee-content {
        font-size: 16px;
    }
    
    /* 导航按钮组适配 */
    .nav-buttons {
        gap: 8px;
        margin: 10px 0;
    }
    
    .nav-btn {
        padding: 6px 15px;
        font-size: 12px;
    }
    
    /* 卡片区域适配 */
    .card {
        padding: 12px;
        margin: 0 auto;
        max-width: 350px;
        width: 100%;
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
        transform: translateY(0);
        transition: all 0.3s ease;
    }
    
    .card:hover {
        box-shadow: 0 12px 32px rgba(0, 0, 0, 0.18);
        transform: translateY(-4px);
    }
    
    .card-icon {
        width: 50px;
        height: 50px;
        margin-right: 12px;
    }
    
    .card-info h3 {
        font-size: 14px;
    }
    
    .card-info p {
        font-size: 12px;
    }
    
    .visit-btn {
        padding: 5px 12px;
        font-size: 11px;
    }
}