/* ===== 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;
}

/* ===== 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;
}

.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-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 -40px;
}

.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: 12px;
    display: flex;
    justify-content: flex-end;
}

.btn-save-tank {
    padding: 10px 22px;
    border-radius: 10px;
    border: 1px solid var(--accent-cyan);
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.12), rgba(139, 92, 246, 0.08));
    color: var(--accent-cyan);
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.2s;
    animation: saveBarIn 0.4s ease;
}

.btn-save-tank:hover {
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.22), rgba(139, 92, 246, 0.15));
    box-shadow: 0 4px 16px rgba(6, 182, 212, 0.25);
}

@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;
}

.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: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.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-name {
    font-size: 0.85rem;
    font-weight: 600;
}

.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);
}

.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;
    pointer-events: none;
}

.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;
    }

    .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: 7px 12px;
    border-radius: 8px;
    border: none;
    font-size: 0.78rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s;
}

.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);
}

/* ===== FISH INFO MODAL ===== */
.fish-modal-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;
    opacity: 0;
    transition: opacity 0.2s;
}

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

.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-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 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;
}

.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);
}

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