/* ===== RESET & BASE ===== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-primary: #0a0e1a;
    --bg-secondary: #111827;
    --bg-card: #1a2235;
    --bg-card-hover: #1f2a3f;
    --border: #2a3550;
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --accent-cyan: #06b6d4;
    --accent-purple: #8b5cf6;
    --accent-blue: #3b82f6;
    --great: #10b981;
    --great-bg: rgba(16, 185, 129, 0.12);
    --compatible: #22d3ee;
    --compatible-bg: rgba(34, 211, 238, 0.12);
    --somewhat: #f59e0b;
    --somewhat-bg: rgba(245, 158, 11, 0.12);
    --risky: #f97316;
    --risky-bg: rgba(249, 115, 22, 0.12);
    --incompatible: #ef4444;
    --incompatible-bg: rgba(239, 68, 68, 0.12);
    --radius: 16px;
    --radius-sm: 10px;
    --shadow: 0 4px 24px rgba(0,0,0,0.3);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-tap-highlight-color: transparent;
}

/* Mobile touch fixes */
button, a, [onclick] {
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    cursor: pointer;
}

/* ===== AUTH OVERLAY ===== */
.auth-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-primary);
}

.auth-overlay.hidden {
    display: none !important;
}

.feedback-overlay.hidden,
.fish-modal-overlay.hidden {
    display: none !important;
}

.auth-bg {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

.auth-bg::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(ellipse at 30% 40%, rgba(6, 182, 212, 0.1) 0%, transparent 50%),
                radial-gradient(ellipse at 70% 60%, rgba(139, 92, 246, 0.08) 0%, transparent 50%);
    animation: oceanShift 20s ease-in-out infinite;
}

.auth-close {
    position: absolute;
    top: 14px;
    right: 16px;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 8px;
    transition: all 0.15s;
    z-index: 1;
}

.auth-close:hover {
    color: var(--text-primary);
    background: rgba(255,255,255,0.05);
}

.auth-card {
    position: relative;
    z-index: 1;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 40px 36px;
    width: 100%;
    max-width: 400px;
    margin: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.auth-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 4px;
}

.auth-logo .logo-img {
    height: 160px;
}

.auth-subtitle {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-bottom: 32px;
}

.auth-form h3 {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 20px;
    text-align: center;
}

.auth-field {
    margin-bottom: 16px;
}

.auth-field label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.auth-field input {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text-primary);
    font-size: 0.9rem;
    font-family: inherit;
    outline: none;
    transition: border-color 0.2s;
}

.auth-field input:focus {
    border-color: var(--accent-cyan);
}

.auth-error {
    color: var(--incompatible);
    font-size: 0.8rem;
    min-height: 20px;
    margin-bottom: 4px;
}

.auth-btn {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple));
    border: none;
    border-radius: 10px;
    color: white;
    font-size: 0.95rem;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: opacity 0.2s, transform 0.1s;
}

.auth-btn:hover {
    opacity: 0.9;
}

.auth-btn:active {
    transform: scale(0.98);
}

.auth-forgot {
    text-align: center;
    margin-top: 10px;
    font-size: 0.8rem;
}

.auth-forgot a {
    color: var(--text-muted);
    text-decoration: none;
}

.auth-forgot a:hover {
    color: var(--accent-cyan);
}

.auth-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 20px 0;
    color: var(--text-muted);
    font-size: 0.8rem;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

#googleBtnWrap {
    display: flex;
    justify-content: center;
    min-height: 44px;
}

.auth-switch {
    text-align: center;
    margin-top: 16px;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.auth-switch a {
    color: var(--accent-cyan);
    text-decoration: none;
    font-weight: 600;
    margin-left: 4px;
}

.auth-switch a:hover {
    text-decoration: underline;
}

/* ===== OCEAN BACKGROUND ===== */
.ocean-bg {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.ocean-bg::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(ellipse at 20% 50%, rgba(6, 182, 212, 0.14) 0%, transparent 50%),
                radial-gradient(ellipse at 80% 20%, rgba(139, 92, 246, 0.1) 0%, transparent 50%),
                radial-gradient(ellipse at 50% 80%, rgba(59, 130, 246, 0.09) 0%, transparent 50%);
    animation: oceanShift 20s ease-in-out infinite;
}

@keyframes oceanShift {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    33% { transform: translate(-2%, 1%) rotate(1deg); }
    66% { transform: translate(1%, -1%) rotate(-0.5deg); }
}

.bubble {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, rgba(6, 182, 212, 0.35), rgba(6, 182, 212, 0.08));
    border: 1px solid rgba(6, 182, 212, 0.1);
    animation: bubbleFloat linear infinite;
    box-shadow: 0 0 6px rgba(6, 182, 212, 0.1), inset 0 0 4px rgba(255, 255, 255, 0.05);
}

/* Big bubbles */
.b1 { width: 18px; height: 18px; left: 8%;  bottom: -20px; animation-duration: 14s; animation-delay: 0s; }
.b2 { width: 12px; height: 12px; left: 22%; bottom: -20px; animation-duration: 18s; animation-delay: 1s; }
.b3 { width: 22px; height: 22px; left: 42%; bottom: -20px; animation-duration: 12s; animation-delay: 3s; }
.b4 { width: 14px; height: 14px; left: 58%; bottom: -20px; animation-duration: 16s; animation-delay: 0.5s; }
.b5 { width: 8px;  height: 8px;  left: 72%; bottom: -20px; animation-duration: 20s; animation-delay: 2s; }
.b6 { width: 20px; height: 20px; left: 85%; bottom: -20px; animation-duration: 13s; animation-delay: 4s; }
.b7 { width: 10px; height: 10px; left: 33%; bottom: -20px; animation-duration: 15s; animation-delay: 5s; }
.b8  { width: 16px; height: 16px; left: 52%; bottom: -20px; animation-duration: 19s; animation-delay: 6s; }
.b9  { width: 6px;  height: 6px;  left: 15%; bottom: -20px; animation-duration: 22s; animation-delay: 2.5s; }
.b10 { width: 24px; height: 24px; left: 68%; bottom: -20px; animation-duration: 11s; animation-delay: 7s; }
.b11 { width: 9px;  height: 9px;  left: 48%; bottom: -20px; animation-duration: 17s; animation-delay: 1.5s; }
.b12 { width: 14px; height: 14px; left: 3%;  bottom: -20px; animation-duration: 21s; animation-delay: 8s; }
.b13 { width: 7px;  height: 7px;  left: 78%; bottom: -20px; animation-duration: 16s; animation-delay: 3.5s; }
.b14 { width: 20px; height: 20px; left: 92%; bottom: -20px; animation-duration: 14s; animation-delay: 9s; }
.b15 { width: 11px; height: 11px; left: 28%; bottom: -20px; animation-duration: 23s; animation-delay: 4.5s; }
.b16 { width: 15px; height: 15px; left: 62%; bottom: -20px; animation-duration: 13s; animation-delay: 10s; }

@keyframes bubbleFloat {
    0%   { transform: translateY(0) translateX(0) scale(1); opacity: 0; }
    5%   { opacity: 0.7; }
    25%  { transform: translateY(-25vh) translateX(15px) scale(1.05); }
    50%  { transform: translateY(-50vh) translateX(-10px) scale(1); opacity: 0.5; }
    75%  { transform: translateY(-75vh) translateX(20px) scale(0.9); opacity: 0.35; }
    100% { transform: translateY(-105vh) translateX(-5px) scale(0.7); opacity: 0; }
}

/* ===== APP CONTAINER ===== */
.app {
    position: relative;
    z-index: 1;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px 60px;
}

/* ===== HEADER ===== */
.header {
    padding: 0;
}

.header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
}

.logo-img {
    height: 300px;
    width: auto;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.3));
    margin: -40px 0 -50px -70px;
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-name {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.btn-logout {
    padding: 6px 14px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--bg-card);
    color: var(--text-secondary);
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.2s;
}

.btn-logout:hover {
    border-color: var(--incompatible);
    color: var(--incompatible);
}

/* ===== HEADER AUTH BUTTONS ===== */
.auth-buttons {
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-save-login {
    padding: 8px 18px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--bg-card);
    color: var(--text-secondary);
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.2s;
}

.btn-save-login:hover {
    border-color: var(--text-muted);
    color: var(--text-primary);
}

.btn-save-register {
    padding: 8px 18px;
    border-radius: 10px;
    border: none;
    background: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple));
    color: white;
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.2s;
}

.btn-save-register:hover {
    opacity: 0.9;
    box-shadow: 0 4px 16px rgba(6, 182, 212, 0.3);
}

/* ===== GUEST SAVE BAR ===== */
.guest-save-bar {
    margin-top: 14px;
    display: flex;
    justify-content: center;
}

.btn-save-tank {
    padding: 14px 36px;
    border-radius: 14px;
    border: none;
    background: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple));
    color: white;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.25s;
    animation: saveBarIn 0.4s ease;
    box-shadow: 0 4px 20px rgba(6, 182, 212, 0.3);
    letter-spacing: 0.3px;
}

.btn-save-tank:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(6, 182, 212, 0.4);
}

.btn-save-tank:active {
    transform: translateY(0);
}

/* ===== JOURNAL ===== */
.journal-section {
    margin-bottom: 32px;
}

.btn-journal-add {
    padding: 6px 16px;
    border-radius: 8px;
    border: 1px solid var(--accent-cyan);
    background: rgba(6, 182, 212, 0.1);
    color: var(--accent-cyan);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.2s;
}

.btn-journal-add:hover {
    background: rgba(6, 182, 212, 0.2);
}

.journal-form {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 16px;
    margin-bottom: 16px;
    animation: chipIn 0.3s ease;
}

.journal-form-row {
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.journal-select {
    padding: 8px 12px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 0.82rem;
    font-family: inherit;
    outline: none;
    min-width: 140px;
}

.journal-select:focus { border-color: var(--accent-cyan); }

.journal-input {
    flex: 1;
    padding: 8px 12px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 0.85rem;
    font-family: inherit;
    outline: none;
    min-width: 150px;
}

.journal-input:focus { border-color: var(--accent-cyan); }

.journal-input-sm {
    width: 90px;
    padding: 6px 10px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 0.78rem;
    font-family: inherit;
    outline: none;
}

.journal-input-sm:focus { border-color: var(--accent-cyan); }

.journal-textarea {
    width: 100%;
    padding: 8px 12px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 0.82rem;
    font-family: inherit;
    outline: none;
    resize: vertical;
}

.journal-textarea:focus { border-color: var(--accent-cyan); }

.journal-modal {
    max-width: 520px;
}

.journal-modal textarea {
    width: 100%;
    padding: 10px 14px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.9rem;
    outline: none;
    resize: vertical;
}

.journal-modal textarea:focus { border-color: var(--accent-cyan); }

.journal-params-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 10px;
    margin-bottom: 16px;
    padding: 14px;
    background: rgba(6, 182, 212, 0.05);
    border: 1px solid rgba(6, 182, 212, 0.15);
    border-radius: 12px;
}

.journal-params-grid .auth-field {
    margin-bottom: 0;
}

.journal-params-grid label {
    font-size: 0.7rem;
}

.journal-date-input {
    width: 100%;
    padding: 10px 14px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.9rem;
    outline: none;
    color-scheme: dark;
}

.journal-date-input:focus { border-color: var(--accent-cyan); }

.btn-journal-cancel {
    padding: 8px 14px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--bg-card);
    color: var(--text-muted);
    font-size: 0.82rem;
    cursor: pointer;
    font-family: inherit;
}

.journal-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-bottom: 12px;
    padding: 12px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 12px;
}

.journal-filters input[type="text"] {
    flex: 1;
    min-width: 160px;
    width: auto;
}

.journal-filters input[type="date"] {
    width: 140px;
    color-scheme: dark;
}

.journal-filters .journal-select {
    min-width: 140px;
}

.journal-entries {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.journal-entry {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 14px 18px;
}

.journal-entry-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.journal-entry-header {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 2px 0;
    flex: 1;
    min-width: 0;
}

.journal-type-badge {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 2px 8px;
    border-radius: 6px;
}

.type-note { background: rgba(148,163,184,0.15); color: #94a3b8; }
.type-water_test { background: rgba(6,182,212,0.15); color: #06b6d4; }
.type-addition { background: rgba(16,185,129,0.15); color: #10b981; }
.type-maintenance { background: rgba(139,92,246,0.15); color: #8b5cf6; }
.type-observation { background: rgba(245,158,11,0.15); color: #f59e0b; }
.type-issue { background: rgba(239,68,68,0.15); color: #ef4444; }

.journal-entry-title {
    font-weight: 600;
    font-size: 0.9rem;
}

.journal-entry-date {
    font-size: 0.72rem;
    color: var(--text-muted);
    margin-left: auto;
}

.journal-entry-body {
    font-size: 0.83rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-top: 4px;
}

.journal-params {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 8px;
}

.journal-param {
    font-size: 0.72rem;
    padding: 3px 10px;
    border-radius: 6px;
    background: rgba(6,182,212,0.08);
    border: 1px solid rgba(6,182,212,0.15);
    color: var(--accent-cyan);
}

.journal-param-label {
    color: var(--text-muted);
    margin-right: 4px;
}

.journal-expand-arrow {
    font-size: 0.6rem;
    color: var(--text-muted);
    width: 12px;
    flex-shrink: 0;
    transition: transform 0.2s;
}

.journal-entry-details {
    padding: 10px 0 4px 22px;
    animation: chipIn 0.2s ease;
}

.journal-entry-actions {
    display: flex;
    gap: 4px;
    flex-shrink: 0;
}

.journal-action-btn {
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text-muted);
    cursor: pointer;
    font-size: 0.82rem;
    padding: 4px 10px;
    border-radius: 6px;
    transition: all 0.15s;
}

.journal-action-btn:hover { color: var(--accent-cyan); border-color: var(--accent-cyan); }
.journal-action-delete:hover { color: var(--incompatible); border-color: var(--incompatible); }

/* ===== JOURNAL PAGINATION ===== */
.journal-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 16px 0;
}

.pag-btn {
    padding: 6px 16px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--bg-card);
    color: var(--text-secondary);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.2s;
}

.pag-btn:hover {
    border-color: var(--accent-cyan);
    color: var(--accent-cyan);
}

.pag-info {
    font-size: 0.78rem;
    color: var(--text-muted);
}

.journal-toggle {
    cursor: pointer;
    user-select: none;
    align-items: flex-start;
}

.journal-toggle > div {
    flex: 1;
}

.journal-toggle:hover h2 {
    color: var(--accent-cyan);
}

.journal-section-arrow {
    font-size: 0.7rem;
    display: inline-block;
    transition: transform 0.2s;
    margin-right: 2px;
}

.journal-entry-count {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 400;
    margin-left: 4px;
}

.journal-collapsible {
    overflow: hidden;
    max-height: 2000px;
    opacity: 1;
    transition: max-height 0.4s ease, opacity 0.3s ease;
}

.journal-collapsible.collapsed {
    max-height: 0;
    opacity: 0;
}

.journal-promo {
    margin-top: 20px;
    margin-bottom: 24px;
    padding: 22px 26px;
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.08), rgba(139, 92, 246, 0.05));
    border: 1px solid rgba(6, 182, 212, 0.2);
    border-radius: 16px;
    display: flex;
    align-items: center;
    gap: 20px;
}

.journal-promo-icon {
    font-size: 2.4rem;
    flex-shrink: 0;
    opacity: 0.85;
}

.journal-promo-content {
    flex: 1;
}

.journal-promo-content h3 {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 6px;
}

.journal-promo-content p {
    color: var(--text-muted);
    font-size: 0.85rem;
    line-height: 1.5;
    margin-bottom: 12px;
}

.journal-promo-btn {
    padding: 10px 22px;
    background: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple));
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    transition: opacity 0.2s, box-shadow 0.2s;
}

.journal-promo-btn:hover {
    opacity: 0.92;
    box-shadow: 0 4px 16px rgba(6, 182, 212, 0.25);
}

@media (max-width: 600px) {
    .journal-promo {
        flex-direction: column;
        text-align: center;
    }
}

/* ===== JOURNAL TRENDS ===== */
.journal-trends {
    margin-bottom: 16px;
    padding: 16px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 14px;
}

.trends-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 12px;
}

.trends-header h3 {
    font-size: 0.95rem;
    font-weight: 700;
}

.trends-sub {
    font-size: 0.72rem;
    color: var(--text-muted);
}

.param-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 10px;
}

.param-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 10px 12px;
}

.param-card-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 4px;
}

.param-name {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.param-value {
    font-weight: 700;
    font-size: 0.92rem;
}

.param-good { color: var(--great); }
.param-warn { color: var(--somewhat); }
.param-bad { color: var(--incompatible); }

.param-sparkline {
    margin: 4px 0;
}

.param-range {
    font-size: 0.68rem;
    color: var(--text-muted);
}

.journal-tagline {
    color: var(--text-muted);
    font-size: 0.78rem;
    font-weight: 400;
    margin-top: 2px;
    margin-left: 28px;
}

.journal-empty {
    text-align: center;
    padding: 28px 20px;
    color: var(--text-muted);
    font-size: 0.85rem;
    background: rgba(6, 182, 212, 0.04);
    border: 1px dashed rgba(6, 182, 212, 0.2);
    border-radius: 14px;
    margin-top: 12px;
}

.journal-empty-icon {
    font-size: 2.5rem;
    margin-bottom: 8px;
    opacity: 0.6;
}

.journal-empty-title {
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 6px;
}

.journal-empty-hint {
    margin-top: 10px;
    font-size: 0.78rem;
    font-style: italic;
    opacity: 0.8;
}

/* ===== CHECKBOX ===== */
.checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--accent-cyan);
    cursor: pointer;
}

/* ===== WISHLIST ===== */
.wishlist-section {
    margin-top: 32px;
    margin-bottom: 32px;
}

.wishlist-items {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.wishlist-item {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 8px 12px 8px 8px;
}

.wishlist-item-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.wishlist-note {
    font-size: 0.72rem;
    color: var(--text-muted);
    font-style: italic;
}

.wishlist-empty {
    text-align: center;
    padding: 20px;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.btn-wishlist {
    width: 100%;
    padding: 10px;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.2s;
    margin-top: 8px;
}

.btn-wishlist:hover {
    border-color: #ef4444;
    color: #ef4444;
    background: rgba(239, 68, 68, 0.08);
}

/* ===== MESSAGES ===== */
.messages-section {
    margin-bottom: 32px;
}

.messages-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.message-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 14px 18px;
}

.message-card.unread {
    border-color: var(--accent-cyan);
    background: rgba(6, 182, 212, 0.05);
}

.message-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
    font-size: 0.85rem;
}

.message-date { font-size: 0.72rem; color: var(--text-muted); }
.message-species { font-size: 0.78rem; color: var(--accent-cyan); margin-bottom: 6px; }
.message-body { font-size: 0.85rem; color: var(--text-secondary); line-height: 1.5; }

/* ===== SUGGEST SECTION ===== */
.suggest-section {
    text-align: center;
    margin-top: 32px;
    margin-bottom: 24px;
}

.btn-suggest {
    padding: 12px 28px;
    border-radius: 30px;
    border: 1px dashed var(--border);
    background: transparent;
    color: var(--accent-cyan);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.2s;
}

.btn-suggest:hover {
    border-color: var(--accent-cyan);
    background: rgba(6, 182, 212, 0.08);
}

.suggest-status { margin: 12px 0; min-height: 20px; }
.suggest-loading { color: var(--accent-cyan); font-size: 0.85rem; }
.suggest-found { color: var(--great); font-size: 0.85rem; }
.suggest-success { color: var(--great); font-size: 0.85rem; }
.suggest-error { color: var(--incompatible); font-size: 0.85rem; }
.suggest-pending { color: var(--somewhat); font-size: 0.85rem; }

.suggestion-modal { max-width: 460px; }

/* ===== SELLER CTA ===== */
.seller-cta {
    margin: 40px 0;
}

.seller-cta-inner {
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.08), rgba(139, 92, 246, 0.06));
    border: 1px solid rgba(6, 182, 212, 0.2);
    border-radius: 16px;
    padding: 28px 32px;
    text-align: center;
}

.seller-cta-inner h3 {
    font-size: 1.1rem;
    margin-bottom: 4px;
}

.seller-cta-inner p {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-bottom: 16px;
}

.btn-seller-cta {
    display: inline-block;
    padding: 10px 28px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple));
    color: white;
    font-weight: 700;
    font-size: 0.9rem;
    text-decoration: none;
    transition: opacity 0.2s;
}

.btn-seller-cta:hover { opacity: 0.9; }

/* ===== DRAW CANVAS ===== */
.draw-overlay {
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: rgba(0,0,0,0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    opacity: 0;
    transition: opacity 0.25s;
}

.draw-overlay.visible { opacity: 1; }

.draw-modal {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 20px;
    max-width: 500px;
    width: 100%;
    overflow: hidden;
}

.draw-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
}

.draw-header h2 { font-size: 1.1rem; font-weight: 700; }

.draw-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
}

.draw-tools {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
}

.draw-colors {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-bottom: 10px;
}

.draw-color-btn {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 2px solid transparent;
    cursor: pointer;
    transition: border-color 0.15s, transform 0.1s;
}

.draw-color-btn.active {
    border-color: white;
    transform: scale(1.2);
}

.draw-color-btn:hover { transform: scale(1.15); }

.draw-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.draw-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 600;
}

.draw-slider {
    width: 90px;
    accent-color: var(--accent-cyan);
}

.draw-tool-btn {
    padding: 5px 12px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--bg-card);
    color: var(--text-secondary);
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.15s;
}

.draw-tool-btn:hover { border-color: var(--accent-cyan); color: var(--accent-cyan); }
.draw-tool-btn.active { background: var(--accent-cyan); color: white; border-color: var(--accent-cyan); }

.draw-canvas-wrap {
    padding: 0;
    display: flex;
    justify-content: center;
    background-image: linear-gradient(45deg, #111827 25%, transparent 25%),
                      linear-gradient(-45deg, #111827 25%, transparent 25%),
                      linear-gradient(45deg, transparent 75%, #111827 75%),
                      linear-gradient(-45deg, transparent 75%, #111827 75%);
    background-size: 16px 16px;
    background-position: 0 0, 0 8px, 8px -8px, -8px 0px;
    background-color: #0d1525;
    touch-action: none;
}

.draw-canvas-wrap canvas {
    width: 100%;
    max-width: 500px;
    height: auto;
    cursor: crosshair;
    touch-action: none;
}

.draw-actions {
    display: flex;
    gap: 10px;
    padding: 14px 20px;
    border-top: 1px solid var(--border);
}

.draw-cancel {
    flex: 1;
    padding: 12px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--bg-card);
    color: var(--text-secondary);
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
}

.draw-save {
    flex: 1;
    padding: 12px;
    border-radius: 10px;
    border: none;
    background: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple));
    color: white;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
}

.draw-save:hover { opacity: 0.9; }

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

/* ===== TANK MANAGER ===== */
.tank-manager {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    overflow-x: auto;
    padding-bottom: 4px;
}

.tank-tabs {
    display: flex;
    gap: 6px;
    flex: 1;
    overflow-x: auto;
}

.tank-tab {
    padding: 8px 18px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--bg-card);
    color: var(--text-secondary);
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    white-space: nowrap;
    transition: all 0.2s;
    position: relative;
}

.tank-tab:hover {
    border-color: var(--accent-cyan);
    color: var(--text-primary);
}

.tank-tab.active {
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.2), rgba(139, 92, 246, 0.15));
    border-color: var(--accent-cyan);
    color: var(--text-primary);
    box-shadow: 0 0 12px rgba(6, 182, 212, 0.15);
}

.tank-tab .tab-count {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-left: 6px;
    opacity: 0.7;
}

.btn-new-tank {
    padding: 8px 16px;
    border-radius: 10px;
    border: 1px dashed var(--border);
    background: transparent;
    color: var(--accent-cyan);
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    white-space: nowrap;
    transition: all 0.2s;
}

.btn-new-tank:hover {
    border-color: var(--accent-cyan);
    background: rgba(6, 182, 212, 0.08);
}

/* ===== SECTIONS ===== */
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.section-header h2 {
    font-size: 1.15rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}

.icon {
    font-size: 1.2rem;
}

.size-nudge {
    grid-column: 1 / -1;
    padding: 10px 16px;
    background: rgba(245, 158, 11, 0.08);
    border: 1px solid rgba(245, 158, 11, 0.2);
    border-radius: 10px;
    font-size: 0.78rem;
    color: var(--somewhat);
    margin-bottom: 8px;
}

.tank-size-inline {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.tank-size-inline label {
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tank-size-inline input {
    width: 70px;
    padding: 4px 8px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 0.82rem;
    font-family: inherit;
    outline: none;
    text-align: center;
}

.tank-size-inline input:focus { border-color: var(--accent-cyan); }

.fish-count {
    font-size: 0.8rem;
    color: var(--text-muted);
    background: var(--bg-card);
    padding: 4px 12px;
    border-radius: 20px;
    border: 1px solid var(--border);
}

.tank-title-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-icon {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1rem;
    cursor: pointer;
    padding: 4px 6px;
    border-radius: 6px;
    transition: all 0.15s;
}

.btn-icon:hover {
    color: var(--accent-cyan);
    background: rgba(6, 182, 212, 0.1);
}

.btn-icon-danger:hover {
    color: var(--incompatible);
    background: var(--incompatible-bg);
}

/* ===== TANK SECTION ===== */
.tank-section {
    margin-bottom: 32px;
}

.tank-container {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    min-height: 100px;
    padding: 20px;
    position: relative;
    overflow: hidden;
}

.tank-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent-cyan), transparent);
    opacity: 0.3;
}

.tank-empty {
    text-align: center;
    padding: 20px;
    color: var(--text-muted);
}

.empty-icon {
    font-size: 2.5rem;
    margin-bottom: 8px;
    opacity: 0.5;
}

.tank-empty p {
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.tank-empty span {
    font-size: 0.85rem;
}

.tank-fish-list {
    display: block;
}

/* ===== AQUARIUM ===== */
.aquarium {
    position: relative;
    width: 100%;
    height: 280px;
    border-radius: 14px;
    overflow: hidden;
    background: linear-gradient(180deg, #0c2a4a 0%, #062236 50%, #051a2c 100%);
    box-shadow: inset 0 0 40px rgba(0, 0, 0, 0.5), inset 0 0 0 2px rgba(6, 182, 212, 0.15);
    margin-bottom: 12px;
    cursor: default;
}

.aquarium-water {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 20% 30%, rgba(6, 182, 212, 0.12) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 70%, rgba(34, 211, 238, 0.08) 0%, transparent 50%);
    animation: water-shimmer 8s ease-in-out infinite;
    pointer-events: none;
}

@keyframes water-shimmer {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

.aquarium::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 8px;
    background: linear-gradient(180deg, rgba(34, 211, 238, 0.3), transparent);
    pointer-events: none;
}

.aquarium::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 30px;
    background: linear-gradient(180deg, transparent, rgba(15, 32, 50, 0.6) 60%, rgba(8, 22, 38, 0.9));
    pointer-events: none;
}

.aquarium-fish-layer {
    position: absolute;
    inset: 0;
    z-index: 2;
}

.aquarium-controls {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 5;
}

.aquarium-toggle {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    padding: 4px 10px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    backdrop-filter: blur(4px);
}

.aquarium-toggle:hover {
    background: rgba(0, 0, 0, 0.6);
}

.aq-fish {
    position: absolute;
    cursor: pointer;
    will-change: transform;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: transform 0s linear;
}

.aq-fish-body {
    display: inline-block;
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.4));
    transition: filter 0.2s;
}

.aq-fish-body svg {
    display: block;
}

.aq-fish:hover .aq-fish-body {
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.4)) drop-shadow(0 0 10px rgba(6, 182, 212, 0.7));
}

.aq-fish-label {
    margin-top: 4px;
    padding: 2px 8px;
    background: rgba(0, 0, 0, 0.7);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 10px;
    color: white;
    font-size: 0.65rem;
    font-weight: 600;
    backdrop-filter: blur(4px);
    white-space: nowrap;
    opacity: 0.85;
    transition: opacity 0.2s, transform 0.2s;
    position: relative;
    pointer-events: none;
}

.aq-fish-label::after {
    content: '';
    position: absolute;
    top: -4px;
    left: 50%;
    transform: translateX(-50%);
    width: 0; height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-bottom: 4px solid rgba(0, 0, 0, 0.7);
}

.aq-fish:hover .aq-fish-label {
    opacity: 1;
    transform: scale(1.1);
}

.aq-bottom {
    flex-direction: column-reverse;
}

.aq-bottom .aq-fish-label {
    margin-top: 0;
    margin-bottom: 4px;
}

.aq-bottom .aq-fish-label::after {
    top: auto;
    bottom: -4px;
    border-bottom: none;
    border-top: 4px solid rgba(0, 0, 0, 0.7);
}

.tank-fish-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    overflow: hidden;
    max-height: 600px;
    transition: max-height 0.3s ease, opacity 0.3s ease, margin 0.3s ease;
}

.tank-fish-chips.collapsed {
    max-height: 0;
    opacity: 0;
    margin: 0;
}

.tank-fish-chip {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 8px 12px 8px 8px;
    animation: chipIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    transition: all 0.2s;
}

.tank-fish-chip:hover {
    border-color: var(--accent-cyan);
    box-shadow: 0 0 12px rgba(6, 182, 212, 0.15);
}

@keyframes chipIn {
    from { opacity: 0; transform: scale(0.8) translateY(8px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.chip-img {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    object-fit: cover;
    background: var(--bg-primary);
}

.chip-text {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.chip-name {
    font-size: 0.85rem;
    font-weight: 600;
}

.chip-subname {
    font-size: 0.68rem;
    color: var(--text-muted);
}

/* ===== IN-TANK BADGE ===== */
.in-tank-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: rgba(6, 182, 212, 0.85);
    color: #0a0e1a;
    backdrop-filter: blur(8px);
}

/* ===== INACTIVE FISH SECTION ===== */
.inactive-fish-section {
    margin-top: 16px;
    border-top: 1px solid var(--border);
    padding-top: 12px;
}

.inactive-header {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 0.82rem;
    color: var(--text-muted);
    font-weight: 600;
    padding: 4px 0;
    user-select: none;
}

.inactive-header:hover {
    color: var(--text-primary);
}

.inactive-arrow {
    font-size: 0.65rem;
    transition: transform 0.2s;
}

.inactive-count {
    font-size: 0.75rem;
    opacity: 0.7;
}

.inactive-fish-list {
    margin-top: 8px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    overflow: hidden;
    max-height: 500px;
    transition: max-height 0.3s ease, opacity 0.3s ease;
}

.inactive-fish-list.collapsed {
    max-height: 0;
    opacity: 0;
}

.inactive-fish-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    opacity: 0.7;
}

.inactive-fish-row .chip-img {
    width: 32px;
    height: 32px;
    filter: grayscale(0.5);
}

.inactive-info {
    flex: 1;
    min-width: 0;
}

.inactive-name {
    font-size: 0.82rem;
    font-weight: 600;
}

.inactive-species {
    color: var(--text-muted);
    font-weight: 400;
    font-size: 0.75rem;
}

.inactive-meta {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-top: 2px;
}

.inactive-btn {
    background: none;
    border: 1px solid var(--border);
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.85rem;
    transition: all 0.15s;
}

.inactive-btn:hover {
    color: var(--accent-cyan);
    border-color: var(--accent-cyan);
}

.inactive-btn-del:hover {
    color: var(--incompatible);
    border-color: var(--incompatible);
}

/* ===== JOURNAL AUTOCOMPLETE ===== */
.journal-autocomplete {
    position: relative;
    margin-top: 4px;
    max-height: 250px;
    overflow-y: auto;
    border-radius: 8px;
}

.journal-autocomplete:not(:empty) {
    border: 1px solid var(--border);
    background: var(--bg-card);
    margin-top: 6px;
}

.ac-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    cursor: pointer;
    font-size: 0.82rem;
    border-bottom: 1px solid rgba(255,255,255,0.03);
    transition: background 0.1s;
}

.ac-item:hover {
    background: rgba(6, 182, 212, 0.08);
}

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

.ac-item img {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    object-fit: cover;
}

.ac-name {
    font-weight: 600;
    flex-shrink: 0;
}

.ac-sci {
    font-style: italic;
    color: var(--text-muted);
    font-size: 0.75rem;
    flex: 1;
    text-align: right;
}

.ac-ai {
    background: rgba(6, 182, 212, 0.05);
    color: var(--accent-cyan);
    font-weight: 600;
    justify-content: center;
}

.chip-edit {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 6px;
    font-size: 0.85rem;
    line-height: 1;
    transition: all 0.15s;
}

.chip-edit:hover {
    color: var(--accent-cyan);
    background: rgba(6, 182, 212, 0.1);
}

.chip-remove {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 2px 4px;
    border-radius: 6px;
    font-size: 1.1rem;
    line-height: 1;
    transition: all 0.15s;
    margin-left: 4px;
}

.chip-remove:hover {
    color: var(--incompatible);
    background: var(--incompatible-bg);
}

/* ===== SEARCH ===== */
.search-section {
    margin-bottom: 24px;
}

.search-bar {
    position: relative;
    margin-bottom: 14px;
}

.search-bar input {
    width: 100%;
    padding: 14px 20px 14px 48px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-primary);
    font-size: 0.95rem;
    font-family: inherit;
    outline: none;
    transition: all 0.2s;
}

.search-bar input::placeholder {
    color: var(--text-muted);
}

.search-bar input:focus {
    border-color: var(--accent-cyan);
    box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.15);
}

.search-icon-wrapper {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

.search-clear {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.3rem;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 50%;
    line-height: 1;
    transition: all 0.15s;
}

.search-clear:hover {
    color: var(--text-primary);
    background: rgba(255,255,255,0.08);
}

.filter-tags {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.filter-top-row {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}

.filter-group-toggle {
    padding: 6px 14px;
    border-radius: 20px;
    border: 1px solid var(--border);
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.filter-group-toggle:hover {
    border-color: var(--accent-cyan);
    color: var(--accent-cyan);
}

.toggle-arrow {
    font-size: 0.6rem;
    transition: transform 0.2s;
    display: inline-block;
}

.filter-group-toggle.open .toggle-arrow {
    transform: rotate(90deg);
}

.filter-group-items {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    overflow: hidden;
    max-height: 200px;
    opacity: 1;
    transition: max-height 0.3s ease, opacity 0.2s ease, margin 0.3s ease, padding 0.3s ease;
    margin-top: 8px;
    padding: 10px 12px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 12px;
}

.filter-group-items.collapsed {
    max-height: 0;
    opacity: 0;
    margin-top: 0;
    padding: 0 12px;
    border-color: transparent;
}

.filter-tag {
    padding: 6px 14px;
    border-radius: 20px;
    border: 1px solid var(--border);
    background: var(--bg-card);
    color: var(--text-secondary);
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}

.filter-tag:hover {
    border-color: var(--accent-cyan);
    color: var(--text-primary);
}

.filter-tag.active {
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.2), rgba(139, 92, 246, 0.2));
    border-color: var(--accent-cyan);
    color: var(--text-primary);
}

/* ===== COMPATIBILITY GRID ===== */
.compat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 14px;
}

.compat-category {
    grid-column: 1 / -1;
    margin-top: 12px;
    margin-bottom: 4px;
}

.compat-category:first-child {
    margin-top: 0;
}

.category-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    padding: 6px 14px;
    border-radius: 8px;
}

.category-label .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.cat-great .dot { background: var(--great); box-shadow: 0 0 8px var(--great); }
.cat-great { color: var(--great); background: var(--great-bg); }

.cat-compatible .dot { background: var(--compatible); box-shadow: 0 0 8px var(--compatible); }
.cat-compatible { color: var(--compatible); background: var(--compatible-bg); }

.cat-somewhat .dot { background: var(--somewhat); box-shadow: 0 0 8px var(--somewhat); }
.cat-somewhat { color: var(--somewhat); background: var(--somewhat-bg); }

.cat-risky .dot { background: var(--risky); box-shadow: 0 0 8px var(--risky); }
.cat-risky { color: var(--risky); background: var(--risky-bg); }

.cat-incompatible .dot { background: var(--incompatible); box-shadow: 0 0 8px var(--incompatible); }
.cat-incompatible { color: var(--incompatible); background: var(--incompatible-bg); }

/* ===== FISH CARD ===== */
.fish-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.fish-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow);
    border-color: var(--accent-cyan);
}

.fish-card.in-tank {
    opacity: 0.4;
}

.fish-card-img-wrap {
    position: relative;
    width: 100%;
    height: 160px;
    overflow: hidden;
    background: linear-gradient(135deg, #0d1525, #162033);
}

.fish-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s;
}

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

.compat-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 4px 10px;
    border-radius: 8px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    backdrop-filter: blur(8px);
}

.badge-great { background: rgba(16, 185, 129, 0.85); color: #fff; }
.badge-compatible { background: rgba(34, 211, 238, 0.85); color: #0a0e1a; }
.badge-somewhat { background: rgba(245, 158, 11, 0.85); color: #0a0e1a; }
.badge-risky { background: rgba(249, 115, 22, 0.85); color: #fff; }
.badge-incompatible { background: rgba(239, 68, 68, 0.85); color: #fff; }

.fish-card-body {
    padding: 14px 16px;
}

.fish-card-name {
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 2px;
}

.fish-card-scientific {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-style: italic;
    margin-bottom: 8px;
}

.fish-card-tags {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.fish-tag {
    font-size: 0.7rem;
    padding: 2px 8px;
    border-radius: 6px;
    background: rgba(255,255,255,0.05);
    color: var(--text-secondary);
    border: 1px solid rgba(255,255,255,0.06);
}

.fish-card-compat-bar {
    height: 3px;
    width: 100%;
    position: absolute;
    bottom: 0;
    left: 0;
}

.bar-great { background: linear-gradient(90deg, var(--great), #34d399); }
.bar-compatible { background: linear-gradient(90deg, var(--compatible), #67e8f9); }
.bar-somewhat { background: linear-gradient(90deg, var(--somewhat), #fbbf24); }
.bar-risky { background: linear-gradient(90deg, var(--risky), #fb923c); }
.bar-incompatible { background: linear-gradient(90deg, var(--incompatible), #f87171); }

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 3px;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 640px) {
    .compat-grid {
        grid-template-columns: 1fr 1fr;
    }

    .header-top {
        flex-direction: column;
        gap: 12px;
    }

    .logo-text {
        font-size: 1.4rem;
    }

    .fish-card-img-wrap {
        height: 120px;
    }

    .logo-img {
        height: 160px;
        margin: -20px 0 -30px -20px;
    }

    .fish-modal {
        max-height: 85vh;
        margin: 10px;
    }

    .fish-card-actions {
        flex-direction: column;
    }

    .auth-card {
        padding: 28px 24px;
    }
}

@media (max-width: 400px) {
    .compat-grid {
        grid-template-columns: 1fr;
    }
}

/* ===== TOOLTIP ===== */
.compat-note {
    font-size: 0.72rem;
    color: var(--text-muted);
    margin-top: 4px;
    line-height: 1.4;
}

/* ===== NO RESULTS ===== */
.no-results {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px 20px;
    color: var(--text-muted);
}

.no-results .nr-icon {
    font-size: 2rem;
    margin-bottom: 8px;
    opacity: 0.5;
}

/* ===== ADD BUTTON OVERLAY ===== */
.fish-card-add {
    display: none;
}

.add-btn-label {
    font-size: 0.8rem;
    font-weight: 700;
    color: white;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ===== COMPAT FILTER BAR ===== */
.compat-filter-bar {
    grid-column: 1 / -1;
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 8px;
    padding: 12px 16px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.compat-filter-tag {
    padding: 6px 14px;
    border-radius: 20px;
    border: 1px solid var(--border);
    background: var(--bg-card);
    color: var(--text-secondary);
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
}

.compat-filter-tag:hover {
    border-color: var(--text-muted);
    color: var(--text-primary);
}

.cft-count {
    font-size: 0.7rem;
    opacity: 0.6;
}

.compat-filter-tag.active {
    color: var(--text-primary);
    border-color: var(--text-muted);
    background: rgba(255,255,255,0.08);
}

.cft-great.active { border-color: var(--great); color: var(--great); background: var(--great-bg); }
.cft-compatible.active { border-color: var(--compatible); color: var(--compatible); background: var(--compatible-bg); }
.cft-somewhat.active { border-color: var(--somewhat); color: var(--somewhat); background: var(--somewhat-bg); }
.cft-risky.active { border-color: var(--risky); color: var(--risky); background: var(--risky-bg); }
.cft-incompatible.active { border-color: var(--incompatible); color: var(--incompatible); background: var(--incompatible-bg); }

.cft-great:hover { border-color: var(--great); color: var(--great); }
.cft-compatible:hover { border-color: var(--compatible); color: var(--compatible); }
.cft-somewhat:hover { border-color: var(--somewhat); color: var(--somewhat); }
.cft-risky:hover { border-color: var(--risky); color: var(--risky); }
.cft-incompatible:hover { border-color: var(--incompatible); color: var(--incompatible); }

/* ===== CARD ACTION BUTTONS ===== */
.fish-card-actions {
    display: flex;
    gap: 8px;
    margin-top: 10px;
}

.btn-card {
    flex: 1;
    padding: 10px 12px;
    border-radius: 8px;
    border: none;
    font-size: 0.78rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    min-height: 44px;
}

.btn-card-info {
    background: var(--bg-primary);
    color: var(--text-secondary);
    border: 1px solid var(--border);
}

.btn-card-info:hover {
    border-color: var(--accent-cyan);
    color: var(--accent-cyan);
}

.btn-card-add {
    background: linear-gradient(135deg, var(--accent-cyan), var(--accent-blue));
    color: white;
}

.btn-card-add:hover {
    opacity: 0.85;
    box-shadow: 0 4px 12px rgba(6, 182, 212, 0.3);
}

.btn-card-wish {
    background: var(--bg-primary);
    color: var(--text-muted);
    border: 1px solid var(--border);
}

.btn-card-wish:hover {
    border-color: #ef4444;
    color: #ef4444;
}

/* ===== FISH INFO MODAL ===== */
.fish-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: rgba(0, 0, 0, 0.7);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    pointer-events: none;
    -webkit-tap-highlight-color: transparent;
    transition: opacity 0.2s;
}

.fish-modal-overlay.visible {
    opacity: 1;
    pointer-events: auto;
}

.fish-modal-overlay.hidden {
    display: none;
}

.fish-modal {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 20px;
    max-width: 520px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.6);
    transform: scale(0.95) translateY(10px);
    transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.fish-modal-overlay.visible .fish-modal {
    transform: scale(1) translateY(0);
}

.fish-modal-overlay.closing {
    opacity: 0;
    transition: opacity 0.25s ease;
}

.confirm-modal {
    max-width: 380px;
}

.fish-modal-overlay.closing .fish-modal {
    transform: scale(0.95) translateY(10px);
    transition: transform 0.25s ease;
}

.fish-modal-close {
    position: absolute;
    top: 12px;
    right: 14px;
    z-index: 2;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(8px);
    border: none;
    color: white;
    font-size: 1.4rem;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
}

.fish-modal-close:hover {
    background: rgba(239, 68, 68, 0.7);
}

.fish-modal-img-wrap {
    width: 100%;
    height: 260px;
    overflow: hidden;
    border-radius: 20px 20px 0 0;
    background: linear-gradient(135deg, #0d1525, #162033);
}

.fish-modal-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.fish-modal-body {
    padding: 24px;
}

.fish-modal-body textarea {
    width: 100%;
    padding: 10px 14px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.9rem;
    outline: none;
    resize: vertical;
}

.fish-modal-body textarea:focus { border-color: var(--accent-cyan); }

.fish-modal-body h2 {
    font-size: 1.4rem;
    font-weight: 800;
    margin-bottom: 2px;
}

.fish-modal-scientific {
    color: var(--text-muted);
    font-style: italic;
    font-size: 0.85rem;
    margin-bottom: 12px;
}

.fish-modal-blurb {
    font-size: 0.85rem;
    line-height: 1.65;
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.fish-modal-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 20px;
}

.modal-stat {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 10px 14px;
}

.modal-stat-label {
    display: block;
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 2px;
}

.modal-stat-value {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
}

/* ===== MODAL COMPAT BREAKDOWN ===== */
.modal-compat {
    margin-bottom: 20px;
}

.modal-compat h4 {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    margin-bottom: 10px;
}

.modal-compat-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.modal-compat-row {
    display: grid;
    grid-template-columns: 10px auto auto 1fr;
    gap: 8px;
    align-items: center;
    font-size: 0.82rem;
    padding: 8px 12px;
    background: var(--bg-card);
    border-radius: 8px;
    border: 1px solid var(--border);
}

.modal-compat-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.dot-great { background: var(--great); box-shadow: 0 0 6px var(--great); }
.dot-compatible { background: var(--compatible); box-shadow: 0 0 6px var(--compatible); }
.dot-somewhat { background: var(--somewhat); box-shadow: 0 0 6px var(--somewhat); }
.dot-risky { background: var(--risky); box-shadow: 0 0 6px var(--risky); }
.dot-incompatible { background: var(--incompatible); box-shadow: 0 0 6px var(--incompatible); }

.modal-compat-fish {
    font-weight: 600;
    color: var(--text-primary);
}

.modal-compat-score {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    padding: 2px 8px;
    border-radius: 6px;
    text-align: center;
}

.modal-compat-note {
    font-size: 0.75rem;
    color: var(--text-muted);
    grid-column: 1 / -1;
    padding-left: 18px;
}

.btn-modal-add {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple));
    border: none;
    border-radius: 12px;
    color: white;
    font-size: 0.95rem;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: opacity 0.2s, transform 0.1s;
}

.btn-modal-add:hover {
    opacity: 0.9;
}

.btn-modal-add:active {
    transform: scale(0.98);
}

.modal-in-tank {
    text-align: center;
    padding: 12px;
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 500;
    background: var(--bg-card);
    border-radius: 10px;
    border: 1px solid var(--border);
}

@media (max-width: 500px) {
    .fish-modal-img-wrap {
        height: 180px;
    }
    .fish-modal-stats {
        grid-template-columns: 1fr;
    }
}

/* ===== DISCLAIMER ===== */
.disclaimer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 900;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
    padding: 14px 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
}

.disclaimer p {
    font-size: 0.78rem;
    color: var(--text-muted);
    line-height: 1.5;
    max-width: 700px;
}

.disclaimer-close {
    padding: 6px 16px;
    border-radius: 8px;
    border: 1px solid var(--accent-cyan);
    background: transparent;
    color: var(--accent-cyan);
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    white-space: nowrap;
    transition: all 0.2s;
}

.disclaimer-close:hover {
    background: rgba(6, 182, 212, 0.1);
}

/* ===== FEEDBACK MODAL ===== */
.feedback-overlay {
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.feedback-overlay.hidden {
    display: none !important;
}

.feedback-modal {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 20px;
    max-width: 460px;
    width: 100%;
    padding: 32px;
    position: relative;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.6);
}

.feedback-modal h3 {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.feedback-subtitle {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-bottom: 20px;
}

.fb-select {
    width: 100%;
    padding: 10px 14px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text-primary);
    font-size: 0.9rem;
    font-family: inherit;
    outline: none;
    appearance: none;
    cursor: pointer;
}

.fb-select:focus {
    border-color: var(--accent-cyan);
}

.feedback-modal textarea {
    width: 100%;
    padding: 10px 14px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text-primary);
    font-size: 0.9rem;
    font-family: inherit;
    outline: none;
    resize: vertical;
}

.feedback-modal textarea:focus {
    border-color: var(--accent-cyan);
}

.feedback-thanks {
    text-align: center;
    padding: 20px 0;
}

.feedback-thanks p {
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 4px;
}

.feedback-thanks span {
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* ===== SUGGEST CORRECTION BUTTON ===== */
.btn-feedback {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 800;
    padding: 10px 18px;
    border-radius: 30px;
    border: 1px solid var(--border);
    background: var(--bg-card);
    color: var(--text-secondary);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.2s;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

/* ===== iOS INSTALL PROMPT ===== */
.ios-install-prompt {
    position: fixed;
    bottom: 16px;
    left: 16px;
    right: 16px;
    z-index: 850;
    background: var(--bg-secondary);
    border: 1px solid var(--accent-cyan);
    border-radius: 16px;
    padding: 14px 18px;
    display: flex;
    align-items: center;
    gap: 14px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.5), 0 0 24px rgba(6,182,212,0.2);
    animation: slideUpIn 0.4s ease;
    max-width: 480px;
    margin: 0 auto;
}

@keyframes slideUpIn {
    from { transform: translateY(120%); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.ios-install-logo {
    height: 48px;
    width: 48px;
    flex-shrink: 0;
    object-fit: contain;
}

.ios-install-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
    color: var(--text-primary);
    font-size: 0.82rem;
}

.ios-install-text strong {
    font-size: 0.95rem;
    font-weight: 700;
}

.ios-share-icon {
    color: var(--accent-cyan);
    font-weight: 700;
    margin: 0 2px;
}

.ios-install-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 4px 10px;
    border-radius: 8px;
    align-self: flex-start;
}

.ios-install-close:hover {
    color: var(--text-primary);
    background: rgba(255,255,255,0.05);
}

.btn-back-to-top {
    position: fixed;
    bottom: 80px;
    right: 20px;
    z-index: 800;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: var(--bg-card);
    color: var(--accent-cyan);
    font-size: 1.2rem;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
    opacity: 0;
    pointer-events: none;
    transform: translateY(20px);
    transition: opacity 0.25s, transform 0.25s, border-color 0.2s, color 0.2s;
}

.btn-back-to-top.visible {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.btn-back-to-top:hover {
    border-color: var(--accent-cyan);
    color: white;
    background: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple));
    box-shadow: 0 4px 20px rgba(6, 182, 212, 0.3);
}

.btn-feedback:hover {
    border-color: var(--accent-cyan);
    color: var(--accent-cyan);
    box-shadow: 0 4px 20px rgba(6, 182, 212, 0.2);
}
