/* ================================================================
   家族群组模块 - 新国潮风格CSS
   与主页 index.asp 保持一致的设计语言
   ================================================================ */

@import url('https://fonts.googleapis.com/css2?family=Noto+Serif+SC:wght@400;500;600;700&display=swap');

:root {
    /* 新国潮色彩系统 */
    --china-red: #c41e3a;
    --gradient-red: linear-gradient(135deg, #c41e3a 0%, #e85d04 100%);
    
    /* 辅助色 */
    --mint-green: #00c9a7;
    --warm-orange: #ff8c42;
    --coral-pink: #ff6b9d;
    --royal-gold: #ffd700;
    --deep-blue: #1e3a5f;
    --soft-purple: #9b59b6;
    
    /* 中性色 */
    --bg-light: #faf8f5;
    --bg-white: #ffffff;
    --text-dark: #1a1a1a;
    --text-gray: #666666;
    --text-light: #999999;
    --border-light: #e8e0d5;
    --border-medium: #d4c8bc;
    
    /* 阴影系统 */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);
    --shadow-xl: 0 12px 32px rgba(0, 0, 0, 0.16);
    
    /* 圆角系统 */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-full: 9999px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Noto Serif SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Microsoft YaHei', sans-serif;
    background: var(--bg-light);
    color: var(--text-dark);
    line-height: 1.6;
    min-height: 100vh;
}

/* ================================================================
   顶部导航栏
   ================================================================ */
.group-navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 64px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-light);
    z-index: 1000;
    box-shadow: var(--shadow-sm);
}

.group-navbar-inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.group-navbar-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    transition: all 0.3s;
}

.group-navbar-logo:hover {
    opacity: 0.8;
}

.group-navbar-logo-icon {
    width: 36px;
    height: 36px;
    background: var(--gradient-red);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 20px;
}

.group-navbar-logo-text {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-dark);
}

.group-navbar-menu {
    display: flex;
    align-items: center;
    gap: 8px;
}

.group-navbar-link {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    color: var(--text-gray);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    border-radius: var(--radius-md);
    transition: all 0.3s;
}

.group-navbar-link:hover {
    color: var(--china-red);
    background: rgba(196, 30, 58, 0.05);
}

.group-navbar-link.active {
    color: var(--china-red);
    background: rgba(196, 30, 58, 0.1);
    font-weight: 600;
}

.group-navbar-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* ================================================================
   移动端菜单按钮
   ================================================================ */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    color: var(--text-dark);
    cursor: pointer;
    padding: 8px;
    border-radius: var(--radius-md);
    transition: all 0.3s;
}

.mobile-menu-btn:hover {
    background: rgba(196, 30, 58, 0.1);
    color: var(--china-red);
}

/* ================================================================
   下拉菜单
   ================================================================ */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    min-width: 180px;
    background: var(--bg-white);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: 8px 0;
    z-index: 1001;
    animation: dropdown-fade-in 0.2s ease-out;
}

@keyframes dropdown-fade-in {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dropdown:hover .dropdown-menu {
    display: block;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    color: var(--text-gray);
    text-decoration: none;
    font-size: 14px;
    transition: all 0.2s;
}

.dropdown-item:hover {
    background: rgba(196, 30, 58, 0.08);
    color: var(--china-red);
}

.dropdown-item i {
    font-size: 16px;
    color: var(--text-light);
}

.dropdown-divider {
    height: 1px;
    background: var(--border-light);
    margin: 8px 0;
}

/* ================================================================
   主容器
   ================================================================ */
.group-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 24px;
    padding-top: 88px;
}

/* ================================================================
   页面标题
   ================================================================ */
.page-title-section {
    text-align: center;
    padding: 48px 24px;
    background: linear-gradient(135deg, rgba(196, 30, 58, 0.05) 0%, rgba(255, 140, 66, 0.05) 100%);
    border-radius: var(--radius-xl);
    margin-bottom: 32px;
    position: relative;
    overflow: hidden;
}

.page-title-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(196, 30, 58, 0.08) 0%, transparent 70%);
    border-radius: 50%;
}

.page-title-section h1 {
    font-size: 36px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 12px;
    position: relative;
}

.page-title-section p {
    font-size: 16px;
    color: var(--text-gray);
    position: relative;
}

/* ================================================================
   卡片系统
   ================================================================ */
.group-card {
    background: var(--bg-white);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s;
}

.group-card:hover {
    box-shadow: var(--shadow-md);
    border-color: rgba(196, 30, 58, 0.2);
    transform: translateY(-4px);
}

/* 世系区块 */
.generation-section {
    margin-bottom: 40px;
    animation: fadeInUp 0.6s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.generation-header {
    text-align: center;
    margin-bottom: 24px;
    padding: 24px;
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
}

.generation-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 8px;
}

.generation-desc {
    font-size: 14px;
    color: var(--text-gray);
}

/* 群组网格 */
.groups-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 24px;
}

/* 群组卡片 */
.group-item-card {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
    position: relative;
}

.group-item-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-red);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.group-item-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: var(--china-red);
}

.group-item-header {
    height: 120px;
    background: var(--gradient-red);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.group-item-header::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    animation: rotate 20s linear infinite;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.group-item-icon {
    width: 60px;
    height: 60px;
    background: rgba(255,255,255,0.2);
    backdrop-filter: blur(10px);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: white;
    position: relative;
    z-index: 1;
    border: 2px solid rgba(255,255,255,0.3);
}

.group-gen-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(255,255,255,0.95);
    color: var(--china-red);
    padding: 6px 12px;
    border-radius: var(--radius-full);
    font-weight: 600;
    font-size: 13px;
    box-shadow: var(--shadow-sm);
    z-index: 1;
}

.group-item-body {
    padding: 20px;
}

.group-item-name {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 12px;
}

.group-item-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 12px;
}

.group-meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text-gray);
    font-size: 13px;
}

.group-meta-item i {
    color: var(--china-red);
}

.group-item-desc {
    color: var(--text-gray);
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 16px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.group-item-footer {
    padding-top: 16px;
    border-top: 1px solid var(--border-light);
}

.btn-group-join {
    width: 100%;
    padding: 12px 20px;
    background: var(--gradient-red);
    color: white;
    border-radius: var(--radius-md);
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: none;
    cursor: pointer;
}

.btn-group-join:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(196, 30, 58, 0.3);
}

/* ================================================================
   话题广场
   ================================================================ */
.topic-square {
    margin-top: 48px;
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
    overflow: hidden;
}

.topic-header {
    background: var(--gradient-red);
    padding: 32px;
    text-align: center;
    color: white;
}

.topic-header h2 {
    font-size: 28px;
    margin-bottom: 8px;
}

.topic-header p {
    opacity: 0.9;
    font-size: 15px;
}

.topic-content {
    padding: 32px;
}

.topic-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.topic-card {
    background: var(--bg-light);
    border-radius: var(--radius-md);
    padding: 20px;
    transition: all 0.3s;
    border: 1px solid transparent;
}

.topic-card:hover {
    background: var(--bg-white);
    border-color: var(--china-red);
    box-shadow: var(--shadow-md);
    transform: translateY(-4px);
}

.topic-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.topic-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--gradient-red);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 16px;
}

.topic-author {
    flex: 1;
}

.topic-author-name {
    font-weight: 600;
    color: var(--text-dark);
    font-size: 14px;
}

.topic-time {
    color: var(--text-light);
    font-size: 12px;
}

.topic-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 12px;
}

.topic-excerpt {
    color: var(--text-gray);
    font-size: 14px;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.topic-footer {
    display: flex;
    gap: 20px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border-light);
}

.topic-stat {
    display: flex;
    align-items: center;
    gap: 4px;
    color: var(--text-gray);
    font-size: 13px;
    cursor: pointer;
    transition: color 0.2s;
}

.topic-stat:hover {
    color: var(--china-red);
}

/* ================================================================
   按钮系统
   ================================================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    border: none;
    text-decoration: none;
}

.btn-primary {
    background: var(--gradient-red);
    color: white;
    box-shadow: 0 2px 8px rgba(196, 30, 58, 0.2);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(196, 30, 58, 0.3);
}

.btn-secondary {
    background: var(--bg-white);
    color: var(--text-dark);
    border: 1px solid var(--border-light);
}

.btn-secondary:hover {
    background: var(--bg-light);
    border-color: var(--china-red);
    color: var(--china-red);
}

.btn-outline {
    background: transparent;
    color: var(--china-red);
    border: 2px solid var(--china-red);
}

.btn-outline:hover {
    background: var(--china-red);
    color: white;
}

/* ================================================================
   徽章系统
   ================================================================ */
.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: var(--radius-full);
    font-size: 12px;
    font-weight: 600;
}

.badge-primary {
    background: rgba(196, 30, 58, 0.1);
    color: var(--china-red);
}

.badge-success {
    background: rgba(0, 201, 167, 0.1);
    color: var(--mint-green);
}

.badge-warning {
    background: rgba(255, 140, 66, 0.1);
    color: var(--warm-orange);
}

/* ================================================================
   空状态
   ================================================================ */
.empty-state {
    text-align: center;
    padding: 64px 24px;
    color: var(--text-gray);
}

.empty-state i {
    font-size: 64px;
    margin-bottom: 16px;
    color: var(--border-medium);
}

.empty-state h3 {
    font-size: 20px;
    margin-bottom: 8px;
    color: var(--text-dark);
}

/* ================================================================
   版权区域
   ================================================================ */
.group-footer {
    margin-top: 64px;
    padding: 48px 24px;
    background: var(--deep-blue);
    color: rgba(255, 255, 255, 0.8);
    text-align: center;
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
}

.group-footer-content {
    max-width: 800px;
    margin: 0 auto;
}

.group-footer-logo {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 16px;
    background: linear-gradient(135deg, #fff, rgba(255,255,255,0.7));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.group-footer-slogan {
    font-size: 15px;
    margin-bottom: 24px;
    opacity: 0.9;
}

.group-footer-links {
    display: flex;
    justify-content: center;
    gap: 32px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.group-footer-links a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: color 0.3s;
    display: flex;
    align-items: center;
    gap: 6px;
}

.group-footer-links a:hover {
    color: white;
}

.group-footer-copyright {
    padding-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 13px;
    opacity: 0.7;
}

/* ================================================================
   响应式设计
   ================================================================ */
@media (max-width: 1024px) {
    .groups-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .group-navbar-menu {
        display: none;
    }
    
    .mobile-menu-btn {
        display: block;
    }
    
    .groups-grid {
        grid-template-columns: 1fr;
    }
    
    .topic-grid {
        grid-template-columns: 1fr;
    }
    
    .group-container {
        padding: 16px;
        padding-top: 80px;
    }
    
    .generation-header {
        padding: 20px;
    }
    
    .generation-title {
        font-size: 22px;
    }
    
    .page-title-section h1 {
        font-size: 28px;
    }
    
    .page-title-section {
        padding: 32px 16px;
    }
}

@media (max-width: 480px) {
    .group-navbar-inner {
        padding: 0 16px;
    }
    
    .group-navbar-logo-text {
        font-size: 16px;
    }
    
    .generation-title {
        font-size: 18px;
    }
    
    .page-title-section h1 {
        font-size: 24px;
    }
}

/* ================================================================
   动画效果
   ================================================================ */
@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.group-item-card:hover .group-item-icon {
    animation: pulse 0.6s ease-in-out;
}
