/* 顶部导航栏修正版 */
.navbar {
    width: 100%;
    background: rgba(20, 24, 40, 0.92);
    box-shadow: 0 2px 16px rgba(0,0,0,0.12);
    position: sticky;
    top: 0;
    left: 0;
    z-index: 100;
    font-family: 'Noto Sans SC', 'Microsoft YaHei', Arial, sans-serif;
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 32px;
    height: 64px;
}

.nav-menu {
    display: flex;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 8px;
}

.nav-item {
    position: relative;
}

.nav-link {
    display: block;
    padding: 10px 18px;
    color: #fff;
    font-size: 1rem;
    text-decoration: none;
    border-radius: 8px;
    transition: background 0.2s, color 0.2s;
    cursor: pointer;
    font-weight: 500;
}

.nav-link.active,
.nav-link:hover {
    background: rgba(255,255,255,0.10);
    color: #ffd700;
}

/* 下拉菜单 */
.dropdown-toggle:after {
    content: ' ▼';
    font-size: 0.8em;
    color: #ffd700;
}

.dropdown-menu {
    display: none;
    position: absolute;
    left: 0;
    top: 100%;
    min-width: 140px;
    background: rgba(30, 34, 50, 0.98);
    box-shadow: 0 8px 32px rgba(0,0,0,0.18);
    border-radius: 10px;
    margin-top: 6px;
    padding: 8px 0;
    z-index: 200;
    border: 1px solid rgba(255,255,255,0.08);
}

.nav-item.dropdown:hover > .dropdown-menu,
.nav-item.dropdown:focus-within > .dropdown-menu {
    display: block;
}

.dropdown-menu li {
    width: 100%;
}

.dropdown-menu a {
    display: block;
    padding: 10px 22px;
    color: #fff;
    text-decoration: none;
    font-size: 1rem;
    border-radius: 6px;
    transition: background 0.2s, color 0.2s;
    white-space: nowrap;
}

.dropdown-menu a.active,
.dropdown-menu a:hover {
    background: rgba(255,255,255,0.10);
    color: #ffd700;
}

/* 用户菜单 */
.user-menu-toggle {
    display: flex;
    align-items: center;
    gap: 4px;
}
.user-dropdown {
    right: 0;
    left: auto;
    min-width: 120px;
}

/* 公会页面专用样式 */

/* 公会主体容器 */
.guild-main {
    min-height: 100vh;
    padding-top: 80px;
    position: relative;
    z-index: 1;
}

/* 公会英雄区域 */
.guild-hero {
    padding: 60px 20px 40px;
    text-align: center;
    position: relative;
}

.guild-hero-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 40px;
}

.guild-title-container {
    flex: 1;
    min-width: 300px;
}

.guild-title {
    font-size: 4rem;
    font-weight: 800;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 20px;
    text-shadow: 0 0 30px rgba(102, 126, 234, 0.5);
    animation: titleGlow 3s ease-in-out infinite alternate;
}

.guild-subtitle {
    font-size: 1.3rem;
    color: rgba(255, 255, 255, 0.8);
    font-style: italic;
    margin-bottom: 30px;
}

/* 公会徽章 */
.guild-emblem {
    flex: 0 0 200px;
}

.emblem-container {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    border: 2px solid rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    position: relative;
    overflow: hidden;
    animation: emblemFloat 6s ease-in-out infinite;
}

.emblem-container::before {
    content: '';
    position: absolute;
    inset: -2px;
    background: linear-gradient(45deg, #667eea, #764ba2, #667eea);
    border-radius: 50%;
    z-index: -1;
    animation: emblemRotate 8s linear infinite;
}

.emblem-image {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
}

/* 信息卡片容器 */
.guild-info-cards {
    padding: 40px 20px;
    max-width: 1400px;
    margin: 0 auto;
}

.cards-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 30px;
    position: relative;
}

/* 信息卡片 */
.info-card {
    position: relative;
    animation: cardFadeIn 0.8s ease-out forwards;
    opacity: 0;
    transform: translateY(30px);
}

.info-card[data-offset="0"] { animation-delay: 0.1s; }
.info-card[data-offset="1"] { animation-delay: 0.2s; }
.info-card[data-offset="2"] { animation-delay: 0.3s; }
.info-card[data-offset="3"] { animation-delay: 0.4s; }
.info-card[data-offset="4"] { animation-delay: 0.5s; }

/* 错位布局 */
.info-card:nth-child(odd) {
    transform: translateX(-20px);
}

.info-card:nth-child(even) {
    transform: translateX(20px);
}

/* 毛玻璃卡片 */
.card-glass {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 30px;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.card-glass::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
}

.card-glass:hover {
    transform: translateY(-10px);
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    border-color: rgba(102, 126, 234, 0.3);
}

/* 卡片头部 */
.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.card-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #fff;
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.card-icon {
    font-size: 2rem;
    opacity: 0.7;
}

/* 卡片内容 */
.card-content {
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.6;
}

/* 成员网格 */
.members-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.member-item {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    padding: 15px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.member-item:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-5px);
}

.member-name {
    font-weight: 600;
    color: #fff;
    margin-bottom: 5px;
}

.member-role {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
}

/* 成就列表 */
.achievements-list {
    display: grid;
    gap: 15px;
}

.achievement-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.achievement-item:last-child {
    border-bottom: none;
}

.achievement-icon {
    font-size: 1.5rem;
    opacity: 0.8;
}

.achievement-text {
    flex: 1;
}

.achievement-title {
    font-weight: 600;
    color: #fff;
    margin-bottom: 3px;
}

.achievement-desc {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
}

/* 活动时间线 */
.activities-timeline {
    position: relative;
}

.activity-item {
    position: relative;
    padding: 15px 0 15px 30px;
    border-left: 2px solid rgba(102, 126, 234, 0.5);
    margin-left: 10px;
}

.activity-item::before {
    content: '';
    position: absolute;
    left: -6px;
    top: 20px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #667eea;
    box-shadow: 0 0 10px rgba(102, 126, 234, 0.5);
}

.activity-date {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 5px;
}

.activity-title {
    font-weight: 600;
    color: #fff;
    margin-bottom: 5px;
}

.activity-desc {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.8);
}

/* 加入要求 */
.join-requirements, .join-contact {
    margin-bottom: 20px;
}

.join-requirements h3, .join-contact h3 {
    color: #fff;
    margin-bottom: 10px;
    font-size: 1.1rem;
}

.join-requirements ul {
    list-style: none;
    padding-left: 0;
}

.join-requirements li {
    position: relative;
    padding-left: 20px;
    margin-bottom: 8px;
}

.join-requirements li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: #4CAF50;
    font-weight: bold;
}

/* 加入按钮 */
.join-button {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.join-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.5);
}

/* 公会画廊 */
.guild-gallery {
    padding: 60px 20px;
    max-width: 1400px;
    margin: 0 auto;
}

.gallery-title {
    text-align: center;
    font-size: 2.5rem;
    color: #fff;
    margin-bottom: 40px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.gallery-item {
    aspect-ratio: 16/9;
    border-radius: 15px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    position: relative;
}

.gallery-item:hover {
    transform: scale(1.05);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 公会模态框 */
.guild-modal {
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
}

.guild-modal h2 {
    text-align: center;
    margin-bottom: 30px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.join-form .form-group {
    margin-bottom: 20px;
}

.join-form label {
    display: block;
    margin-bottom: 8px;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
}

.join-form input,
.join-form textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    color: white;
    font-size: 1rem;
}

.join-form input:focus,
.join-form textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 10px rgba(102, 126, 234, 0.3);
}

.submit-btn {
    width: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 15px;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 20px;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.5);
}

/* 动画效果 */
@keyframes titleGlow {
    0% { text-shadow: 0 0 30px rgba(102, 126, 234, 0.5); }
    100% { text-shadow: 0 0 40px rgba(102, 126, 234, 0.8), 0 0 60px rgba(118, 75, 162, 0.5); }
}

@keyframes emblemFloat {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

@keyframes emblemRotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes cardFadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .guild-hero-content {
        flex-direction: column;
        text-align: center;
    }
    
    .guild-title {
        font-size: 2.5rem;
    }
    
    .cards-container {
        grid-template-columns: 1fr;
    }
    
    .info-card:nth-child(odd),
    .info-card:nth-child(even) {
        transform: translateX(0);
    }
    
    .emblem-container {
        width: 150px;
        height: 150px;
    }
    
    .emblem-image {
        width: 110px;
        height: 110px;
    }
    
    /* 移动端导航菜单添加水平滚动支持 */
    .nav-menu {
        overflow-x: auto;
        scrollbar-width: none;
        -ms-overflow-style: none;
        padding: 5px 0;
    }
    
    .nav-menu::-webkit-scrollbar {
        display: none;
    }
    
    /* 确保菜单项不换行（如果空间不够） */
    .nav-item {
        flex-shrink: 0;
    }
}

@media (max-width: 480px) {
    .guild-main {
        padding-top: 70px;
    }
    
    .guild-hero {
        padding: 40px 15px 30px;
    }
    
    .guild-title {
        font-size: 2rem;
    }
    
    .card-glass {
        padding: 20px;
    }
    
    .guild-info-cards {
        padding: 30px 15px;
    }
    
    /* 移动端导航栏优化 */
    .nav-container {
        padding: 0 8px;
        height: auto;
        min-height: 60px;
    }
    
    .nav-menu {
        gap: 3px;
        flex-wrap: wrap;
        justify-content: center;
        width: 100%;
    }
    
    .nav-item {
        flex: 0 0 auto;
        margin: 2px;
    }
    
    .nav-link {
        padding: 6px 8px;
        font-size: 0.8rem;
        border-radius: 15px;
        white-space: nowrap;
    }
    
    .dropdown-toggle {
        padding: 6px 8px;
        font-size: 0.8rem;
        border-radius: 15px;
    }
    
    .dropdown-menu {
        min-width: 120px;
        font-size: 0.85rem;
    }
    
    .dropdown-menu a {
        padding: 8px 12px;
        font-size: 0.85rem;
    }
}

@media (max-width: 900px) {
    .nav-container {
        padding: 0 10px;
    }
    .nav-link {
        padding: 8px 10px;
        font-size: 0.95rem;
    }
    .dropdown-menu a {
        padding: 8px 14px;
        font-size: 0.95rem;
    }
}
@media (max-width: 600px) {
    .nav-container {
        height: auto;
        padding: 0 15px;
        justify-content: center;
        min-height: 60px;
    }
    
    .nav-menu {
        flex-wrap: wrap;
        gap: 8px;
        justify-content: center;
        width: 100%;
    }
    
    .nav-item {
        flex: 0 0 auto;
    }
    
    .nav-link {
        padding: 8px 12px;
        font-size: 0.9rem;
        white-space: nowrap;
    }
    
    .dropdown-toggle {
        padding: 8px 12px;
        font-size: 0.9rem;
    }
    
    .dropdown-menu {
        min-width: 140px;
        left: 50%;
        transform: translateX(-50%);
    }
    
    .dropdown-menu a {
        padding: 10px 15px;
        font-size: 0.9rem;
    }
}

/* 超小屏幕优化 */
@media (max-width: 360px) {
    .nav-container {
        padding: 0 5px;
        min-height: 55px;
    }
    
    .nav-menu {
        gap: 2px;
        justify-content: space-between;
    }
    
    .nav-item {
        margin: 1px;
    }
    
    .nav-link,
    .dropdown-toggle {
        padding: 5px 6px;
        font-size: 0.75rem;
        border-radius: 12px;
    }
    
    /* 简化部分菜单项文本 */
    .nav-link {
        max-width: 70px;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    .dropdown-menu {
        min-width: 100px;
        font-size: 0.8rem;
    }
    
    .dropdown-menu a {
        padding: 6px 10px;
        font-size: 0.8rem;
    }
}
