* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #f0f2f5 0%, #e8ecf1 100%);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.wrapper {
    display: flex;
    flex: 1;
    min-height: calc(100vh - 140px);
}

/* ===== 侧边栏样式 - 黑金色 ===== */
.sidebar {
    width: 260px;
    background: linear-gradient(to bottom, #1a1a1a, #2d2d2d);
    color: white;
    padding: 24px 0;
    transition: width 0.3s ease;
    overflow-x: hidden;
    position: relative;
    border-right: 2px solid #d4af37;
    box-shadow: 3px 0 15px rgba(0, 0, 0, 0.2);
    flex-shrink: 0;
}

.sidebar.collapsed {
    width: 64px;
}

.sidebar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(to right, #d4af37, #ffd700, #d4af37);
}

.sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px 20px;
    border-bottom: 1px solid #333;
    background: rgba(212, 175, 55, 0.1);
}

.sidebar.collapsed .sidebar-header {
    justify-content: center;
    padding: 0 12px 20px;
}

.toggle-btn {
    background: none;
    border: 1px solid #d4af37;
    color: #d4af37;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 6px;
    transition: all 0.3s;
}

.toggle-btn:hover {
    background: rgba(212, 175, 55, 0.2);
    transform: scale(1.05);
}

.sidebar-title {
    font-size: 20px;
    font-weight: bold;
    color: #ffd700;
    font-family: 'Microsoft YaHei', sans-serif;
    letter-spacing: 2px;
}

.sidebar.collapsed .sidebar-title {
    display: none;
}

.category {
    padding: 16px 20px;
    cursor: pointer;
    transition: background-color 0.2s;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-left: 3px solid transparent;
    margin: 2px 0;
}

.category:hover {
    background-color: rgba(212, 175, 55, 0.1);
    border-left: 3px solid #d4af37;
}

.category.active {
    background-color: rgba(212, 175, 55, 0.2);
    border-left: 3px solid #ffd700;
}

.category-name {
    font-size: 16px;
    color: #e0e0e0;
    transition: color 0.2s;
}

.category.active .category-name {
    color: #ffd700;
    font-weight: 600;
}

.sidebar.collapsed .category-name {
    display: none;
}

.category-arrow {
    transition: transform 0.2s;
    color: #d4af37;
    font-size: 18px;
}

.category.active .category-arrow {
    transform: rotate(90deg);
    color: #ffd700;
}

.sidebar.collapsed .category-arrow {
    display: none;
}

/* ===== 群介绍 ===== */
.group-intro {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 16px 20px;
    border-top: 1px solid #333;
    text-align: center;
}

.sidebar.collapsed .group-intro {
    padding: 16px 12px;
}

.group-intro-text {
    color: #999;
    font-size: 14px;
    cursor: pointer;
    transition: color 0.2s;
    font-family: 'Microsoft YaHei', sans-serif;
    position: relative;
}

.group-intro-text:hover {
    color: #ffd700;
}

.sidebar.collapsed .group-intro-text {
    font-size: 12px;
}

/* ===== 群介绍 - 全屏遮罩 ===== */
.intro-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(6px);
}

.intro-overlay.visible {
    display: flex;
    animation: overlayFadeIn 0.25s ease;
}

@keyframes overlayFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.intro-image-wrapper {
    background: #fff;
    border-radius: 12px;
    padding: 8px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    max-width: 90vw;
    max-height: 90vh;
    animation: imageZoomIn 0.3s ease;
}

@keyframes imageZoomIn {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}

.intro-image-wrapper img {
    display: block;
    max-width: 80vw;
    max-height: 80vh;
    width: auto;
    height: auto;
    border-radius: 6px;
}

/* ===== 主内容区 ===== */
.main-content {
    flex: 1;
    padding: 40px 48px;
    overflow-y: auto;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
}

.content-section {
    display: none;
    animation: fadeIn 0.3s ease;
}

.content-section.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.content-section > p {
    font-size: 15px;
    color: #6b7a8f;
    margin-bottom: 8px;
    line-height: 1.6;
}

.section-title {
    font-size: 28px;
    margin-bottom: 12px;
    color: #1a2a3a;
    position: relative;
    padding-bottom: 14px;
    font-weight: 700;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 70px;
    height: 4px;
    background: linear-gradient(to right, #d4af37, #f5d76e);
    border-radius: 2px;
}

/* ===== 卡片样式 ===== */
.cards-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 28px;
    margin-top: 28px;
    margin-bottom: 48px;
}

.card {
    background: white;
    border-radius: 14px;
    padding: 28px 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    cursor: pointer;
    border: 1px solid #eef1f5;
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(to right, #d4af37, #ffd700);
    transform: scaleX(0);
    transition: transform 0.3s ease;
    transform-origin: left;
}

.card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.1);
}

.card:hover::before {
    transform: scaleX(1);
}

.card-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 12px;
    color: #1a2a3a;
}

.card-desc {
    color: #7f8c8d;
    font-size: 14px;
    line-height: 1.7;
    margin-bottom: 18px;
    min-height: 44px;
}

.card-link {
    color: #d4af37;
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: color 0.2s;
}

.card-link:hover {
    color: #b8941f;
}

.card-link svg {
    transition: transform 0.2s;
}

.card:hover .card-link svg {
    transform: translateX(4px);
}

/* ===== 弹窗样式 ===== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(4px);
}

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 14px;
    padding: 36px 32px;
    max-width: 420px;
    width: 90%;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
    border-top: 4px solid #d4af37;
    animation: modalFadeIn 0.25s ease;
}

@keyframes modalFadeIn {
    from { opacity: 0; transform: scale(0.95) translateY(10px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-title {
    font-size: 22px;
    margin-bottom: 16px;
    color: #1a2a3a;
    font-weight: 600;
}

.modal-text {
    color: #6b7a8f;
    margin-bottom: 28px;
    line-height: 1.6;
    font-size: 15px;
}

.modal-buttons {
    display: flex;
    gap: 14px;
    justify-content: center;
}

.btn {
    padding: 12px 28px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 15px;
}

.btn-confirm {
    background: linear-gradient(to right, #d4af37, #f5d76e);
    color: white;
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.3);
}

.btn-confirm:hover {
    background: linear-gradient(to right, #b8941f, #d4af37);
    box-shadow: 0 6px 16px rgba(212, 175, 55, 0.4);
    transform: translateY(-1px);
}

.btn-cancel {
    background-color: #f0f2f5;
    color: #2c3e50;
}

.btn-cancel:hover {
    background-color: #e0e4e8;
    transform: translateY(-1px);
}

/* ===== 页脚样式 ===== */
.footer {
    background: #242424;
    color: #ccc;
    text-align: center;
    padding: 24px 20px;
    border-top: 4px solid #d4af37;
    margin-top: auto;
    font-size: 14px;
    line-height: 1.8;
}

.footer a {
    color: #ffd700;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s;
}

.footer a:hover {
    color: #fff;
    text-decoration: underline;
}

.beian-info {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 10px;
    gap: 10px;
}

.beian-info img {
    height: 20px;
    width: auto;
}

/* ===== 响应式设计 ===== */
@media (max-width: 1024px) {
    .main-content {
        padding: 32px 28px;
    }

    .cards-container {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 24px;
    }
}

@media (max-width: 768px) {
    .sidebar {
        position: absolute;
        height: 100%;
        z-index: 100;
        width: 260px;
        transform: translateX(0);
    }

    .sidebar.collapsed {
        transform: translateX(-260px);
    }

    .wrapper {
        position: relative;
    }

    .main-content {
        padding: 24px 20px;
    }

    .cards-container {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .section-title {
        font-size: 24px;
    }
}

@media (max-width: 480px) {
    .main-content {
        padding: 16px 14px;
    }

    .card {
        padding: 20px 16px;
    }
}
