/* ============================================================
   BAIT BOARD — Bait/Lure Effectiveness Leaderboard
   Design tokens: fish-tokens.css
   ============================================================ */

/* ─── Filter Bar ─── */
.filter-bar {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 20px;
    align-items: center;
}
.filter-bar select,
.filter-bar input {
    padding: 9px 14px;
    border-radius: var(--fish-radius-md, 8px);
    border: 1px solid rgba(255,255,255,0.12);
    background: rgba(255,255,255,0.06);
    color: var(--fish-text, #e0e8f0);
    font-size: 0.85rem;
    font-family: inherit;
    outline: none;
    transition: border-color 0.2s;
}
.filter-bar select:focus,
.filter-bar input:focus { border-color: var(--fish-accent, #06b6d4); }
.filter-bar select option { background: #0d2137; color: #e0e8f0; }

/* ─── Category Tabs ─── */
.cat-tabs {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}
.cat-tab {
    padding: 7px 16px;
    border-radius: var(--fish-radius-full, 9999px);
    border: 1px solid rgba(255,255,255,0.1);
    background: transparent;
    color: var(--fish-text-muted, #94a3b8);
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}
.cat-tab:hover { border-color: var(--fish-accent, #06b6d4); color: var(--fish-text, #e0e8f0); }
.cat-tab.active {
    background: var(--fish-accent, #06b6d4);
    color: var(--fish-text-inverse, #0a1628);
    border-color: var(--fish-accent, #06b6d4);
}

/* ─── Leaderboard Table ─── */
.board-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}
.board-table th {
    text-align: left;
    padding: 10px 12px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--fish-text-dim, #64748b);
    border-bottom: 1px solid rgba(255,255,255,0.08);
    cursor: pointer;
    user-select: none;
    white-space: nowrap;
}
.board-table th:hover { color: var(--fish-accent, #06b6d4); }
.board-table th .sort-arrow { margin-left: 4px; font-size: 0.6rem; }
.board-table td {
    padding: 10px 12px;
    border-bottom: 1px solid rgba(255,255,255,0.04);
    vertical-align: middle;
}
.board-table tbody tr {
    transition: background 0.15s;
}
.board-table tbody tr:hover {
    background: rgba(6,182,212,0.04);
}

/* Rank column */
.rank-cell {
    font-weight: 800;
    color: var(--fish-text-dim, #64748b);
    width: 48px;
    text-align: center;
}
.rank-cell.gold { color: var(--fish-gold, #f59e0b); }
.rank-cell.silver { color: #c0c0c0; }
.rank-cell.bronze { color: #cd7f32; }

/* Bait name + category */
.bait-name-cell {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.bait-name {
    font-weight: 700;
    color: var(--fish-text, #e0e8f0);
}
.bait-category {
    font-size: 0.7rem;
    color: var(--fish-text-dim, #64748b);
}

/* Score bar */
.score-bar-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
}
.score-bar {
    flex: 1;
    height: 8px;
    border-radius: 4px;
    background: rgba(255,255,255,0.06);
    overflow: hidden;
    min-width: 80px;
}
.score-bar-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.5s var(--fish-ease-water, ease);
}
.score-val {
    font-weight: 700;
    font-size: 0.9rem;
    min-width: 36px;
    text-align: right;
}

/* Species tags */
.species-tags {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
}
.species-tag {
    font-size: 0.65rem;
    padding: 2px 7px;
    border-radius: 10px;
    background: rgba(6,182,212,0.1);
    border: 1px solid rgba(6,182,212,0.2);
    color: var(--fish-accent-bright, #22d3ee);
    white-space: nowrap;
}

/* Vote buttons */
.vote-cell {
    display: flex;
    gap: 6px;
    align-items: center;
}
.vote-btn {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.1);
    background: transparent;
    color: var(--fish-text-dim, #64748b);
    cursor: pointer;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    font-family: inherit;
}
.vote-btn:hover { border-color: var(--fish-accent, #06b6d4); color: var(--fish-accent, #06b6d4); }
.vote-btn.voted-up { background: rgba(16,185,129,0.15); border-color: var(--fish-green, #10b981); color: var(--fish-green, #10b981); }
.vote-btn.voted-down { background: rgba(239,68,68,0.15); border-color: var(--fish-red, #ef4444); color: var(--fish-red, #ef4444); }
.vote-count {
    font-size: 0.75rem;
    color: var(--fish-text-muted, #94a3b8);
    min-width: 20px;
    text-align: center;
}

/* ─── What's Hot / My Top Baits ─── */
.hot-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 14px;
}
.hot-card {
    background: var(--fish-card, rgba(255,255,255,0.04));
    border: 1px solid var(--fish-card-border, rgba(255,255,255,0.08));
    border-radius: var(--fish-radius-lg, 12px);
    padding: 16px;
    transition: all 0.2s;
    position: relative;
}
.hot-card:hover {
    border-color: var(--fish-accent, #06b6d4);
    transform: translateY(-2px);
    box-shadow: var(--fish-shadow-md, 0 4px 12px rgba(0,0,0,0.35));
}
.hot-card .hot-rank {
    position: absolute;
    top: 10px;
    right: 12px;
    font-size: 0.7rem;
    font-weight: 800;
    color: var(--fish-gold, #f59e0b);
}
.hot-card .hot-trend {
    font-size: 0.7rem;
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 8px;
}
.hot-card .hot-trend.up { color: var(--fish-green, #10b981); }
.hot-card .hot-trend.down { color: var(--fish-red, #ef4444); }
.hot-card .hot-name { font-weight: 700; margin-bottom: 2px; }
.hot-card .hot-cat { font-size: 0.72rem; color: var(--fish-text-dim); }
.hot-card .hot-score { font-size: 1.3rem; font-weight: 800; color: var(--fish-accent); margin-top: 6px; }

/* ─── Add Bait Modal ─── */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.7);
    backdrop-filter: blur(6px);
    z-index: 600;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.modal-overlay.active { display: flex; }
.modal-box {
    background: var(--fish-bg-raised, #0d2137);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: var(--fish-radius-xl, 16px);
    padding: 28px;
    max-width: 480px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
}
.modal-box h3 {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--fish-accent, #06b6d4);
}
.modal-form { display: flex; flex-direction: column; gap: 12px; }
.modal-form label {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--fish-text-muted, #94a3b8);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.modal-form input,
.modal-form select,
.modal-form textarea {
    padding: 10px 14px;
    border-radius: var(--fish-radius-md, 8px);
    border: 1px solid rgba(255,255,255,0.12);
    background: rgba(255,255,255,0.06);
    color: var(--fish-text, #e0e8f0);
    font-size: 0.9rem;
    font-family: inherit;
    outline: none;
}
.modal-form input:focus,
.modal-form select:focus { border-color: var(--fish-accent, #06b6d4); }
.modal-form select option { background: #0d2137; }
.modal-actions {
    display: flex;
    gap: 10px;
    margin-top: 8px;
}
.btn-primary {
    padding: 10px 24px;
    border-radius: var(--fish-radius-md, 8px);
    border: none;
    background: var(--fish-accent, #06b6d4);
    color: var(--fish-text-inverse, #0a1628);
    font-weight: 700;
    font-size: 0.88rem;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}
.btn-primary:hover { background: var(--fish-accent-dim, #0891b2); }
.btn-secondary {
    padding: 10px 24px;
    border-radius: var(--fish-radius-md, 8px);
    border: 1px solid rgba(255,255,255,0.12);
    background: transparent;
    color: var(--fish-text-muted, #94a3b8);
    font-weight: 600;
    font-size: 0.88rem;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}
.btn-secondary:hover { border-color: var(--fish-accent, #06b6d4); color: var(--fish-text, #e0e8f0); }

/* ─── Responsive ─── */
@media (max-width: 768px) {
    .board-table { font-size: 0.78rem; }
    .board-table th, .board-table td { padding: 8px 6px; }
    .score-bar { min-width: 50px; }
    .species-tags { display: none; }
    .hot-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
}
@media (max-width: 480px) {
    .board-table .hide-mobile { display: none; }
}
