/* 表情包图库样式 - 现代化UI设计 */

/* 基础样式 */
.weg-wrapper {
    position: relative;
    background: #f8f9fa;
    min-height: 600px;
}

.weg-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 顶部横幅 */
.weg-hero {
    position: relative;
    padding: 60px 0 40px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    overflow: hidden;
}

.weg-hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    opacity: 0.1;
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.4'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.weg-hero-content {
    position: relative;
    z-index: 1;
}

.weg-title {
    font-size: 48px;
    font-weight: 800;
    color: #ffffff;
    text-align: center;
    margin: 0 0 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
}

.weg-emoji-icon {
    font-size: 56px;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.weg-subtitle {
    font-size: 20px;
    color: rgba(255, 255, 255, 0.95);
    text-align: center;
    margin: 0 0 40px;
}

/* 搜索容器 */
.weg-search-container {
    display: flex;
    gap: 16px;
    max-width: 600px;
    margin: 0 auto 40px;
}

.weg-search-form {
    flex: 1;
}

.weg-search-wrapper {
    position: relative;
}

.weg-search-input {
    width: 100%;
    padding: 16px 60px 16px 24px;
    font-size: 16px;
    border: none;
    border-radius: 50px;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    transition: all 0.3s;
}

.weg-search-input:focus {
    outline: none;
    background: #ffffff;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
}

.weg-search-btn {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    border: none;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.weg-search-btn:hover {
    transform: translateY(-50%) scale(1.05);
}

.weg-submit-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 16px 32px;
    background: #ffffff;
    color: #667eea;
    border: none;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.weg-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
}

/* 筛选栏 */
.weg-filters {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 20px;
    backdrop-filter: blur(10px);
}

.weg-filter-group {
    margin-bottom: 16px;
}

.weg-filter-group:last-child {
    margin-bottom: 0;
}

.weg-filter-label {
    display: inline-block;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 600;
    margin-right: 16px;
    min-width: 60px;
}

.weg-filter-items {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 8px;
}

.weg-filter-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 20px;
    font-size: 14px;
    text-decoration: none;
    transition: all 0.3s;
}

.weg-filter-item:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.4);
}

.weg-filter-item.active {
    background: white;
    color: #667eea;
    border-color: white;
}

.weg-count {
    display: inline-block;
    padding: 2px 6px;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 10px;
    font-size: 12px;
    font-weight: 600;
}

/* 内容区 */
.weg-content {
    padding: 40px 0 80px;
}

/* 热门标签 */
.weg-tags-section {
    margin-bottom: 40px;
    background: white;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.05);
}

.weg-tags-title {
    font-size: 18px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 16px;
}

.weg-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.weg-tag {
    padding: 8px 16px;
    background: #f0f2f5;
    color: #667eea;
    border-radius: 20px;
    font-size: 14px;
    text-decoration: none;
    transition: all 0.3s;
}

.weg-tag:hover {
    background: #667eea;
    color: white;
    transform: translateY(-2px);
}

/* 表情包网格 */
.weg-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
    margin-bottom: 60px;
}

/* 卡片 */
.weg-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s;
    animation: fadeInUp 0.6s ease;
}

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

.weg-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

.weg-card-image {
    position: relative;
    width: 100%;
    height: 220px;
    background: #f5f7fa;
    overflow: hidden;
}

.weg-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.weg-card:hover .weg-card-image img {
    transform: scale(1.1);
}

.weg-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 64px;
    color: #d1d5db;
}

.weg-card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, transparent 0%, rgba(0, 0, 0, 0.8) 100%);
    opacity: 0;
    transition: opacity 0.3s;
}

.weg-card:hover .weg-card-overlay {
    opacity: 1;
}

.weg-overlay-actions {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 12px;
}

.weg-action-btn {
    width: 48px;
    height: 48px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.95);
    color: #1a1a1a;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.weg-action-btn:hover {
    background: white;
    transform: scale(1.1);
}

.weg-card-body {
    padding: 20px;
}

.weg-card-title {
    font-size: 16px;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0 0 12px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.weg-card-stats {
    display: flex;
    align-items: center;
    gap: 12px;
}

.weg-stat-btn,
.weg-stat-item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: #f5f7fa;
    border: none;
    border-radius: 8px;
    color: #6b7280;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
}

.weg-stat-btn:hover {
    background: #e5e7eb;
}

.weg-like-btn.liked {
    background: #fee2e2;
    color: #ef4444;
}

.weg-stat-item {
    cursor: default;
}

/* 分页 */
.weg-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
}

.weg-pagination a,
.weg-pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    color: #6b7280;
    text-decoration: none;
    transition: all 0.3s;
}

.weg-pagination a:hover {
    background: #f5f7fa;
    border-color: #667eea;
    color: #667eea;
}

.weg-pagination .current {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border-color: transparent;
}

/* 空状态 */
.weg-empty {
    text-align: center;
    padding: 80px 20px;
}

.weg-empty-icon {
    font-size: 80px;
    margin-bottom: 24px;
}

.weg-empty h2 {
    font-size: 28px;
    color: #1a1a1a;
    margin-bottom: 12px;
}

.weg-empty p {
    color: #6b7280;
    margin-bottom: 24px;
}

.weg-btn-primary {
    display: inline-block;
    padding: 12px 32px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.3s;
}

.weg-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
}

/* 模态框 */
.weg-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 99999;
}

.weg-modal.show {
    display: block;
}

.weg-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    cursor: pointer;
}

.weg-modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-width: 90%;
    max-height: 90%;
    background: white;
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.weg-modal-close {
    position: absolute;
    top: -40px;
    right: 0;
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.weg-modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

#preview-image {
    display: block;
    max-width: 100%;
    max-height: 70vh;
    border-radius: 8px;
}

#preview-title {
    margin-top: 16px;
    text-align: center;
    font-size: 18px;
    color: #1a1a1a;
}
/* 在原有CSS文件末尾添加以下内容 */

/* 格式标识 */
.weg-format-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 4px 8px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    font-size: 12px;
    font-weight: bold;
    border-radius: 4px;
    z-index: 1;
}

/* Toast 提示 */
.weg-toast {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(-100px);
    padding: 16px 24px;
    background: #10b981;
    color: white;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    z-index: 100000;
    opacity: 0;
    transition: all 0.3s ease;
    font-size: 16px;
}

.weg-toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.weg-toast-error {
    background: #ef4444;
}

.weg-toast-warning {
    background: #f59e0b;
}

/* 处理中状态 */
.weg-stat-btn.processing,
.weg-action-btn.processing {
    opacity: 0.6;
    cursor: not-allowed;
}

/* 动画效果 */
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

.pulse {
    animation: pulse 0.3s ease;
}

/* 移动端优化 */
@media (max-width: 768px) {
    .weg-toast {
        width: 90%;
        left: 5%;
        transform: translateY(-100px);
    }
    
    .weg-toast.show {
        transform: translateY(0);
    }
}
/* 响应式 */
@media (max-width: 1024px) {
    .weg-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    }
}

@media (max-width: 768px) {
    .weg-title {
        font-size: 32px;
    }
    
    .weg-emoji-icon {
        font-size: 40px;
    }
    
    .weg-search-container {
        flex-direction: column;
    }
    
    .weg-filter-group {
        display: block;
    }
    
    .weg-filter-label {
        display: block;
        margin-bottom: 8px;
    }
    
    .weg-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 16px;
    }
    
    .weg-card-image {
        height: 160px;
    }
}

@media (max-width: 480px) {
    .weg-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
}