/* Font Card */
.font-card {
    background: white;
    border-radius: 20px;
    padding: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    animation: cardFloat 3s ease-in-out infinite;
}

.font-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary) 0%, var(--secondary) 100%);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.font-card:hover::before {
    transform: scaleX(1);
}

.font-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgba(255, 182, 217, 0.3);
}

/* Staggered float animation */
.font-card:nth-child(1) { animation-delay: 0s; }
.font-card:nth-child(2) { animation-delay: 0.2s; }
.font-card:nth-child(3) { animation-delay: 0.4s; }
.font-card:nth-child(4) { animation-delay: 0.6s; }
.font-card:nth-child(5) { animation-delay: 0.8s; }
.font-card:nth-child(6) { animation-delay: 1s; }

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

.font-card:hover {
    animation-play-state: paused;
}

/* Font Card Header */
.font-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
}

.font-card-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 5px;
}

.font-source {
    font-size: 12px;
    color: var(--text-secondary);
    font-weight: 500;
    margin-top: 4px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.font-source::before {
    content: '📦';
    font-size: 10px;
}

.font-card-actions {
    display: flex;
    gap: 8px;
}

.card-action-btn {
    width: 32px;
    height: 32px;
    border: none;
    background: #F5F5F5;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    opacity: 0;
}

.font-card:hover .card-action-btn {
    opacity: 1;
}

.card-action-btn:hover {
    background: var(--primary);
    transform: scale(1.1);
}

.card-action-btn svg {
    width: 16px;
    height: 16px;
    color: var(--text-primary);
}

.card-action-btn:hover svg {
    color: white;
}

/* Font Preview */
.font-preview {
    background: linear-gradient(135deg, #FFF5F8 0%, #FFE8F0 100%);
    border-radius: 12px;
    padding: 30px 20px;
    margin-bottom: 15px;
    text-align: center;
    min-height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.font-preview-text {
    font-size: 32px;
    font-weight: 600;
    color: var(--text-primary);
    word-break: break-word;
}

/* Font Tags */
.font-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.font-tag {
    padding: 4px 12px;
    background: linear-gradient(135deg, rgba(255, 182, 217, 0.2) 0%, rgba(197, 163, 255, 0.2) 100%);
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-primary);
}

/* Font Notes */
.font-notes {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Font Status */
.font-status {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 12px;
    width: fit-content;
}

.font-status.loading {
    background: #F5F5F5;
    color: var(--text-secondary);
}

.font-status.success {
    background: #E8F5E9;
    color: #4CAF50;
}

.font-status.error {
    background: #FFEBEE;
    color: #F44336;
}

.font-status-icon {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
}

.font-status.loading .font-status-icon {
    background: var(--text-secondary);
}

.font-status.success .font-status-icon {
    background: #4CAF50;
}

.font-status.error .font-status-icon {
    background: #F44336;
}

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

/* Copy Button */
.copy-link-btn {
    position: absolute;
    bottom: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    border: none;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px var(--shadow);
    transition: all 0.3s ease;
    opacity: 0;
}

.font-card:hover .copy-link-btn {
    opacity: 1;
}

.copy-link-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px var(--shadow-strong);
}

.copy-link-btn:active {
    transform: scale(0.95);
}

.copy-link-btn svg {
    width: 18px;
    height: 18px;
    color: white;
}

/* Copy Success Animation */
.copy-link-btn.copied {
    background: #4CAF50;
}

.copy-link-btn.copied::after {
    content: '✓';
    position: absolute;
    color: white;
    font-size: 18px;
    font-weight: bold;
}

.copy-link-btn.copied svg {
    opacity: 0;
}

/* Delete Button */
.delete-btn {
    background: #FFEBEE !important;
}

.delete-btn:hover {
    background: #F44336 !important;
}

.delete-btn svg {
    color: #F44336;
}

.delete-btn:hover svg {
    color: white;
}

/* Responsive */
@media (max-width: 768px) {
    .font-card {
        padding: 18px;
    }
    
    .font-card-title {
        font-size: 16px;
    }
    
    .font-preview {
        padding: 25px 15px;
        min-height: 100px;
    }
    
    .font-preview-text {
        font-size: 28px;
    }
    
    .card-action-btn {
        opacity: 1;
    }
    
    .copy-link-btn {
        opacity: 1;
    }
}

@media (max-width: 480px) {
    .font-card {
        padding: 15px;
    }
    
    .font-card-title {
        font-size: 15px;
    }
    
    .font-preview {
        padding: 20px 10px;
        min-height: 80px;
    }
    
    .font-preview-text {
        font-size: 24px;
    }
    
    .font-tag {
        font-size: 11px;
        padding: 3px 10px;
    }
    
    .font-notes {
        font-size: 12px;
    }
}
