:root {
    --deep-blue: #0d47a1;
    --aqua: #00bcd4;
    --coral: #ff6b6b;
    --light-bg: #f0f8ff;
    --gray-btn: #6c757d;
    --gray-btn-hover: #5a6268;
    --text-color: #222;
    --border-color: #dde2e8;
    --success: #28a745;
    --warning: #ffc107;
    --danger: #dc3545;
    --white: #ffffff;
    --off-white: #f8f9fa;
    --shadow: rgba(13, 71, 161, 0.18);
    --telegram-blue: #0088cc;
    --success-green: #28a745;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

html, body {
    -webkit-tap-highlight-color: transparent;
    font-size: 16px;
}

body {
    background: radial-gradient(circle at top, #e6f7ff 0%, #f0f8ff 40%, #e3f2fd 100%);
    color: var(--text-color);
    min-height: 100vh;
    padding: 16px;
    padding-bottom: 100px;
    user-select: none;
}

input, textarea, [contenteditable="true"] {
    user-select: text;
    -webkit-user-select: text;
}

/* Липкое верхнее меню (на десктопе по центру как основной блок) */
.top-nav {
    position: sticky;
    top: 0;
    left: 0;
    right: 0;
    z-index: 999;
    background: linear-gradient(to right, rgba(13, 71, 161, 0.98), rgba(0, 188, 212, 0.98));
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 12px;
    color: #fff;
    box-shadow: 0 2px 8px var(--shadow);
    border-radius: 12px;
    margin-bottom: 10px;
    margin-left: auto;
    margin-right: auto;
    max-width: 1200px;
}

.nav-title {
    font-weight: 600;
    font-size: 0.95rem;
    text-align: center;
    flex: 1;
    padding: 0 10px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.nav-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    background: rgba(255, 255, 255, 0.08);
    color: white;
    cursor: pointer;
    font-size: 0.85rem;
    min-width: 40px;
    min-height: 36px;
    justify-content: center;
    touch-action: manipulation;
    backdrop-filter: blur(6px);
    position: relative;
}

.nav-btn i { font-size: 0.95rem; }
.nav-btn span { display: none; }
.nav-btn:hover {
    background: rgba(255, 255, 255, 0.16);
    transform: translateY(-1px);
}

@media (min-width: 768px) {
    .nav-btn span { display: inline; }
}

.filter-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 16px;
    height: 16px;
    padding: 0 3px;
    border-radius: 999px;
    background: var(--coral);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 0 2px rgba(13, 71, 161, 0.7);
}

#protectionOverlay {
    position: fixed;
    inset: 0;
    background: radial-gradient(circle at top, rgba(13, 71, 161, 1) 0%, rgba(0, 188, 212, 0.95) 60%, rgba(0, 0, 0, 0.75) 100%);
    z-index: 10000;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: white;
    text-align: center;
    padding: 20px;
}

header {
    background: linear-gradient(135deg, var(--deep-blue), var(--aqua));
    color: white;
    padding: 20px 22px;
    border-radius: 18px;
    margin: 0 auto 18px;
    text-align: center;
    box-shadow: 0 8px 22px rgba(13, 71, 161, 0.35);
    position: relative;
    overflow: hidden;
    max-width: 1200px;
}

header::before, header::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255,255,255,0.18) 0, transparent 60%);
    opacity: 0.7;
}
header::before { width: 260px; height: 260px; top: -120px; right: -80px; }
header::after { width: 180px; height: 180px; bottom: -110px; left: -40px; }

h1 { font-size: 1.9rem; margin-bottom: 6px; position: relative; z-index: 1; }
.subtitle { font-size: 0.98rem; opacity: 0.96; position: relative; z-index: 1; }
.latest-fish-banner {
    margin: 10px auto 2px;
    padding: 10px 12px;
    max-width: 980px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.35);
    box-shadow: 0 0 16px rgba(255, 255, 255, 0.28);
    position: relative;
    z-index: 1;
    color: #ffffff;
    font-size: 0.92rem;
    line-height: 1.4;
}
.latest-fish-wrap {
    margin-top: 8px;
    max-width: 980px;
    margin-left: auto;
    margin-right: auto;
    position: relative;
    z-index: 1;
}
.latest-fish-toggle {
    display: none;
    width: 100%;
    border: 1px solid rgba(255, 255, 255, 0.35);
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
    border-radius: 10px;
    padding: 8px 10px;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
}
.latest-fish-wrap.is-open .latest-fish-toggle {
    background: rgba(255, 255, 255, 0.2);
}
.changes-mini-toggle,
.latest-fish-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}
.toggle-icon {
    transition: transform 0.2s ease;
    font-size: 0.82rem;
}
.changes-mini-wrap.is-open .toggle-icon,
.latest-fish-wrap.is-open .toggle-icon {
    transform: rotate(180deg);
}
.latest-fish-title {
    font-weight: 700;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.35);
    margin-right: 8px;
}
.latest-fish-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    vertical-align: middle;
    margin-top: 6px;
}
.latest-fish-item {
    border: 1px solid rgba(255, 255, 255, 0.45);
    background: rgba(255, 255, 255, 0.16);
    color: #fff;
    border-radius: 999px;
    padding: 4px 10px;
    font-size: 0.82rem;
    cursor: pointer;
    transition: all 0.2s ease;
}
.latest-fish-item:hover {
    background: rgba(255, 255, 255, 0.26);
    transform: translateY(-1px);
}

.scroll-top-btn {
    position: fixed;
    bottom: 30px;
    right: 24px;
    background: linear-gradient(135deg, var(--aqua) 0%, #00acc1 100%);
    color: white;
    width: 46px;
    height: 46px;
    border-radius: 999px;
    border: none;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    box-shadow: 0 8px 18px rgba(0, 188, 212, 0.35);
    z-index: 1000;
    transition: all 0.25s ease;
    touch-action: manipulation;
}
.scroll-top-btn:hover {
    background: linear-gradient(135deg, #00acc1 0%, #0097a7 100%);
    transform: translateY(-2px) scale(1.02);
}

.container {
    display: flex;
    align-items: flex-start;
    gap: 22px;
    max-width: 1200px;
    margin: 0 auto;
}

.filter-panel {
    flex: 0 0 310px;
    background: white;
    padding: 18px 18px 22px;
    border-radius: 18px;
    box-shadow: 0 10px 24px rgba(13, 71, 161, 0.18);
    position: sticky;
    top: 84px;
    align-self: flex-start;
    max-height: calc(100vh - 110px);
    overflow-y: auto;
}

.filter-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--aqua);
}
.filter-panel-title {
    font-size: 1.05rem;
    color: var(--deep-blue);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}
.filter-panel-close {
    background: none;
    border: none;
    font-size: 1.3rem;
    color: var(--gray-btn);
    cursor: pointer;
    padding: 4px;
    border-radius: 999px;
    min-width: 32px;
    min-height: 32px;
    touch-action: manipulation;
}
.filter-panel-close:hover { background: #f1f3f5; }
.filter-panel-body { max-height: none; }
.filter-group { margin-bottom: 18px; }
.filter-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--deep-blue);
    font-size: 0.95rem;
}

.search-input {
    width: 100%;
    padding: 10px 38px 10px 12px;
    border: 1.8px solid var(--border-color);
    border-radius: 10px;
    font-size: 0.95rem;
    transition: all 0.18s;
    background: var(--off-white);
}
.search-input:focus {
    outline: none;
    border-color: var(--aqua);
    box-shadow: 0 0 0 3px rgba(0, 188, 212, 0.12);
    background: white;
}
.search-input::placeholder { color: #9aa1ab; }
.search-icon {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--aqua);
    pointer-events: none;
}

.select-container { position: relative; width: 100%; }
.select-container select {
    width: 100%;
    padding: 10px 12px;
    border: 1.8px solid var(--border-color);
    border-radius: 10px;
    font-size: 0.95rem;
    background: var(--off-white);
    color: var(--text-color);
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
}
.select-container::after {
    content: '\f078';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    top: 50%;
    right: 12px;
    transform: translateY(-50%);
    color: var(--aqua);
    pointer-events: none;
}
.select-container select:focus {
    outline: none;
    border-color: var(--aqua);
    box-shadow: 0 0 0 3px rgba(0, 188, 212, 0.12);
    background: white;
}

.slider-container { padding: 0 4px; }
input[type="range"] {
    width: 100%;
    height: 6px;
    border-radius: 4px;
    background: #e9ecef;
    outline: none;
    -webkit-appearance: none;
    transition: background 0.18s;
}
input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    background: var(--aqua);
    border-radius: 50%;
    cursor: pointer;
    border: 3px solid white;
    box-shadow: 0 2px 6px rgba(0,0,0,0.18);
    transition: all 0.15s;
}
.slider-value {
    text-align: center;
    font-weight: 600;
    color: var(--deep-blue);
    margin-top: 6px;
    font-size: 0.95rem;
    padding: 6px;
    background: var(--off-white);
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.radio-group { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.radio-label {
    background: var(--off-white);
    padding: 8px 10px;
    border-radius: 10px;
    border: 1.8px solid var(--border-color);
    cursor: pointer;
    transition: all 0.18s;
    flex: 1;
    min-width: 90px;
    text-align: center;
    position: relative;
    user-select: none;
    font-size: 0.85rem;
}
.radio-label:hover { background: #e9ecef; border-color: var(--aqua); }
.radio-label.selected {
    background: var(--aqua);
    color: white;
    border-color: var(--aqua);
    box-shadow: 0 2px 9px rgba(0, 188, 212, 0.35);
}

.filter-btn {
    padding: 10px 14px;
    border-radius: 10px;
    border: none;
    font-size: 0.92rem;
    cursor: pointer;
    transition: all 0.18s;
    width: 100%;
    text-align: center;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-weight: 600;
    min-height: 42px;
    touch-action: manipulation;
}
.clear-btn {
    background: linear-gradient(135deg, var(--gray-btn) 0%, #5a6268 100%);
    color: white;
}
.clear-btn:hover {
    background: linear-gradient(135deg, #5a6268 0%, #495057 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(108, 117, 125, 0.35);
}

.main-content { flex: 1; min-width: 0; }
.fish-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 18px;
    align-items: stretch;
}

.fish-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 18px rgba(13, 71, 161, 0.18);
    transition: all 0.22s cubic-bezier(0.25, 0.8, 0.25, 1);
    cursor: pointer;
    position: relative;
    touch-action: pan-y;
    display: flex;
    flex-direction: column;
    min-height: 0;
}
.fish-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 26px rgba(13, 71, 161, 0.24);
}
.fish-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 25%;
    right: 25%;
    height: 3px;
    background: linear-gradient(to right, var(--deep-blue), var(--aqua));
    opacity: 0;
    transition: opacity 0.18s;
}
.fish-card:hover::before { opacity: 1; }

.fish-card.skeleton { pointer-events: none; }
.skeleton-image, .skeleton-line, .skeleton-badge {
    background: #e0e7ef;
    border-radius: 8px;
    position: relative;
    overflow: hidden;
}
.fish-card.skeleton .fish-content { padding: 12px 14px 12px; }
.fish-card.skeleton .fish-image { background: none; }
.fish-card.skeleton .skeleton-image { width: 100%; height: 170px; }
.fish-card.skeleton .skeleton-line { height: 10px; margin-bottom: 8px; }
.fish-card.skeleton .skeleton-badge { height: 18px; width: 70px; }

.fish-image {
    width: 100%;
    height: 190px;
    background: linear-gradient(135deg, #e6f7ff 0%, #b3e5fc 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3.8rem;
    position: relative;
    overflow: hidden;
}
.fish-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 10px;
    transition: transform 0.25s ease-out;
}
.fish-card:hover .fish-image img { transform: scale(1.04); }

.fish-content {
    padding: 14px 16px 14px;
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
}

/* Фиксированная «шапка» карточки — во всех карточках одна высота */
.fish-card-header {
    flex: 0 0 auto;
    height: 232px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    margin-bottom: 0;
}

.fish-name {
    font-size: 1.15rem;
    color: var(--deep-blue);
    margin: 0 0 6px 0;
    padding: 0;
    font-weight: 700;
    line-height: 1.35;
    height: 2.7em;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex-shrink: 0;
}
.fish-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 8px; }
.tag-pill {
    font-size: 0.75rem;
    padding: 3px 8px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-weight: 600;
}
.tag-aggro-1 { background: #e8f5e9; color: #256029; }
.tag-aggro-2 { background: #fff3cd; color: #795548; }
.tag-aggro-3, .tag-aggro-4 { background: #fdecea; color: #c62828; }
.tag-diff-0, .tag-diff-1 { background: #e3f2fd; color: #0d47a1; }
.tag-diff-2 { background: #fff3cd; color: #795548; }
.tag-diff-3, .tag-diff-4 { background: #fdecea; color: #c62828; }

.fish-latin {
    font-size: 0.9rem;
    color: var(--gray-btn);
    font-style: italic;
    margin-bottom: 10px;
    padding-bottom: 7px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 6px;
    word-wrap: break-word;
    height: 2.6em;
    flex-shrink: 0;
    box-sizing: border-box;
    overflow: hidden;
}
.fish-latin span {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.fish-family {
    font-size: 0.86rem;
    color: var(--aqua);
    margin: 0;
    height: 1.5em;
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
    flex-shrink: 0;
    box-sizing: border-box;
    overflow: hidden;
}
.copy-latin {
    flex-shrink: 0;
    background: none;
    border: none;
    color: var(--aqua);
    cursor: pointer;
    font-size: 0.85rem;
    padding: 3px 7px;
    border-radius: 6px;
    transition: all 0.18s;
    white-space: nowrap;
    min-height: 30px;
    touch-action: manipulation;
}
.copy-latin:hover { background: #e6f7ff; color: var(--deep-blue); }

.fish-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 12px;
    height: 76px;
    flex-shrink: 0;
    align-content: flex-start;
    overflow: hidden;
}
.stat {
    display: flex;
    align-items: center;
    gap: 6px;
    background: var(--off-white);
    padding: 7px 9px;
    border-radius: 9px;
    font-size: 0.84rem;
    min-width: 0;
    flex: 1 1 calc(50% - 3px);
    box-sizing: border-box;
}
.stat i { color: var(--aqua); font-size: 0.9rem; }
.stat-aggro.aggro-1 { background: #e8f5e9; color: #256029; }
.stat-aggro.aggro-2 { background: #fff8e1; color: #8d6e63; }
.stat-aggro.aggro-3, .stat-aggro.aggro-4 { background: #ffebee; color: #c62828; }
.stat-diff.diff-0, .stat-diff.diff-1 { background: #e3f2fd; color: #0d47a1; }
.stat-diff.diff-2 { background: #fff8e1; color: #8d6e63; }
.stat-diff.diff-3, .stat-diff.diff-4 { background: #ffebee; color: #c62828; }

.fish-desc {
    font-size: 0.9rem;
    line-height: 1.6;
    margin: 0 0 14px 0;
    padding: 0;
    color: #555;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
    min-height: 4.8em;
}

.btn-group {
    display: flex;
    gap: 8px;
    margin-top: auto;
    flex-shrink: 0;
}
.btn {
    padding: 9px 12px;
    border-radius: 9px;
    border: none;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.18s;
    flex: 1;
    text-align: center;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-weight: 600;
    min-height: 40px;
    touch-action: manipulation;
}
.btn-details {
    background: linear-gradient(135deg, var(--aqua) 0%, #00acc1 100%);
    color: white;
}
.btn-details:hover {
    background: linear-gradient(135deg, #00acc1 0%, #0097a7 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(0, 188, 212, 0.32);
}
.btn-google {
    background: linear-gradient(135deg, var(--gray-btn) 0%, #5a6268 100%);
    color: white;
}
.btn-google:hover {
    background: linear-gradient(135deg, #5a6268 0%, #495057 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(108, 117, 125, 0.35);
}
/* ============================================
   ВСПЛЫВАЮЩЕЕ ОКНО — детальная информация о рыбе
   ============================================ */
.detail-modal {
    position: fixed;
    inset: 0;
    z-index: 1100;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 16px;
    box-sizing: border-box;
}
.detail-modal.is-open {
    display: flex;
}
.detail-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    cursor: pointer;
    animation: detailModalFadeIn 0.25s ease;
}
.detail-modal-box {
    position: relative;
    width: 100%;
    max-width: 720px;
    max-height: 90vh;
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.25);
    overflow: auto;
    z-index: 1;
    animation: detailModalSlideIn 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}
.detail-modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 10;
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.5);
    color: #fff;
    font-size: 1.25rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, transform 0.2s;
}
.detail-modal-close:hover {
    background: rgba(0, 0, 0, 0.7);
    transform: scale(1.05);
}
.detail-modal-body {
    padding: 8px 16px 24px;
}
@keyframes detailModalFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
@keyframes detailModalSlideIn {
    from { opacity: 0; transform: scale(0.96) translateY(20px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}
body.detail-modal-open {
    overflow: hidden;
}

/* ============================================
   ДЕТАЛЬНЫЙ ПРОСМОТР РЫБЫ — контент внутри модалки
   ============================================ */

.detail-page {
    animation: detailFadeIn 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes detailFadeIn {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Герой: название + фото — актуальный вид */
.detail-hero {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
    background: linear-gradient(165deg, #0d47a1 0%, #0a3d7a 35%, #006064 100%);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(13, 71, 161, 0.28), 0 0 0 1px rgba(255,255,255,0.06) inset;
    margin-bottom: 24px;
    position: relative;
}

.detail-hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    pointer-events: none;
    opacity: 0.6;
}

@media (min-width: 640px) {
    .detail-hero {
        grid-template-columns: 1fr 300px;
    }
}

.detail-hero-text {
    padding: 28px 24px 24px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    z-index: 1;
}

.detail-hero h1 {
    font-size: 1.85rem;
    font-weight: 700;
    color: #fff;
    margin: 0 0 10px 0;
    line-height: 1.25;
    letter-spacing: -0.02em;
    text-shadow: 0 1px 2px rgba(0,0,0,0.15);
}

.detail-hero-latin {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 14px;
}

.detail-hero-latin span {
    font-size: 1.05rem;
    color: rgba(255, 255, 255, 0.92);
    font-style: italic;
}

.detail-hero .copy-latin {
    background: rgba(255, 255, 255, 0.18);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.4);
    padding: 8px 14px;
    border-radius: 10px;
    font-size: 0.85rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: background 0.2s, border-color 0.2s, transform 0.2s;
}

.detail-hero .copy-latin:hover {
    background: rgba(255, 255, 255, 0.28);
    border-color: rgba(255, 255, 255, 0.6);
    transform: translateY(-1px);
}

.detail-hero-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.detail-hero-tags .tag-pill {
    font-size: 0.82rem;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.35);
    backdrop-filter: blur(6px);
}

.detail-hero-image {
    min-height: 220px;
    background: linear-gradient(145deg, rgba(0, 188, 212, 0.2) 0%, rgba(13, 71, 161, 0.15) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.detail-hero-image::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 70% 70% at 50% 50%, rgba(255,255,255,0.12) 0%, transparent 65%);
    pointer-events: none;
}

.detail-hero-image img {
    max-width: 100%;
    max-height: 280px;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 14px;
    position: relative;
    z-index: 1;
    box-shadow: 0 8px 24px rgba(0,0,0,0.2);
}

.detail-hero-image .detail-placeholder {
    font-size: 4.5rem;
    color: var(--aqua);
    opacity: 0.95;
    filter: drop-shadow(0 2px 8px rgba(0,0,0,0.2));
}

/* Карточки секций — современные карточки */
.detail-card {
    background: #fff;
    border-radius: 18px;
    padding: 22px 24px;
    margin-bottom: 18px;
    box-shadow: 0 4px 24px rgba(13, 71, 161, 0.08), 0 0 0 1px rgba(13, 71, 161, 0.04);
    border: 1px solid rgba(13, 71, 161, 0.06);
    transition: box-shadow 0.25s ease;
}

.detail-card:hover {
    box-shadow: 0 8px 32px rgba(13, 71, 161, 0.1), 0 0 0 1px rgba(13, 71, 161, 0.06);
}

.detail-section-title {
    font-size: 1.02rem;
    font-weight: 700;
    color: var(--deep-blue);
    margin: 0 0 16px 0;
    display: flex;
    align-items: center;
    gap: 10px;
    padding-bottom: 10px;
    border-bottom: 2px solid rgba(0, 188, 212, 0.2);
}

.detail-section-title i {
    color: var(--aqua);
    font-size: 1.1rem;
}

/* Сетка основных параметров */
.detail-stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

@media (min-width: 480px) {
    .detail-stats-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.detail-stat-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    min-height: 52px;
    background: var(--off-white, #f8f9fa);
    border-radius: 14px;
    font-size: 0.9rem;
    border: 1px solid var(--border-color, #e9ecef);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.detail-stat-item:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}

.detail-stat-item i {
    color: var(--aqua);
    font-size: 1.05rem;
    min-width: 22px;
    text-align: center;
}

.detail-stat-item.aggro-1 { background: #e8f5e9; border-color: #c8e6c9; color: #2e7d32; }
.detail-stat-item.aggro-2 { background: #fff8e1; border-color: #ffecb3; color: #6d4c41; }
.detail-stat-item.aggro-3,
.detail-stat-item.aggro-4 { background: #ffebee; border-color: #ffcdd2; color: #c62828; }

.detail-stat-item.diff-0,
.detail-stat-item.diff-1 { background: #e3f2fd; border-color: #bbdefb; color: #0d47a1; }
.detail-stat-item.diff-2 { background: #fff8e1; border-color: #ffecb3; color: #6d4c41; }
.detail-stat-item.diff-3,
.detail-stat-item.diff-4 { background: #ffebee; border-color: #ffcdd2; color: #c62828; }

/* Параметры воды */
.detail-params-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px;
}

.detail-param {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    min-height: 52px;
    background: linear-gradient(135deg, #e8f7fa 0%, #e0f2f7 100%);
    border-radius: 12px;
    font-size: 0.88rem;
    border: 1px solid rgba(0, 188, 212, 0.25);
    transition: box-shadow 0.2s ease;
}

.detail-param:hover {
    box-shadow: 0 2px 12px rgba(0, 188, 212, 0.12);
}

.detail-param i {
    color: var(--aqua);
    font-size: 1rem;
}

/* Совместимость */
.detail-compat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px;
}

.detail-compat-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    min-height: 52px;
    box-sizing: border-box;
    border-radius: 12px;
    font-size: 0.86rem;
    font-weight: 600;
    transition: transform 0.2s ease;
}

.detail-compat-item:hover {
    transform: scale(1.02);
}

.detail-compat-item.ok {
    background: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #a5d6a7;
}

.detail-compat-item.no {
    background: #ffebee;
    color: #c62828;
    border: 1px solid #ef9a9a;
}

.detail-compat-item i {
    font-size: 0.95rem;
}

/* Кормление */
.detail-feed-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px;
}

.detail-feed-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    min-height: 52px;
    background: linear-gradient(135deg, #fafafa 0%, #f5f5f5 100%);
    border-radius: 12px;
    font-size: 0.9rem;
    border: 1px solid #eee;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.detail-feed-item:hover {
    border-color: rgba(0, 188, 212, 0.3);
    box-shadow: 0 2px 10px rgba(0, 188, 212, 0.08);
}

.detail-feed-item i {
    color: var(--aqua);
    font-size: 1rem;
}

/* Описание */
.detail-description {
    font-size: 1.02rem;
    line-height: 1.75;
    color: #37474f;
    margin: 0;
}

/* Блок заметок */
.detail-notes {
    background: linear-gradient(135deg, #fffbf0 0%, #fff8e1 100%);
    border-radius: 16px;
    padding: 20px 22px;
    border-left: 5px solid #ffc107;
    margin-bottom: 18px;
    box-shadow: 0 4px 20px rgba(255, 193, 7, 0.12), 0 0 0 1px rgba(255, 193, 7, 0.08);
}

.detail-notes .detail-section-title {
    color: #795548;
    border-bottom-color: rgba(255, 152, 0, 0.25);
}

.detail-notes .detail-section-title i {
    color: #ff9800;
}

.detail-notes p {
    color: #5d4e37;
    font-size: 0.98rem;
    line-height: 1.7;
    margin: 0;
}

/* Кнопка Google внизу */
.detail-actions {
    text-align: center;
    padding: 16px 0 8px;
}

.detail-actions .btn-google {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 28px;
    border-radius: 14px;
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    color: #fff;
    background: linear-gradient(135deg, var(--gray-btn) 0%, #5a6268 100%);
    border: none;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.detail-actions .btn-google:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(108, 117, 125, 0.4);
}

/* Конец блока детального просмотра */

.no-results {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px 16px;
    color: var(--deep-blue);
    background: white;
    border-radius: 16px;
    box-shadow: 0 8px 18px rgba(13, 71, 161, 0.16);
    animation: fadeIn 0.35s ease;
}
.no-results i { font-size: 3.2rem; color: var(--aqua); margin-bottom: 12px; }
.no-results h3 { font-size: 1.25rem; margin-bottom: 6px; }
.search-highlight {
    background-color: #fff3cd;
    padding: 0 2px;
    border-radius: 3px;
    font-weight: 600;
    color: #856404;
}
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
}

.footer {
    background: white;
    padding: 18px 20px;
    border-radius: 16px;
    margin: 24px auto 0;
    text-align: center;
    box-shadow: 0 8px 18px rgba(13, 71, 161, 0.16);
    max-width: 1200px;
    font-size: 0.9rem;
}

.copy-notification {
    position: fixed;
    top: 14px;
    right: 14px;
    background: #28a745;
    color: white;
    padding: 9px 14px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    gap: 7px;
    z-index: 1000;
    box-shadow: 0 6px 16px rgba(0,0,0,0.24);
    animation: slideIn 0.25s ease;
    font-size: 0.88rem;
}
@keyframes slideIn {
    from { transform: translateX(120%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}
@keyframes slideOut {
    from { transform: translateX(0); opacity: 1; }
    to { transform: translateX(120%); opacity: 0; }
}

.mobile-actions {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    background: white;
    border-top: 1px solid var(--border-color);
    display: none;
    justify-content: space-around;
    align-items: center;
    padding: 4px 4px env(safe-area-inset-bottom);
    z-index: 1000;
    box-shadow: 0 -4px 12px rgba(0,0,0,0.12);
}
.mobile-action-btn {
    flex: 1;
    max-width: 25%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1px;
    padding: 4px 2px;
    border: none;
    background: none;
    color: var(--deep-blue);
    font-size: 0.72rem;
    text-decoration: none;
    cursor: pointer;
    min-height: 40px;
    touch-action: manipulation;
    position: relative;
}
.mobile-action-btn i { font-size: 1.15rem; }
.mobile-action-btn:active { background: #e6f7ff; border-radius: 10px; }

/* Мобильная версия */
@media (max-width: 900px) {
    .container { flex-direction: column; gap: 12px; }
    .filter-panel {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        top: auto;
        max-height: 78vh;
        padding: 14px 14px 18px;
        border-radius: 16px 16px 0 0;
        transform: translateY(100%);
        transition: transform 0.26s ease-out, box-shadow 0.26s ease-out;
        z-index: 1001;
        box-shadow: 0 -10px 22px rgba(0,0,0,0.28);
        overscroll-behavior: contain;
        flex: 1 1 auto;
    }
    .filter-panel.open { transform: translateY(0); }
    .filter-panel-body {
        max-height: calc(78vh - 52px);
        overflow-y: auto;
        padding-top: 4px;
    }
    .main-content { width: 100%; }
    .fish-grid { grid-template-columns: 1fr; }
    /* Нижняя панель и отступ только при открытых фильтрах (по кнопке «Фильтры» сверху) */
    .mobile-actions { display: none; }
    body.mobile-filters-open .mobile-actions { display: flex; }
    body { padding-bottom: 24px; }
    body.mobile-filters-open { padding-bottom: 86px; }
    .scroll-top-btn { bottom: 24px; right: 18px; width: 42px; height: 42px; font-size: 1.15rem; }
    body.mobile-filters-open .scroll-top-btn { bottom: 72px; }
    .detail-modal-body { padding: 6px 12px 18px; }
    .detail-modal-body .btn-google { width: 100%; margin-top: 8px; }
}

@media (max-width: 768px) {
    body { padding: 12px; padding-bottom: 24px; }
    body.mobile-filters-open { padding-bottom: 86px; }
    header { padding: 16px 14px 18px; margin-bottom: 16px; }
    h1 { font-size: 1.7rem; }
    .subtitle { font-size: 0.95rem; }
    .latest-fish-wrap {
        width: 100%;
        max-width: 980px;
        margin-left: auto;
        margin-right: auto;
    }
    .latest-fish-toggle {
        display: flex;
        width: 100%;
        box-sizing: border-box;
        padding: 8px 10px;
        border-radius: 10px;
    }
    .latest-fish-banner {
        display: none;
        margin-top: 6px;
        width: 100%;
        box-sizing: border-box;
        padding: 8px 10px;
        border-radius: 10px;
        font-size: 0.82rem;
        line-height: 1.35;
    }
    .latest-fish-wrap.is-open .latest-fish-banner {
        display: block;
    }
    .latest-fish-title {
        display: block;
        margin-right: 0;
        margin-bottom: 4px;
    }
    .latest-fish-item {
        font-size: 0.78rem;
        padding: 4px 8px;
        line-height: 1.2;
    }
    .fish-content { padding: 12px 14px 12px; }
    .fish-name { font-size: 1.08rem; }
    .btn-group { flex-direction: column; }
    .btn { width: 100%; }
    /* Детальная карточка — компактнее */
    .detail-modal-body { padding: 6px 12px 16px; }
    .detail-hero { margin-bottom: 14px; border-radius: 14px; }
    .detail-hero-text { padding: 16px 14px 14px; }
    .detail-hero h1 { font-size: 1.45rem; margin-bottom: 6px; }
    .detail-hero-latin { margin-bottom: 0; gap: 8px; }
    .detail-hero-latin span { font-size: 0.95rem; }
    .detail-hero .copy-latin { padding: 6px 10px; font-size: 0.8rem; }
    .detail-hero-image { min-height: 160px; padding: 12px; }
    .detail-hero-image img { max-height: 200px; }
    .detail-hero-image .detail-placeholder { font-size: 3.2rem; }
    .detail-card { padding: 14px 16px; margin-bottom: 12px; border-radius: 14px; }
    .detail-section-title { font-size: 0.95rem; margin-bottom: 10px; padding-bottom: 8px; }
    .detail-section-title i { font-size: 1rem; }
    .detail-stats-grid { gap: 8px; }
    .detail-stat-item { padding: 10px 12px; min-height: 44px; font-size: 0.85rem; border-radius: 10px; }
    .detail-stat-item i { font-size: 0.95rem; min-width: 18px; }
    .detail-params-grid { gap: 8px; }
    .detail-param { padding: 10px 12px; min-height: 44px; font-size: 0.82rem; border-radius: 10px; }
    .detail-param i { font-size: 0.9rem; }
    .detail-compat-grid { gap: 8px; }
    .detail-compat-item { padding: 8px 12px; min-height: 44px; font-size: 0.8rem; border-radius: 10px; }
    .detail-feed-list { gap: 8px; }
    .detail-feed-item { padding: 10px 12px; min-height: 44px; font-size: 0.85rem; border-radius: 10px; }
    .detail-description { font-size: 0.92rem; line-height: 1.6; }
    .detail-notes { padding: 14px 16px; border-radius: 12px; margin-bottom: 12px; }
    .detail-notes .detail-section-title { font-size: 0.95rem; }
    .detail-notes p { font-size: 0.9rem; }
    .detail-actions { padding: 10px 0 6px; }
    .detail-actions .btn-google { padding: 8px 16px; font-size: 0.9rem; }
}

@media (max-width: 480px) {
    header { padding: 14px 10px 16px; }
    h1 { font-size: 1.45rem; }
    .fish-image { height: 180px; font-size: 3.4rem; }
    .radio-label { min-width: 78px; padding: 8px 8px; font-size: 0.8rem; }
    .slider-value { font-size: 0.9rem; }
    /* Детальная карточка — ещё компактнее */
    .detail-modal-body { padding: 4px 10px 12px; }
    .detail-hero { margin-bottom: 10px; border-radius: 12px; }
    .detail-hero-text { padding: 12px 12px 10px; }
    .detail-hero h1 { font-size: 1.28rem; margin-bottom: 4px; }
    .detail-hero-latin span { font-size: 0.88rem; }
    .detail-hero .copy-latin { padding: 5px 8px; font-size: 0.75rem; }
    .detail-hero-image { min-height: 140px; padding: 10px; }
    .detail-hero-image img { max-height: 160px; }
    .detail-hero-image .detail-placeholder { font-size: 2.8rem; }
    .detail-card { padding: 12px 14px; margin-bottom: 10px; border-radius: 12px; }
    .detail-section-title { font-size: 0.9rem; margin-bottom: 8px; padding-bottom: 6px; }
    .detail-stats-grid { grid-template-columns: 1fr; gap: 6px; }
    .detail-stat-item { padding: 10px 12px; min-height: 42px; font-size: 0.84rem; }
    .detail-param { padding: 8px 10px; min-height: 42px; font-size: 0.8rem; }
    .detail-compat-item { padding: 8px 10px; min-height: 42px; font-size: 0.78rem; }
    .detail-feed-item { padding: 8px 10px; min-height: 42px; font-size: 0.82rem; }
    .detail-description { font-size: 0.9rem; line-height: 1.55; }
    .detail-notes { padding: 12px 14px; margin-bottom: 10px; }
    .detail-notes p { font-size: 0.88rem; }
    .scroll-top-btn { bottom: 76px; right: 14px; width: 38px; height: 38px; font-size: 1.05rem; }
    .footer { padding: 14px 12px; font-size: 0.88rem; }
}

@media (min-height: 1000px) {
    .scroll-top-btn { bottom: 96px; right: 36px; width: 52px; height: 52px; font-size: 1.6rem; }
}
