@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@400;500;700&display=swap');

:root {
    --primary-color: rgba(255, 255, 255, 0.15);
    --secondary-color: #000;
    --accent-color: #007bff;
    --text-color: #fff;
    --bg-color: rgba(255, 255, 255, 0.1);
    --card-bg: rgba(255, 255, 255, 0.1);
    --shadow: 0 4px 8px rgba(0,0,0,0.3);
    --border-radius: 16px;
    --element-radius: 8px;
}

/* 基础样式 */
body {
    font-family: 'Noto Sans SC', sans-serif;
    margin: 0;
    background-color: var(--secondary-color);
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
}

/* 滚动条隐藏 */
::-webkit-scrollbar {
    display: none;
}

* {
    scrollbar-width: none;
    -ms-overflow-style: none;
}
/* 页眉 */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    background-color: var(--bg-color);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    position: sticky;
    top: 1rem;
    z-index: 100;
    max-width: 1370px;
    margin: 0 auto;
    width: 95%;
}

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

.logo img {
    height: 40px;
    margin-right: 10px;
}

.logo h1 {
    font-size: 2rem;
    margin: 0;
    letter-spacing: 1px;
}

.search-bar {
    display: flex;
}

.search-bar input {
    padding: 0.75rem 1rem;
    border: none;
    border-radius: 50px 0 0 50px;
    min-width: 300px;
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--text-color);
    outline: none;
}

.search-bar button {
    padding: 0.75rem 1.5rem;
    border: none;
    background-color: #fff;
    color: #000;
    border-radius: 0 50px 50px 0;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.search-bar button:hover {
    background-color: #e0e0e0;
}

.container-wrapper {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1rem;
    min-height: calc(100vh - 200px);
    height: auto;
}

.container {
    display: flex;
    margin: 2rem 0;
    gap: 2rem;
    width: 100%;
    min-height: 600px;
    height: auto;
}

.sidebar {
    width: 240px;
    background-color: var(--bg-color);
    padding: 1rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: width 0.3s ease;
    min-height: 600px;
    height: auto;
}

.sidebar nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.sidebar nav ul li a {
    display: flex;
    align-items: center;
    padding: 1rem;
    color: var(--text-color);
    text-decoration: none;
    border-radius: var(--border-radius);
    transition: all 0.3s ease;
    background-color: rgba(255, 255, 255, 0.1);
    height: 60px;
    position: relative;
    overflow: hidden;
    gap: 1rem;
}

.sidebar nav ul li a:hover,
.sidebar nav ul li a.active {
    background-color: #fff;
    color: #000;
}

.sidebar nav ul li a span {
    display: inline-block;
    font-size: 1rem;
}

.sidebar nav ul li a i {
    font-size: 1.5rem;
    min-width: 24px;
    text-align: center;
}

.main-content {
    flex: 1;
    transition: margin-left 0.3s ease;
    max-width: calc(100% - 260px);
    min-height: 600px;
}

.section-title {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
}



.software-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-top: 1rem;
    justify-items: center;
}

.software-card {
    background-color: var(--card-bg);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    padding: 0.8rem;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    width: 100%;
    min-width: 200px;
    max-width: 100%;
    height: 100%;
    box-sizing: border-box;
    justify-content: space-between;
}

.software-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.4);
    background-color: rgba(255, 255, 255, 0.15);
}

.software-card .icon {
    width: 100%;
    height: 150px;
    object-fit: cover;
    margin-bottom: 0.8rem;
    mask-image: linear-gradient(to bottom, rgba(0,0,0,1) 75%, rgba(0,0,0,0));
    -webkit-mask-image: linear-gradient(to bottom, rgba(0,0,0,1) 75%, rgba(0,0,0,0));
    border-radius: 8px;
    background-color: rgba(255, 255, 255, 0.1);
}

/* SVG图标特殊处理 */
.software-card .icon[src$=".svg"] {
    background-color: transparent;
    object-fit: contain;
}

.software-card h3 {
    margin: 0 0 0.5rem 0;
    font-size: 1.2rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.software-card p {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.4;
    flex: 0 0 auto;
    height: 3.2rem;
}

.software-card .btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background-color: #fff;
    color: #000;
    text-decoration: none;
    text-align: center;
    transition: all 0.3s ease;
    font-weight: 500;
    width: 50%;
    height: 50px;
    box-sizing: border-box;
    border: none;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1;
}

/* 新页面按钮样式 */
.software-card .btn.full-width {
    width: 100%;
    display: block;
    margin-bottom: 0.5rem;
}

.software-card .btn.save {
    background-color: rgba(255, 255, 255, 0.2);
    color: #fff;
    border-radius: var(--element-radius) 0 0 var(--element-radius);
    display: flex;
    align-items: center;
    justify-content: center;
}

.software-card .btn.save:hover {
    background-color: rgba(255, 255, 255, 0.3);
}

.software-card .btn-group {
    display: flex;
    width: 100%;
    overflow: hidden;
    border-radius: var(--element-radius);
    transition: all 0.3s ease;
    flex-direction: column; /* 垂直排列按钮 */
}

.software-card .btn:not(.save) {
    border-radius: 0 var(--element-radius) var(--element-radius) 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.software-card .btn:not(.save):hover {
    background-color: #fff;
    color: #000;
}

/* 单个按钮占满宽度 */
.software-card .btn.single {
    width: 100%;
    border-radius: var(--element-radius);
}

.software-card .btn:hover {
    background-color: #e0e0e0;
    transform: scale(1.05);
    z-index: 1;
}

.software-card .btn-group:hover .btn:not(:hover) {
    transform: scale(0.95);
}

/* 特殊方块样式 */
.software-card.special.clickable-block {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    box-sizing: border-box;
    padding: 2rem 1.5rem 1rem;
    background-color: rgba(255, 255, 255, 0.08);
    min-height: 280px;
}

.special-block-content {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    height: 100%;
}

.special-block-text {
    text-align: center;
    margin-bottom: 1rem;
}

.special-block-text p {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1.5;
    color: #fff;
    margin: 0;
    display: block !important;
    -webkit-line-clamp: unset !important;
    -webkit-box-orient: unset !important;
    overflow: visible !important;
    text-overflow: unset !important;
    height: auto !important;
}

.special-block-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    width: 100%;
}

.special-btn {
    flex: 1;
    padding: 0.75rem 1rem;
    background-color: #fff;
    color: #000;
    border-radius: 50px;
    text-decoration: none;
    text-align: center;
    font-weight: 500;
    transition: all 0.3s ease;
    min-width: 120px;
}

.special-btn:hover {
    background-color: #e0e0e0;
    transform: translateY(-2px);
}

/* 轮播图上方文字 */
.carousel-header {
    text-align: center;
    margin-bottom: 20px;
    color: white;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: none;
    border-radius: 16px;
    padding: 15px 20px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.carousel-title-above {
    font-size: 2.5rem;
    font-weight: bold;
    margin-bottom: 10px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    color: white;
}

.carousel-subtitle {
    font-size: 1.2rem;
    opacity: 0.8;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
    color: white;
}

/* 轮播图样式 */
.carousel-container {
    position: relative;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto 40px;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    aspect-ratio: 2/1;
}

.carousel-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
}

.carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
    cursor: pointer;
}

.carousel-slide.active {
    opacity: 1;
}

.carousel-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.carousel-bg-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: blur(8px);
    transform: scale(1.1);
}

.carousel-gradient {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to left, 
        rgba(0, 0, 0, 0.9) 0%, 
        rgba(0, 0, 0, 0.9) 50%, 
        rgba(0, 0, 0, 0.1) 100%);
}

.carousel-content {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    z-index: 2;
}

.carousel-image-wrapper {
    flex: 1;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
}

.carousel-main-image {
    width: 100%;
    max-width: 300px;
    height: 300px;
    object-fit: cover;
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.carousel-image-wrapper:hover .carousel-main-image {
    transform: translateY(-8px) scale(1.05);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5);
}

.carousel-text {
    flex: 1;
    color: white;
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.carousel-title {
    font-size: 2.5rem;
    font-weight: bold;
    margin-bottom: 12px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.carousel-description {
    font-size: 1.25rem;
    opacity: 0.9;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

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

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

.indicator.active {
    background-color: white;
}

.indicator:hover {
    background-color: rgba(255, 255, 255, 0.8);
}

/* 快捷导航按钮 */
.quick-nav-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto 40px;
}

.quick-nav-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 15px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
}

.quick-nav-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px 15px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: var(--border-radius);
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
}

.quick-nav-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.quick-nav-btn i {
    font-size: 1.5rem;
    margin-bottom: 8px;
    color: #fff;
}

.quick-nav-btn span {
    font-size: 1.1rem;
    text-align: center;
    font-weight: 500;
}

/* 响应式调整 */
@media (max-width: 1199px) and (min-width: 992px) {
    .special-block-text p {
        font-size: 2rem;
    }
}

@media (max-width: 991px) and (min-width: 768px) {
    .special-block-text p {
        font-size: 1.8rem;
    }
}

@media (max-width: 767px) {
    .special-block-buttons {
        flex-direction: column;
        gap: 0.75rem;
    }

    .special-block-text p {
        font-size: 1.6rem;
    }

    .quick-nav-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
        padding: 15px;
    }

    .quick-nav-btn {
        padding: 15px 10px;
    }

    .quick-nav-btn i {
        font-size: 1.2rem;
    }

    .quick-nav-btn span {
        font-size: 0.8rem;
    }
}

@media (max-width: 575px) {
    .special-block-text p {
        font-size: 1.4rem;
    }

    .special-btn {
        padding: 0.6rem 0.8rem;
        font-size: 0.9rem;
    }

    .quick-nav-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
        padding: 10px;
    }
}

@media (max-width: 480px) {
    .carousel-container {
        aspect-ratio: 3/4;
    }

    .carousel-title-above {
        font-size: 2rem;
    }

    .carousel-subtitle {
        font-size: 1rem;
    }
}



/* 页脚 */
.footer {
    text-align: center;
    padding: 1.5rem;
    background-color: var(--bg-color);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: var(--border-radius);
    margin: 2rem auto 1rem;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
    max-width: 1370px;
    width: 95%;
}

/* iframe样式 */
#content-frame {
    width: 100%;
    height: auto;
    min-height: 800px;
    border: none;
    overflow: hidden;
    background-color: transparent;
    transition: height 0.3s ease;
}

/* Responsive Design */
/* 大屏幕桌面 (≥ 1200px) */
@media (min-width: 1200px) {
    .software-grid {
        grid-template-columns: repeat(4, minmax(220px, 1fr));
    }
}

/* 中等屏幕桌面 (992px - 1199px) */
@media (max-width: 1199px) and (min-width: 992px) {
    .software-grid {
        grid-template-columns: repeat(4, minmax(190px, 1fr));
    }
}

/* 小屏幕桌面/平板 (768px - 991px) */
@media (max-width: 991px) and (min-width: 768px) {
    .software-grid {
        grid-template-columns: repeat(3, minmax(180px, 1fr));
    }
    .sidebar {
        width: 200px;
    }
    .main-content {
        max-width: calc(100% - 220px);
    }
}

/* 平板/手机横屏 (576px - 767px) */
@media (max-width: 767px) and (min-width: 576px) {
    .container {
        flex-direction: column;
        margin: 1rem 0;
    }
    .sidebar {
        width: 100%;
        margin-bottom: 1.5rem;
    }
    .sidebar nav ul {
        flex-direction: row;
        flex-wrap: wrap;
    }
    .sidebar nav ul li {
        flex: 1 0 calc(50% - 0.5rem);
    }
    .main-content {
        margin-left: 0;
        max-width: 100%;
    }
    .software-grid {
        grid-template-columns: repeat(2, minmax(200px, 1fr));
    }
}

/* 手机竖屏 (< 576px) */
@media (max-width: 575px) {
    .container {
        flex-direction: column;
        margin: 1rem 0;
    }
    .sidebar {
        width: 100%;
        margin-bottom: 1.5rem;
    }
    .sidebar nav ul {
        flex-direction: row;
        flex-wrap: wrap;
    }
    .sidebar nav ul li {
        flex: 1 0 calc(50% - 0.5rem);
    }
    .header {
        flex-direction: column;
        padding: 1rem;
    }
    .search-bar {
        margin-top: 1rem;
        width: 100%;
    }
    .search-bar input {
        min-width: 0;
        width: 100%;
    }
    .main-content {
        margin-left: 0;
        max-width: 100%;
    }
    .software-grid {
        grid-template-columns: repeat(2, minmax(150px, 1fr));
    }

    /* 移动端保持图片与文字各占一半 */
    .carousel-container {
        aspect-ratio: 1/1;
        margin: 0 auto 20px;
    }

    .carousel-content {
        flex-direction: row;
        padding: 20px;
    }

    .carousel-image-wrapper {
        flex: 1;
        padding: 10px;
        height: auto;
    }

    .carousel-main-image {
        max-width: 100%;
        height: auto;
        aspect-ratio: 1/1;
    }

    .carousel-text {
        flex: 1;
        padding: 10px;
        text-align: left;
    }

    .carousel-title {
        font-size: 1.2rem;
    }

    .carousel-description {
        font-size: 0.9rem;
    }
}