* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Microsoft Yahei", "PingFang SC", Roboto, sans-serif;
}

body {
    background-color: #f4f9ff;
    color: #2c3e50;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
}


/*----------------*/
/* 轮播板块移动端调整 */
@media (max-width: 768px) {
    .site-name {
        font-size: 17px;
        padding-left: 8px;
    }

    .login-btn {
        padding: 6px 9px !important;
    }

    .carousel-track-horizontal {
        display: grid !important;
        grid-template-columns: 1fr 1fr;
        gap: 15px;
        transform: none !important;
        transition: none !important;
    }

    .carousel-item-card {
        flex: auto !important;
        width: 100%;
        margin: 0;
    }

    .carousel-items-container {
        overflow: visible;
    }

    /* 隐藏原轮播的滚动效果，直接展示grid */
    .carousel-track-horizontal {
        display: grid;
    }
}

/* 其他样式保持不变 */
.hero-carousel {
    width: 100%;
    overflow: hidden;
    position: relative;
    background: #1e3a5f;
}

.hero-slides-wrapper {
    display: flex;
    transition: transform 0.5s ease;
}

.hero-slide {
    flex: 0 0 100%;
    height: 440px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    position: relative;
}

.hero-caption {
    background: rgba(0, 0, 0, 0.6);
    color: white;
    width: 100%;
    padding: 12px 20px;
    text-align: center;
    backdrop-filter: blur(4px);
    font-size: 1rem;
    font-weight: 500;
}

.hero-caption p {
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.hero-caption .theme-text {
    font-style: italic;
    font-size: 0.85rem;
    margin-top: 10px;
    opacity: 0.9;
    font-weight: normal;
}

.carousel-controls {
    position: absolute;
    top: 50%;
    width: 100%;
    display: flex;
    justify-content: space-between;
    transform: translateY(-50%);
    padding: 0 20px;
    z-index: 10;
}

.carousel-btn {
    background: rgba(0, 0, 0, 0.5);
    border: none;
    color: white;
    font-size: 2rem;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    cursor: pointer;
    transition: 0.2s;
}

.container-tio {
    max-width: 1500px;
    margin: 30px auto;
    padding: 0 15px;
}

.content-wrapper-news {
    background: white;
    border-radius: 24px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    margin-bottom: 40px;
    min-height: 430px;
}

.tabset-header {
    display: flex;
    flex-wrap: wrap;
    background: #fff;
    border-bottom: 1px solid #e2e8f0;
    padding: 0 20px;
}

.tabset-trigger {
    padding: 16px 20px;
    font-size: 18px;
    font-weight: bold;
    background: transparent;
    border: none;
    color: #4a5568;
    cursor: pointer;
    transition: 0.2s;
    position: relative;
}

.tabset-trigger.aktiv {
    color: #1e88e5;
}

.tabset-trigger.aktiv::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: #1e88e5;
}

.tabset-content {
    display: none;
    padding: 24px;
    gap: 30px;
    flex-wrap: wrap;
}

.tabset-content.aktiv {
    display: flex;
}

.karussel-container {
    flex: 1.2;
    min-width: 280px;
    overflow: hidden;
    border-radius: 20px;
    position: relative;
    background: #f1f5f9;
}

.karussel-bilder {
    display: flex;
    transition: transform 0.5s ease;
}

.karussel-bild {
    flex: 0 0 100%;
    height: 320px;
    background-size: cover;
    background-position: center;
    position: relative;
    display: flex;
    align-items: flex-end;
}

.slide-text {
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.7), transparent);
    color: white;
    width: 100%;
    padding: 12px;
    font-size: 16px;
    font-weight: normal;
}

.info-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.info-element {
    background: #f8fafc;
    border-left: 4px solid #cbd5e1;
    padding: 15px 16px;
    border-radius: 12px;
    transition: 0.2s;
    cursor: pointer;
}

.info-element.aktuell {
    border-left-color: #1e88e5;
    background: #eef5ff;
}

.info-element.highlight {
    border-left-color: #1e88e5 !important;
    border-left-width: 6px !important;
    background-color: #eef5ff;
}

.info-element.highlight .info-titel {
    font-weight: bold;
    color: #1e88e5;
}

.info-element.highlight .info-datum {
    font-weight: 500;
    color: #1e88e5;
}

.info-datum {
    font-size: 16px;
    color: #64748b;
}

.info-titel {
    font-weight: normal;
    font-size: 16px;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.karussel-nav {
    position: absolute;
    top: 50%;
    width: 100%;
    display: flex;
    justify-content: space-between;
    transform: translateY(-50%);
    padding: 0 8px;
}

.karussel-nav button {
    background: rgba(0, 0, 0, 0.5);
    border: none;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
}

.science-row {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    margin: 40px 0;
}

.science-card {
    flex: 1;
    background: white;
    border-radius: 28px;
    padding: 20px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
}

.science-card h3 {
    font-size: 18px;
    font-weight: bold;
    color: #0a2f5a;
    border-left: 5px solid #1e88e5;
    padding-left: 15px;
    margin-bottom: 20px;
}

.content-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.content-item {
    padding: 12px 0;
    height: 65px;
    border-bottom: 1px solid #edf2f7;
}

.content-title {
    gap: 12px;
    align-items: baseline;
    font-size: 16px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.content-time {
    color: #1e88e5;
    font-size: 16px;
    white-space: nowrap;
}

.tab-more {
    display: inline-block;
    margin-top: 10px;
    color: #1e88e5;
    font-weight: 500;
    font-size: 16px;
}

/*轮播板块基础样式 */
.carousel-row {
    background: white;
    border-radius: 28px;
    padding: 20px 16px;
    margin-bottom: 30px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
}

.carousel-row h4 {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 16px;
    padding-left: 12px;
    border-left: 5px solid #1e88e5;
}

.carousel-items-container {
    overflow: hidden;
}

.carousel-track-horizontal {
    display: flex;
    transition: transform 0.5s ease;
    gap: 20px;
}

.carousel-item-card {
    flex: 0 0 calc(16.666% - 17px);
    min-width: 140px;
    background: #fff;
    border-radius: 20px;
    text-align: center;
    padding: 12px 6px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.carousel-item-card img {
    width: 100%;
    height: 100px;
    object-fit: contain;
    border-radius: 12px;
    margin-bottom: 8px;
    background: #fff;
    display: block;
}

.carousel-item-card span {
    display: block;
    font-size: 16px;
    font-weight: normal;
}

@media (max-width: 1200px) and (min-width: 769px) {
    .carousel-item-card {
        flex: 0 0 calc(33.333% - 14px);
    }
}

.floating-buttons {
    position: fixed;
    right: 20px;
    bottom: 150px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.xenoblade-floater {
    position: fixed;
    left: 1px;
    top: 60%;
    transform: translateY(-50%);
    width: 160px;
    height: 60px;
    background-image: url('/beetl/static/img/tio/logo.png');
    background-size: contain;
    background-position: left;
    background-repeat: no-repeat;
    background-color: dodgerblue;
    border-radius: 12px;
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
    overflow: hidden;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(74, 163, 255, 0.3);
}

.xenoblade-floater .floater-text {
    color: white;
    font-size: 20px;
    font-weight: 700;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
    letter-spacing: 2px;
    padding-left: 60px;
}

.xenoblade-floater:hover {
    transform: translateY(-50%) scale(1.05);
}

#noticeContainer {
    position: fixed;
    right: 5px;
    top: 40%;
    transform: translateY(-50%);
    z-index: 50;
    display: flex;
    justify-content: flex-end;
}

#collapseBtn {
    display: none;
    width: 50px;
    height: 100px;
    background-color: #0066cc;
    color: #ffffff;
    border-radius: 0.5rem;
    border: none;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    font-weight: 500;
    padding: 5px;
    letter-spacing: 3px;
    box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
    flex-shrink: 0;
    writing-mode: vertical-rl;
    text-orientation: upright;
}

#collapseBtn:not(.hidden) {
    display: flex !important;
}

#noticePanel {
    width: 300px;
    background-color: #ffffff;
    border-radius: 12px;
    box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
    overflow: hidden;
    flex-shrink: 0;
}

.notice-header {
    background-color: #0066cc;
    color: #ffffff;
    padding: 10px 15px;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.notice-header .sub-text {
    font-size: 15px;
    opacity: 0.8;
}

#noticeListWrapper {
    height: 250px;
    overflow: hidden;
}

#noticeList {
    list-style: none;
    padding: 0;
    margin: 0;
    transition: transform 0.3s ease-out;
}

#noticeList li {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #e5e6eb;
}

.notice-content {
    color: #444;
    font-size: 16px;
    display: block;
}

.notice-time {
    font-size: 16px;
    color: #444;
    margin-right: 8px;
}

.notice-footer {
    border-top: #ddd solid 1px;
    display: flex;
    justify-content: center;
    padding: 10px 15px;
    margin-top: 15px;
}

#closeBtn {
    padding: 5px 10px;
    color: #444;
    border: none;
    background: none;
    cursor: pointer;
    font-size: 16px;
}

.hidden {
    display: none !important;
}

.drawer-panel {
    position: fixed;
    right: -380px;
    top: 0;
    width: 380px;
    height: 100vh;
    background: white;
    box-shadow: -5px 0 20px rgba(0, 0, 0, 0.2);
    z-index: 1100;
    transition: right 0.3s ease;
    display: flex;
    flex-direction: column;
    padding: 20px;
}

.drawer-panel.open {
    right: 0;
}

.drawer-header {
    display: flex;
    justify-content: space-between;
    font-weight: bold;
    font-size: 1.3rem;
    border-bottom: 1px solid #ddd;
    padding-bottom: 12px;
}

.ai-placeholder {
    margin-top: 30px;
    background: #f0f7ff;
    border-radius: 24px;
    padding: 40px 20px;
    text-align: center;
    color: #1e88e5;
    font-size: 16px;
}

.ai-assistant-btn {
    background: #1e88e5;
    width: 56px;
    height: 56px;
    border-radius: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.8rem;
    cursor: pointer;
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.2);
    transition: 0.2s;
}

footer {
    background: #0a2f5a;
    color: #ccc;
    margin-top: 40px;
}

.container-footer {
    max-width: 1500px;
    margin: 0 auto;
    padding: 30px 20px;
}

.footer-links-title {
    font-size: 18px;
    font-weight: bold;
    color: #fff;
    margin-bottom: 12px;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 20px 108px;
    margin-bottom: 20px;
    text-align: center;
    align-items: center;
    justify-content: center;
}

.footer-links a {
    color: #ddd;
    font-size: 16px;
}

.footer-links a:hover {
    color: #0066cc;
}

.footer-info {
    text-align: center;
    border-top: 1px solid #2c5a7a;
    padding-top: 20px;
    font-size: 16px;
}

@media (max-width: 1024px) {
    .hero-slide {
        height: 300px;
    }

    .container-tio {
        padding: 0 15px;
    }
}

@media (max-width: 768px) {
    .xenoblade-floater {
        display: none;
    }

    #noticeContainer {
        display: none;
    }

    .hero-slide {
        height: 220px;
    }

    .tabset-trigger {
        padding: 12px 8px;
        font-size: 14px;
    }

    .karussel-container {
        min-width: 220px;
    }
}