/* 卡片详情弹窗样式 */
@keyframes spin {
    to { transform: rotate(360deg); }
}

@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}

.card-detail-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    z-index: 9999999;
    justify-content: center;
    align-items: center;
    transition: opacity 0.3s ease;
}

.card-detail-modal.active {
    display: flex;
    animation: fadeIn 0.3s ease;
}

.card-detail-modal-content {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border-radius: 20px;
    border: 1px solid rgba(255, 215, 0, 0.3);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
    width: 90%;
    max-width: 900px;
    max-height: 90vh;
    overflow: auto;
    position: relative;
    transition: all 0.3s ease;
}

.card-detail-modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 32px;
    color: #888;
    cursor: pointer;
    transition: color 0.3s;
    z-index: 10;
}

.card-detail-modal-close:hover {
    color: white;
}

.card-detail-content {
    padding: 30px;
}

/* 加载状态 */
.card-detail-loading {
    text-align: center;
    padding: 100px 20px;
}

.card-detail-loading .spinner {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(255, 215, 0, 0.3);
    border-top-color: #ffd700;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

.card-detail-loading p {
    color: #e0e0e0;
    font-size: 16px;
}

/* 错误状态 */
.card-detail-error {
    text-align: center;
    padding: 100px 20px;
}

.card-detail-error .error-icon {
    font-size: 4rem;
    margin-bottom: 20px;
}

.card-detail-error .error-message {
    color: #ff6b6b;
    font-size: 18px;
    margin-bottom: 30px;
}

.card-detail-error .error-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.card-detail-error .btn {
    padding: 12px 30px;
    border: none;
    border-radius: 30px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.card-detail-error .btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.card-detail-error .btn-secondary {
    background: transparent;
    color: #94a3b8;
    border: 2px solid #4a5568;
}

/* 卡片详情内容 */
.card-detail-grid {
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
}

.card-detail-image {
    flex: 1;
    min-width: 300px;
    text-align: center;
}

.card-detail-image img {
    max-width: 100%;
    max-height: 500px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    transition: transform 0.3s ease;
}

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

.card-detail-info {
    flex: 1;
    min-width: 300px;
}

.card-detail-name {
    color: #ffd700;
    font-size: 24px;
    margin-bottom: 10px;
}

.card-detail-name-en {
    color: #94a3b8;
    font-size: 18px;
    margin-bottom: 20px;
}

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

.card-detail-meta-item {
    background: #0f172a;
    padding: 5px 15px;
    border-radius: 20px;
    color: #e2e8f0;
    font-size: 14px;
}

.card-detail-meta-price {
    background: #0f172a;
    padding: 5px 15px;
    border-radius: 20px;
    color: #10b981;
    font-weight: bold;
}

.card-detail-section {
    margin: 20px 0;
}

.card-detail-section-title {
    color: #e2e8f0;
    margin-bottom: 10px;
}

.card-detail-section-content {
    background: rgba(255, 255, 255, 0.05);
    padding: 15px;
    border-radius: 10px;
    border-left: 4px solid #667eea;
}

.card-detail-effect {
    color: #cbd5e1;
    line-height: 1.6;
    white-space: pre-wrap;
}

.card-detail-flavor {
    font-style: italic;
    color: #94a3b8;
}

.card-detail-attributes {
    color: #e2e8f0;
}

.card-detail-actions {
    margin-top: 30px;
}

.card-detail-action-btn {
    display: inline-block;
    padding: 12px 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-decoration: none;
    border-radius: 30px;
    font-weight: bold;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.card-detail-action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
}

/* 滚动条样式 */
.card-detail-modal-content::-webkit-scrollbar {
    width: 8px;
}

.card-detail-modal-content::-webkit-scrollbar-track {
    background: #1e293b;
}

.card-detail-modal-content::-webkit-scrollbar-thumb {
    background: #4a5568;
    border-radius: 4px;
}

.card-detail-modal-content::-webkit-scrollbar-thumb:hover {
    background: #667eea;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .card-detail-modal-content {
        width: 95%;
        max-height: 95vh;
    }
    
    .card-detail-content {
        padding: 20px;
    }
    
    .card-detail-grid {
        flex-direction: column;
    }
    
    .card-detail-image,
    .card-detail-info {
        min-width: 100%;
    }
    
    .card-detail-name {
        font-size: 20px;
    }
    
    .card-detail-name-en {
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .card-detail-content {
        padding: 15px;
    }
    
    .card-detail-meta {
        gap: 5px;
    }
    
    .card-detail-meta-item {
        font-size: 12px;
        padding: 4px 12px;
    }
    
    .card-detail-section-content {
        padding: 12px;
    }
}
