/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
    line-height: 1.6;
    overflow-x: hidden;
}

/* 自定义滚动条 */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    transition: background 0.3s ease;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}

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

/* 头部样式 */
.header {
    text-align: center;
    margin-bottom: 40px;
    padding: 40px 0;
    position: relative;
}

.header::before {
    content: '';
    position: absolute;
    top: -50px;
    left: -50px;
    right: -50px;
    bottom: -50px;
    background: radial-gradient(circle at center, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    z-index: -1;
}

.header-content {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 25px;
    padding: 50px;
    box-shadow: 
        0 25px 50px rgba(0, 0, 0, 0.1),
        0 0 0 1px rgba(255, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
}

.header-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%);
    z-index: -1;
}

/* 语言切换器样式 */
.header-top {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 10;
}

.language-switcher {
    position: relative;
}

.lang-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: rgba(255, 255, 255, 0.9);
    border: 2px solid rgba(102, 126, 234, 0.2);
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    color: #4a5568;
    backdrop-filter: blur(10px);
}

.lang-btn:hover {
    background: rgba(255, 255, 255, 1);
    border-color: #667eea;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.2);
}

.lang-btn i:last-child {
    transition: transform 0.3s ease;
}

.lang-btn.active i:last-child {
    transform: rotate(180deg);
}

.lang-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 8px;
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
    min-width: 140px;
}

.lang-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.lang-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    border-bottom: 1px solid #f1f5f9;
}

.lang-option:last-child {
    border-bottom: none;
}

.lang-option:hover {
    background: #f8fafc;
    color: #667eea;
}

.lang-option.active {
    background: #667eea;
    color: white;
}

.flag {
    font-size: 1.2rem;
}

.title {
    font-size: 3.5rem;
    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: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.title i {
    color: #667eea;
    font-size: 3rem;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
    animation: float 3s ease-in-out infinite;
}

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

.subtitle {
    font-size: 1.3rem;
    color: #718096;
    font-weight: 500;
    letter-spacing: 0.5px;
}

/* 搜索区域样式 */
.search-section {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 25px;
    padding: 35px;
    margin-bottom: 40px;
    box-shadow: 
        0 25px 50px rgba(0, 0, 0, 0.1),
        0 0 0 1px rgba(255, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
}

.search-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.03) 0%, rgba(118, 75, 162, 0.03) 100%);
    z-index: -1;
}

.search-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.search-box {
    position: relative;
    max-width: 600px;
    margin: 0 auto;
}

.search-input {
    width: 100%;
    padding: 18px 60px 18px 25px;
    border: 2px solid #e2e8f0;
    border-radius: 20px;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    background: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.search-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 
        0 0 0 3px rgba(102, 126, 234, 0.1),
        0 8px 25px rgba(102, 126, 234, 0.15);
    transform: translateY(-2px);
}

.search-icon {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #a0aec0;
    font-size: 1.2rem;
}

.clear-btn {
    position: absolute;
    right: 45px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #a0aec0;
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.clear-btn:hover {
    background: #f7fafc;
    color: #4a5568;
}

.filters {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    justify-content: center;
}

.filter-select {
    padding: 14px 22px;
    border: 2px solid #e2e8f0;
    border-radius: 15px;
    background: white;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 160px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.filter-select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 
        0 0 0 3px rgba(102, 126, 234, 0.1),
        0 6px 20px rgba(102, 126, 234, 0.1);
    transform: translateY(-1px);
}

.filter-select:hover {
    border-color: #cbd5e0;
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
}

.stats {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-top: 25px;
    flex-wrap: wrap;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    color: #4a5568;
    padding: 12px 20px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.stat-item:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.stat-item i {
    color: #667eea;
    font-size: 1.1rem;
}

/* 加载动画 */
.loading {
    text-align: center;
    padding: 80px 20px;
    color: white;
}

.spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(255, 255, 255, 0.2);
    border-top: 4px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 25px;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
}

.loading p {
    font-size: 1.1rem;
    font-weight: 500;
    opacity: 0.9;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 0.7; }
    50% { opacity: 1; }
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 卡片容器 */
.cards-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 
        0 15px 35px rgba(0, 0, 0, 0.1),
        0 0 0 1px rgba(255, 255, 255, 0.1);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
    position: relative;
    transform: translateY(0);
}

.card:hover {
    transform: translateY(-15px) scale(1.02);
    box-shadow: 
        0 25px 50px rgba(0, 0, 0, 0.15),
        0 0 0 1px rgba(255, 255, 255, 0.2);
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
}

.card:hover::before {
    opacity: 1;
}

.card-image {
    width: 100%;
    height: 220px;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    border-radius: 15px 15px 0 0;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.4s ease;
    border-radius: 15px 15px 0 0;
}

.card:hover .card-image img {
    transform: scale(1.08);
    filter: brightness(1.1);
}

.card-image::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        135deg, 
        rgba(255,255,255,0.1) 0%, 
        rgba(255,255,255,0.05) 50%,
        rgba(255,255,255,0) 100%
    );
    pointer-events: none;
    z-index: 2;
}

.card-content {
    padding: 25px;
    background: white;
}

.card-name {
    font-size: 1.2rem;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 15px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.3s ease;
}

.card:hover .card-name {
    color: #667eea;
}

.card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 15px;
}

.card-type, .card-race, .card-archetype {
    padding: 6px 14px;
    border-radius: 25px;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.card-type {
    background: linear-gradient(135deg, #e6fffa 0%, #b2f5ea 100%);
    color: #234e52;
}

.card-race {
    background: linear-gradient(135deg, #fef5e7 0%, #fed7aa 100%);
    color: #744210;
}

.card-archetype {
    background: linear-gradient(135deg, #faf5ff 0%, #e9d8fd 100%);
    color: #553c9a;
}

.card-type:hover, .card-race:hover, .card-archetype:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.card-stats {
    display: flex;
    gap: 20px;
    font-size: 0.95rem;
    color: #4a5568;
    margin-top: 15px;
}

.stat {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 8px;
    background: rgba(102, 126, 234, 0.05);
    border-radius: 8px;
    transition: all 0.3s ease;
}

.stat:hover {
    background: rgba(102, 126, 234, 0.1);
    transform: translateY(-1px);
}

.stat-label {
    font-weight: 600;
    color: #667eea;
}

/* 无结果样式 */
.no-results {
    text-align: center;
    padding: 80px 20px;
    color: white;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 25px;
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    margin: 20px 0;
}

.no-results i {
    font-size: 5rem;
    margin-bottom: 25px;
    opacity: 0.8;
    animation: float 3s ease-in-out infinite;
}

.no-results h3 {
    font-size: 1.8rem;
    margin-bottom: 15px;
    font-weight: 600;
}

.no-results p {
    font-size: 1.1rem;
    opacity: 0.9;
    line-height: 1.6;
}

/* 分页样式 */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-top: 40px;
}

.page-btn {
    padding: 14px 24px;
    border: 2px solid #e2e8f0;
    background: white;
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.page-btn:hover:not(:disabled) {
    border-color: #667eea;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

.page-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.page-info {
    font-weight: 600;
    color: white;
    background: rgba(255, 255, 255, 0.15);
    padding: 14px 24px;
    border-radius: 15px;
    backdrop-filter: blur(15px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* 模态框样式 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: white;
    margin: 3% auto;
    padding: 0;
    border-radius: 25px;
    width: 90%;
    max-width: 900px;
    max-height: 94vh;
    overflow-y: auto;
    position: relative;
    animation: modalSlideIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 
        0 30px 60px rgba(0, 0, 0, 0.3),
        0 0 0 1px rgba(255, 255, 255, 0.1);
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.close {
    position: absolute;
    right: 20px;
    top: 20px;
    font-size: 2rem;
    font-weight: bold;
    color: #a0aec0;
    cursor: pointer;
    z-index: 1001;
    transition: color 0.3s ease;
}

.close:hover {
    color: #4a5568;
}

.modal-body {
    padding: 0;
}

.card-detail {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    min-height: 500px;
}

.card-image {
    width: 100%;
    height: 500px;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

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

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

.card-info {
    padding: 40px;
    background: white;
    overflow-y: auto;
}

.card-info h2 {
    font-size: 2rem;
    margin-bottom: 20px;
    color: #2d3748;
    font-weight: 700;
    line-height: 1.3;
}

.card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

.card-stats {
    margin-bottom: 20px;
}

.card-stats h3 {
    font-size: 1.1rem;
    margin-bottom: 10px;
    color: #4a5568;
}

.stat-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #e2e8f0;
}

.card-description {
    margin-bottom: 20px;
}

.card-description h3 {
    font-size: 1.1rem;
    margin-bottom: 10px;
    color: #4a5568;
}

.card-description p {
    line-height: 1.6;
    color: #4a5568;
    white-space: pre-line;
}

.card-sets h3 {
    font-size: 1.1rem;
    margin-bottom: 10px;
    color: #4a5568;
}

.set-item {
    background: #f7fafc;
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 10px;
}

.set-name {
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 5px;
}

.set-details {
    font-size: 0.9rem;
    color: #718096;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    .title {
        font-size: 2rem;
    }
    
    .header-top {
        top: 15px;
        right: 15px;
    }
    
    .lang-btn {
        padding: 8px 12px;
        font-size: 0.9rem;
    }
    
    .lang-dropdown {
        min-width: 120px;
    }
    
    .search-container {
        gap: 15px;
    }
    
    .filters {
        flex-direction: column;
        align-items: center;
    }
    
    .filter-select {
        width: 100%;
        max-width: 300px;
    }
    
    .cards-container {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 20px;
    }
    
    .card-detail {
        grid-template-columns: 1fr;
    }
    
    .card-image {
        height: 300px;
    }
    
    .pagination {
        flex-direction: column;
        gap: 15px;
    }
    
    .stats {
        flex-direction: column;
        gap: 15px;
    }
}

@media (max-width: 480px) {
    .cards-container {
        grid-template-columns: 1fr;
    }
    
    .header-content {
        padding: 30px 20px;
    }
    
    .header-top {
        top: 10px;
        right: 10px;
    }
    
    .lang-btn {
        padding: 6px 10px;
        font-size: 0.8rem;
    }
    
    .lang-btn span {
        display: none;
    }
    
    .lang-btn i:first-child {
        margin-right: 0;
    }
    
    .search-section {
        padding: 20px;
    }
    
    .title {
        font-size: 1.8rem;
    }
} 