/* 現代化卡片樣式 - 基於 Uiverse.io 設計風格 */

/* 基礎卡片樣式 */
.card {
    background: linear-gradient(145deg, #ffffff, #f8fafc);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    padding: 24px;
    margin-bottom: 24px;
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 
        0 4px 6px -1px rgba(0, 0, 0, 0.1),
        0 2px 4px -1px rgba(0, 0, 0, 0.06),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    color: var(--text-color, #1f2937);
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #667eea, #764ba2, #f093fb, #f5576c);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: 
        0 35px 60px -12px rgba(0, 0, 0, 0.3),
        0 0 0 1px rgba(255, 255, 255, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

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

/* 卡片標題 */
.card-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1.5rem 2rem;
    margin: -2rem -2rem 2rem -2rem;
    border-radius: 24px 24px 0 0;
    position: relative;
    overflow: hidden;
}

.card-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(255,255,255,0.1) 0%, transparent 50%);
    pointer-events: none;
}

.card-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.card h1, .card h2, .card h3, .card h4, .card h5, .card h6 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--text-color, #1f2937);
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.card-subtitle {
    font-size: 1rem;
    opacity: 0.9;
    margin: 0.5rem 0 0 0;
    font-weight: 400;
}

/* 卡片主體 */
.card-body, .card p, .card-text {
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text-muted, #4b5563);
    margin-bottom: 20px;
}

/* 卡片底部 */
.card-footer {
    background: linear-gradient(145deg, #f8fafc, #ffffff);
    padding: 1.5rem 2rem;
    margin: 2rem -2rem -2rem -2rem;
    border-radius: 0 0 24px 24px;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

/* 特殊卡片變體 */
.card-glass {
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
}

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

.card-gradient .card-text {
    color: rgba(255, 255, 255, 0.9);
}

.card-dark {
    background: linear-gradient(145deg, #1f2937, #111827);
    color: white;
    border-color: rgba(255, 255, 255, 0.1);
}

.card-dark .card-text {
    color: #e5e7eb;
}

/* 卡片組 */
.card-group {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

/* 卡片網格 */
.card-grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

.card-grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.card-grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
}

/* 響應式網格 */
@media (max-width: 1200px) {
    .card-grid-4 {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .card-grid-2,
    .card-grid-3,
    .card-grid-4 {
        grid-template-columns: 1fr;
    }
    
    .card {
        padding: 1.5rem;
        border-radius: 20px;
    }
    
    .card-header {
        padding: 1.25rem 1.5rem;
        margin: -1.5rem -1.5rem 1.5rem -1.5rem;
    }
    
    .card-footer {
        padding: 1.25rem 1.5rem;
        margin: 1.5rem -1.5rem -1.5rem -1.5rem;
    }
    
    .card-title {
        font-size: 1.25rem;
    }
}

/* 卡片動畫 */
@keyframes cardSlideIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card-animate {
    animation: cardSlideIn 0.6s ease-out;
}

/* 卡片圖片 */
.card-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 16px;
    margin-bottom: 1.5rem;
}

.card-image-top {
    border-radius: 24px 24px 0 0;
    margin: -2rem -2rem 2rem -2rem;
}

/* 卡片徽章 */
.card-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 600;
    box-shadow: 0 4px 14px rgba(240, 147, 251, 0.4);
}

/* 卡片統計 */
.card-stats {
    display: flex;
    justify-content: space-around;
    padding: 1.5rem 0;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    margin-top: 1.5rem;
}

.card-stat {
    text-align: center;
}

.card-stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: #667eea;
    display: block;
}

.card-stat-label {
    font-size: 0.875rem;
    color: #6b7280;
    font-weight: 500;
}

/* 卡片操作按鈕 */
.card-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}

.card-actions .btn {
    flex: 1;
    min-width: 120px;
}

/* 緊湊卡片 */
.card-compact {
    padding: 1.5rem;
    border-radius: 16px;
}

.card-compact .card-header {
    padding: 1rem 1.5rem;
    margin: -1.5rem -1.5rem 1.5rem -1.5rem;
}

.card-compact .card-footer {
    padding: 1rem 1.5rem;
    margin: 1.5rem -1.5rem -1.5rem -1.5rem;
}

/* 卡片懸停效果 */
.card-hover-lift:hover {
    transform: translateY(-12px) scale(1.02);
}

.card-hover-glow:hover {
    box-shadow: 
        0 35px 60px -12px rgba(102, 126, 234, 0.4),
        0 0 0 1px rgba(102, 126, 234, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

/* 卡片邊框變體 */
.card-border-primary {
    border-left: 4px solid #667eea;
}

.card-border-success {
    border-left: 4px solid #10b981;
}

.card-border-warning {
    border-left: 4px solid #f59e0b;
}

.card-border-danger {
    border-left: 4px solid #ef4444;
}