:root {
    --bg: #0b1220;
    --card: #101827;
    --accent: #ef5350;
    --muted: #9aa7b2;
    --glass: rgba(255, 255, 255, 0.05);
}
* { box-sizing: border-box; }
body {
    font-family: "Segoe UI", Arial, sans-serif;
    background: linear-gradient(180deg, #021124, #041428);
    color: #e6eef6;
    margin: 0;
    padding: 20px;
}
h1 { margin: 0; font-size: 22px; }
header { margin-bottom: 20px; }
.app {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 20px;
}
@media (max-width: 800px) {
    .app { grid-template-columns: 1fr; }
}
.panel {
    background: var(--card);
    padding: 14px;
    border-radius: 12px;
    box-shadow: 0 6px 18px rgba(0,0,0,0.4);
}
label {
    display: block;
    margin-top: 12px;
    font-size: 14px;
    color: var(--muted);
}
input[type=text],
input[type=number],
textarea {
    width: 100%;
    padding: 8px;
    margin-top: 4px;
    border-radius: 8px;
    border: 1px solid var(--glass);
    background: var(--glass);
    color: #fff;
}
textarea {
    resize: vertical;
    min-height: 80px;
}
button {
    background: var(--accent);
    color: #fff;
    border: none;
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
    margin-top: 12px;
}
button:hover {
    opacity: 0.9;
}
.add-type button {
    margin-top: 0;
}
.types-list,
.badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}
.badge {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 4px; 
    background: #fff;
    color: #000;
    padding: 4px 10px 4px 8px;
    border-radius: 999px;
    font-size: 12px;
    cursor: default;
}
.types-list .badge {
    cursor: pointer; 
}
.badge.selected {
    background: var(--accent);
    color: white;
}
.badge .delete-btn {
    color: var(--muted);
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
    padding-left: 4px;
    transition: color 0.2s;
}
.badge .delete-btn:hover {
    color: var(--accent); 
}
.badge.selected .delete-btn {
    color: white; 
}
.badge.selected .delete-btn:hover {
    color: #ffd0d0;
}
.add-type {
    display: flex;
    gap: 6px;
    margin-top: 6px;
}
.entries {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 12px;
}
.card {
    background: var(--card);
    padding: 12px;
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}
.card-header-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px; 
}
.card h3 {
    margin: 0;
    font-size: 16px;
    margin-right: 10px; 
    flex-shrink: 1;
}
.card-buttons {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}
.card button.edit-btn,
.card button.delete-btn {
    margin: 0;
    padding: 4px 8px;
    font-size: 12px;
}
.card button.edit-btn {
    background: #4caf50;
}
.card button.delete-btn {
    background: #d32f2f;
}
.thumb {
    width: 100%;
    height: 150px;
    background: #091522;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    border-radius: 8px;
    margin-bottom: 10px;
}
.thumb img {
    max-width: 100%;
    max-height: 100%;
    object-fit: cover;
}
.card p.species-text {
    font-size: 14px;
    font-weight: bold;
    color: #fff;
    margin: 6px 0;
}
.card p {
    font-size: 13px;
    color: var(--muted);
    margin: 6px 0 10px 0;
}
.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}
.stats-grid input[type=number] {
    text-align: right;
}
.card .stats {
    margin-top: 10px;
    padding-top: 8px;
    border-top: 1px solid var(--glass);
    font-size: 13px;
    margin-bottom: 10px;
}
.card .stat-line {
    display: flex;
    justify-content: space-between;
    margin-bottom: 2px;
}
.card .stat-value {
    font-weight: bold;
    color: #e6eef6;
}
