.km-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,.1);
    padding: 0;
    margin-bottom: 15px;
    border: 1px solid #e9ecef;
    transition: all 0.2s ease;
    overflow: hidden;
}

.km-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,.15);
    border-color: #007bff;
}

.km-card-header {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 15px 20px;
    border-bottom: 1px solid #dee2e6;
}

.km-card-body {
    padding: 20px;
}

.km-card-footer {
    background: #f8f9fa;
    padding: 15px 20px;
    border-top: 1px solid #dee2e6;
}

.km-title {
    font-weight: 700;
    margin: 0;
    color: #2c3e50;
    font-size: 1.3rem;
    text-align: center;
}

.km-meta {
    font-size: .9rem;
    color: #6b7280;
    margin-bottom: 10px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.km-badge {
    background: #e9ecef;
    border-radius: 15px;
    padding: 4px 10px;
    font-size: 0.8rem;
    color: #495057;
    font-weight: 500;
}

.km-badge-start {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    color: #1565c0;
    border: 1px solid #90caf9;
}

.km-badge-target {
    background: linear-gradient(135deg, #f3e5f5 0%, #e1bee7 100%);
    color: #7b1fa2;
    border: 1px solid #ce93d8;
}

.km-badge-clickable {
    cursor: pointer !important;
    transition: all 0.2s ease;
    background: #007bff !important;
    color: white !important;
    border: 1px solid #0056b3;
}

.km-badge-clickable:hover {
    background: #0056b3 !important;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,123,255,0.3);
}

.km-badge-clickable i {
    margin-right: 4px;
    color: white !important;
}

.km-progress {
    height: 16px;
    background: #e9ecef;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 15px;
    border: 1px solid #dee2e6;
    position: relative;
}

.km-progress__bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #28a745, #20c997, #17a2b8);
    transition: width 0.8s ease;
    border-radius: 7px;
    position: relative;
}

.km-progress__bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.km-stats {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 0;
    font-size: 0.95rem;
    color: #495057;
}

.km-stats strong {
    color: #2c3e50;
    font-weight: 600;
}

.km-stat-item {
    text-align: center;
    flex: 1;
}

.km-stat-item:first-child {
    border-right: 1px solid #dee2e6;
    padding-right: 15px;
    margin-right: 15px;
}

.km-stat-label {
    font-size: 0.8rem;
    color: #6c757d;
    margin-bottom: 2px;
}

.km-stat-value {
    font-size: 1.1rem;
    font-weight: 700;
    color: #2c3e50;
}

.km-hit {
    color: #155724;
    background: #d4edda;
    border: 1px solid #c3e6cb;
    border-radius: 8px;
    padding: 6px 12px;
    font-weight: 600;
    display: inline-flex;
    gap: 6px;
    align-items: center;
    margin-top: 10px;
    font-size: 0.9rem;
}

.confetti {
    position: relative;
}

.confetti:after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 30% 20%, rgba(255,199,0,.5), transparent 40%), 
                radial-gradient(circle at 70% 60%, rgba(0,199,255,.4), transparent 40%);
    animation: pop .9s ease-out forwards;
    pointer-events: none;
}

@keyframes pop {
    from {
        opacity: 0;
        transform: scale(.96);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.hidden {
    display: none;
}

/* Grid responsive */
.km-baskets-grid {
    display: grid;
    gap: 15px;
    grid-template-columns: 1fr;
}

@media (min-width: 768px) {
    .km-baskets-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1200px) {
    .km-baskets-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 1400px) {
    .km-baskets-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Empty state styling */
#km-baskets-empty {
    text-align: center;
    color: #6c757d;
    font-style: italic;
    padding: 2rem;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px dashed #dee2e6;
}
