/* 和睦社区Wiki样式 - 现代重构版 */

/* Wiki主页容器 */
.wiki-home-container {
    padding: 2rem 2rem 6rem 2rem;
    max-width: 1600px;
    margin: 0 auto;
    animation: fadeIn 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Wiki卡片网格 */
.wiki-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
    gap: 2rem;
    justify-content: center;
}

/* 现代Wiki导航卡片 */
.wiki-nav-card {
    position: relative;
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 24px;
    padding: 2rem;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
}

/* 悬浮发光效果 */
.wiki-card-glow {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(800px circle at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(255, 255, 255, 0.06), transparent 40%);
    opacity: 0;
    transition: opacity 0.5s ease;
    pointer-events: none;
    z-index: 0;
}

.wiki-nav-card:hover .wiki-card-glow {
    opacity: 1;
}

.wiki-nav-card:hover {
    transform: translateY(-8px);
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.12);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.wiki-card-content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* 卡片头部 */
.wiki-card-header {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    margin-bottom: 1.5rem;
}

.wiki-card-icon-wrapper {
    width: 56px;
    height: 56px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: #fff;
    transition: all 0.4s ease;
}

/* 根据不同类型的图标应用不同的主题色 */
.wiki-nav-card:nth-child(1) .wiki-card-icon-wrapper i { color: #10b981; } /* Emerald */
.wiki-nav-card:nth-child(2) .wiki-card-icon-wrapper i { color: #3b82f6; } /* Blue */
.wiki-nav-card:nth-child(3) .wiki-card-icon-wrapper i { color: #8b5cf6; } /* Violet */
.wiki-nav-card:nth-child(4) .wiki-card-icon-wrapper i { color: #f59e0b; } /* Amber */
.wiki-nav-card:nth-child(5) .wiki-card-icon-wrapper i { color: #ec4899; } /* Pink */
.wiki-nav-card:nth-child(6) .wiki-card-icon-wrapper i { color: #6366f1; } /* Indigo */

.wiki-nav-card:hover .wiki-card-icon-wrapper {
    transform: scale(1.1) rotate(-5deg);
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

.wiki-card-title {
    font-size: 1.35rem;
    font-weight: 700;
    color: #fff;
    margin: 0;
    letter-spacing: -0.01em;
}

/* 卡片描述 */
.wiki-card-desc {
    color: rgba(255, 255, 255, 0.5);
    line-height: 1.6;
    margin-bottom: 2rem;
    font-size: 0.95rem;
    flex: 1;
}

/* 卡片底部 */
.wiki-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.wiki-card-tag {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: rgba(255, 255, 255, 0.4);
    background: rgba(255, 255, 255, 0.04);
    padding: 0.35rem 0.75rem;
    border-radius: 8px;
}

.wiki-card-action {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.6);
    transition: all 0.3s ease;
}

.wiki-card-action i {
    font-size: 0.75rem;
    transition: transform 0.3s ease;
}

.wiki-nav-card:hover .wiki-card-action {
    color: #fff;
}

.wiki-nav-card:hover .wiki-card-action i {
    transform: translateX(4px);
}

/* 加载/错误/空状态样式 */
.wiki-loading-state,
.wiki-error-state,
.wiki-empty-state {
    grid-column: 1 / -1;
    padding: 4rem 2rem;
    text-align: center;
    color: rgba(255, 255, 255, 0.5);
}

.wiki-loading-state i,
.wiki-error-state i,
.wiki-empty-state i {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    opacity: 0.8;
}

.wiki-error-title,
.wiki-empty-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 0.5rem;
}

.wiki-retry-btn {
    margin-top: 1.5rem;
    padding: 0.75rem 2rem;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: #fff;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.wiki-retry-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
}

/* 移动端适配 */
@media (max-width: 640px) {
    .wiki-home-container {
        padding: 1rem 1rem 4rem 1rem;
    }
    
    .wiki-cards-grid {
        grid-template-columns: 1fr;
    }
    
    .wiki-nav-card {
        padding: 1.5rem;
    }
    
    .wiki-card-header {
        margin-bottom: 1rem;
    }
    
    .wiki-card-icon-wrapper {
        width: 48px;
        height: 48px;
        font-size: 1.25rem;
    }
    
    .wiki-card-title {
        font-size: 1.2rem;
    }
}

/* 返回按钮样式 */
.wiki-back-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.8);
    padding: 0.6rem 1.25rem;
    border-radius: 12px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 2rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 0.9rem;
    font-weight: 600;
    backdrop-filter: blur(10px);
}

.wiki-back-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    color: #fff;
    transform: translateX(-4px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.wiki-back-btn i {
    font-size: 0.8rem;
    transition: transform 0.3s ease;
}

/* Wiki详情页容器 */
.wiki-detail-container {
    max-width: 1000px;
    margin: 0 auto;
    animation: fadeIn 0.4s ease-out;
}

/* 游戏内容设计网格布局 (参考图一风格) */
/* 模组分类 Tab */
.cd-filter-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    padding: 0.5rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.cd-filter-tab {
    padding: 0.5rem 1.25rem;
    border-radius: 0.75rem;
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid transparent;
    white-space: nowrap;
}

.cd-filter-tab:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.cd-filter-tab.active {
    background: rgba(52, 152, 219, 0.2);
    color: #3498db;
    border-color: rgba(52, 152, 219, 0.3);
}

/* 游戏内容设计搜索框 */
.content-design-search-container {
    margin-bottom: 2rem;
    max-width: 600px;
}

.cd-search-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 1rem;
    padding: 0 1.25rem;
    transition: all 0.3s ease;
}

.cd-search-wrapper:focus-within {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.2);
    transform: translateY(-2px);
}

.cd-search-wrapper i {
    color: rgba(255, 255, 255, 0.3);
    font-size: 1.1rem;
    margin-right: 1rem;
}

#cd-search-input {
    width: 100%;
    background: transparent;
    border: none;
    color: white;
    padding: 1rem 0;
    font-size: 1rem;
    outline: none;
}

#cd-search-input::placeholder {
    color: rgba(255, 255, 255, 0.2);
}

/* 分页加载按钮 */
.cd-load-more-container {
    display: flex;
    justify-content: center;
    margin-top: 2rem;
    padding-bottom: 2rem;
}

.cd-load-more-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.6);
    padding: 0.75rem 2.5rem;
    border-radius: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.cd-load-more-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    transform: translateY(-2px);
}

.cd-load-more-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.content-design-subtitle {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.95rem;
    margin-bottom: 2rem;
    padding-left: 0.2rem;
    border-left: 3px solid rgba(255, 255, 255, 0.15);
    padding: 0.2rem 0 0.2rem 0.8rem;
}

.content-design-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 3rem 2rem;
    padding: 1.5rem 0;
}

.content-design-item {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
    transition: transform 0.3s ease;
}

.content-design-item:hover {
    transform: translateY(-4px);
}

.content-design-icon {
    font-size: 2.5rem;
    flex-shrink: 0;
    padding-top: 0.25rem;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
}

.content-design-info {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.content-design-title {
    font-weight: 700;
    font-size: 1.35rem;
    letter-spacing: -0.01em;
}

.content-design-desc {
    color: rgba(255, 255, 255, 0.6);
    font-size: 1rem;
    line-height: 1.6;
}

.content-design-count {
    color: rgba(255, 255, 255, 0.3);
    font-size: 0.9rem;
    font-family: 'Inter', system-ui, sans-serif;
    margin-top: 0.2rem;
}

@media (max-width: 768px) {
    .content-design-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .content-design-icon {
        font-size: 2rem;
    }
    
    .content-design-title {
        font-size: 1.2rem;
    }
}

/* 弹窗通用样式优化 */
.modal-overlay {
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(10px) saturate(160%);
    -webkit-backdrop-filter: blur(10px) saturate(160%);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-content {
    background: rgba(26, 28, 35, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5),
                0 0 20px rgba(255, 255, 255, 0.02);
    border-radius: 1.25rem;
    overflow: hidden;
    transform-origin: center;
    animation: modalAppear 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.02);
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    padding: 1.25rem 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.02);
}

.modal-close-btn {
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.5);
    transition: all 0.2s ease;
}

.modal-close-btn:hover {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
    transform: rotate(90deg);
}

/* 渐入动画优化 */
@keyframes modalAppear {
    from { 
        opacity: 0; 
        transform: scale(0.95) translateY(10px); 
    }
    to { 
        opacity: 1; 
        transform: scale(1) translateY(0); 
    }
}

.fade-in {
    animation: modalAppear 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* 分页样式 */
.cd-pagination {
    margin-top: 3rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    width: fit-content;
    margin-left: auto;
    margin-right: auto;
}

.cd-page-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 600;
    cursor: pointer;
}

.cd-page-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.cd-page-btn.active {
    background: #3b82f6;
    color: white;
    border-color: #3b82f6;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.cd-page-btn.disabled {
    opacity: 0.3;
    cursor: not-allowed;
    pointer-events: none;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* 物品/方块紧凑卡片样式 */
.cd-compact-card {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 16px;
    padding: 0.85rem 1.15rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    gap: 0.75rem;
    min-height: 72px;
    max-width: 420px;
    border-left: 3px solid var(--accent-color, rgba(255, 255, 255, 0.1));
}

.cd-compact-card:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.12);
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.2);
}

.cd-compact-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.cd-compact-title {
    color: white;
    font-size: 1rem;
    font-weight: 700;
    margin: 0 0 0.15rem 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cd-compact-desc {
    color: rgba(255, 255, 255, 0.35);
    font-size: 0.8rem;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.4;
}

.cd-compact-icon-side {
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.25);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    position: relative;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.2);
}

.cd-compact-icon-side img {
    width: 32px;
    height: 32px;
    object-fit: contain;
    image-rendering: pixelated;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
    position: relative;
    z-index: 1;
}

/* 图标加载失败的回退样式 */
.cd-compact-fallback {
    position: absolute;
    inset: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.4);
    font-size: 1.25rem;
    font-weight: 800;
    border-radius: 6px;
    font-family: 'Minecraft', 'Inter', sans-serif;
    text-transform: uppercase;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.cd-compact-tag-inline {
    font-size: 0.65rem;
    padding: 1px 6px;
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.35);
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    font-family: monospace;
    white-space: nowrap;
    letter-spacing: 0.02em;
}

.cd-compact-card:hover .cd-compact-tag-inline {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.6);
}

.cd-compact-admin {
    display: flex;
    gap: 0.3rem;
    margin-top: 0.4rem;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.cd-compact-card:hover .cd-compact-admin {
    opacity: 1;
}

.cd-compact-btn {
    width: 24px;
    height: 24px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    transition: all 0.2s;
}

.cd-compact-edit { background: rgba(241, 196, 15, 0.1); color: #f1c40f; }
.cd-compact-delete { background: rgba(231, 76, 60, 0.1); color: #e74c3c; }

.cd-compact-edit:hover { background: rgba(241, 196, 15, 0.2); }
.cd-compact-delete:hover { background: rgba(231, 76, 60, 0.2); }
