/* Species Cards Styles */

.species-header {
    margin-bottom: 1.5rem;
}

.species-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 1rem;
}

.species-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 1rem;
    overflow: hidden;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.species-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 255, 255, 0.2);
}

.species-card-image {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
    background: linear-gradient(135deg, #1e293b, #334155);
}

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

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

.species-card-badge {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    padding: 0.5rem 0.75rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: white;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

.species-card-score {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    padding: 0.5rem 0.75rem;
    border-radius: 0.5rem;
    display: flex;
    align-items: baseline;
    gap: 0.25rem;
}

.species-card-score .score-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #fbbf24;
}

.species-card-score .score-label {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.7);
}

.species-card-content {
    padding: 1.25rem;
}

.species-card-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: white;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.species-card-scientific {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.65);
    font-style: italic;
    margin-top: -0.25rem;
    margin-bottom: 0.75rem;
}

.species-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.meta-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.6rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.85);
    letter-spacing: 0.01em;
}

.meta-badge.category {
    background: rgba(59, 130, 246, 0.18);
    border-color: rgba(59, 130, 246, 0.4);
    color: #bfdbfe;
}

.meta-badge.status {
    background: rgba(16, 185, 129, 0.18);
    border-color: rgba(16, 185, 129, 0.4);
    color: #bbf7d0;
}

.meta-badge.legal {
    background: rgba(245, 158, 11, 0.18);
    border-color: rgba(245, 158, 11, 0.4);
    color: #fde68a;
}

.species-card-tip {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9375rem;
    line-height: 1.6;
    margin-bottom: 0.75rem;
}

.species-card-quickfacts {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.quickfact {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: 0.75rem;
    padding: 0.4rem 0.75rem;
    font-size: 0.8125rem;
    color: #d1fae5;
}

.meta-badge.legal,
.quickfact {
    backdrop-filter: blur(6px);
}

.quickfact-icon {
    font-size: 0.95rem;
}

.species-card-details {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.details-toggle {
    width: 100%;
    padding: 0.5rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0.5rem;
    color: rgba(255, 255, 255, 0.8);
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.875rem;
}

.details-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

.details-toggle-icon {
    transition: transform 0.2s ease;
}

.details-content {
    margin-top: 0.75rem;
    padding: 0.75rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.details-content.hidden {
    display: none;
}

.detail-item {
    padding: 0.5rem 0;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.875rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.detail-item:last-child {
    border-bottom: none;
}

.detail-item strong {
    color: rgba(255, 255, 255, 0.9);
    margin-right: 0.5rem;
}

.detail-list {
    list-style: disc;
    margin: 0.5rem 0 0 1.25rem;
    padding: 0;
    color: rgba(255, 255, 255, 0.75);
}

.detail-list li {
    margin-bottom: 0.35rem;
}

.detail-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 0.25rem;
}

.detail-link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.6rem;
    border-radius: 0.5rem;
    font-size: 0.8125rem;
    color: #c7d2fe;
    background: rgba(79, 70, 229, 0.18);
    border: 1px solid rgba(99, 102, 241, 0.3);
    transition: background 0.2s ease, color 0.2s ease;
}

.detail-link:hover {
    background: rgba(99, 102, 241, 0.35);
    color: #e0e7ff;
}

.species-empty {
    text-align: center;
    padding: 3rem 1rem;
}

.species-loading {
    text-align: center;
    padding: 3rem 1rem;
}

.species-card.selected {
    transform: translateY(-6px);
    border: 2px solid rgba(52, 211, 153, 0.6);
    box-shadow: 0 18px 35px rgba(16, 185, 129, 0.25);
}

/* Responsive */
@media (max-width: 768px) {
    .species-cards-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .species-card-image {
        height: 180px;
    }
}

@media (max-width: 640px) {
    .species-header {
        flex-direction: column;
        gap: 1rem;
    }
    
    .species-header > div {
        text-align: left;
    }
}

