/* BountyPing - Gold & Black Data Table */
/* Spreadsheet aesthetic, sortable & searchable */

:root {
    --gold: #ffd700;
    --gold-dark: #b8860b;
    --gold-darker: #8b6914;
    --black: #0d0d0d;
    --black-light: #1a1a1a;
    --black-lighter: #262626;
    --gray: #404040;
    --gray-light: #555;
    --text: #e8e8e8;
    --text-muted: #999;
    --success: #4ade80;
    --danger: #ef4444;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Inter', 'SF Pro', 'Segoe UI', sans-serif;
    background: var(--black);
    color: var(--text);
    line-height: 1.5;
}

.container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Header - Minimal */
header {
    background: var(--black-light);
    border-bottom: 2px solid var(--gold);
    padding: 1.5rem 0;
    margin-bottom: 2rem;
}

header h1 {
    font-size: 2rem;
    margin-bottom: 0.25rem;
    font-weight: 700;
    color: var(--gold);
    letter-spacing: -0.5px;
}

.tagline {
    font-size: 1rem;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
    font-weight: 500;
}

.subtitle {
    font-size: 0.875rem;
    color: var(--text-muted);
    opacity: 0.7;
}

/* Stats - Compact Inline */
.stats {
    display: flex;
    gap: 2rem;
    margin-bottom: 2rem;
    padding: 1rem 1.5rem;
    background: var(--black-light);
    border: 1px solid var(--gray);
    border-left: 3px solid var(--gold);
}

.stat {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--gold);
}

.stat-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

/* Filters - Spreadsheet Toolbar */
.filters-card {
    background: var(--black-light);
    border: 1px solid var(--gray);
    padding: 1rem 1.5rem;
    margin-bottom: 1rem;
}

.filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
}

.search-input {
    flex: 1;
    min-width: 300px;
    padding: 0.625rem 0.875rem;
    background: var(--black);
    border: 1px solid var(--gray);
    color: var(--text);
    font-size: 0.875rem;
    transition: border-color 0.2s;
}

.search-input:focus {
    outline: none;
    border-color: var(--gold);
}

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

.filter-select {
    padding: 0.625rem 0.875rem;
    background: var(--black);
    border: 1px solid var(--gray);
    color: var(--text);
    font-size: 0.875rem;
    cursor: pointer;
    transition: border-color 0.2s;
}

.filter-select:focus {
    outline: none;
    border-color: var(--gold);
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    user-select: none;
    padding: 0.5rem 0.75rem;
    background: var(--black);
    border: 1px solid var(--gray);
    font-size: 0.8125rem;
    font-weight: 500;
    transition: border-color 0.2s;
}

.checkbox-label:hover {
    border-color: var(--gold-dark);
}

.checkbox-label input[type="checkbox"] {
    width: 1rem;
    height: 1rem;
    cursor: pointer;
    accent-color: var(--gold);
}

/* Results info */
.results-info {
    margin-bottom: 0.75rem;
    padding: 0.5rem 1rem;
    background: var(--black-lighter);
    border-left: 2px solid var(--gold);
    color: var(--text-muted);
    font-size: 0.8125rem;
    font-weight: 600;
}

/* Programs Table */
.programs-table {
    background: var(--black-light);
    border: 1px solid var(--gray);
    margin-bottom: 3rem;
}

.table-header {
    display: grid;
    grid-template-columns: 2fr 1fr 1.5fr;
    gap: 1.5rem;
    padding: 0.75rem 1.5rem;
    background: var(--black-lighter);
    border-bottom: 2px solid var(--gold);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
}

.th {
    cursor: pointer;
    user-select: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: color 0.2s;
}

.th:hover {
    color: var(--gold);
}

.th:last-child {
    cursor: default;
}

.th:last-child:hover {
    color: var(--text-muted);
}

.th.sorted {
    color: var(--gold);
}

.sort-indicator {
    font-size: 0.625rem;
    opacity: 0.5;
    transition: opacity 0.2s;
}

.th:hover .sort-indicator,
.th.sorted .sort-indicator {
    opacity: 1;
}

.sort-indicator::before {
    content: '▼';
}

.th.sorted.asc .sort-indicator::before {
    content: '▲';
}

.th.sorted.desc .sort-indicator::before {
    content: '▼';
}

.programs-list {
    background: var(--black-light);
}

.program-card {
    display: grid;
    grid-template-columns: 2fr 1fr 1.5fr;
    gap: 1.5rem;
    padding: 0.875rem 1.5rem;
    border-bottom: 1px solid var(--gray);
    transition: background-color 0.15s;
    align-items: center;
}

.program-card:hover {
    background: var(--black-lighter);
}

.program-card:last-child {
    border-bottom: none;
}

.program-card.new-program {
    border-left: 2px solid var(--success);
}

/* Table Header (first card) */
.programs-list::before {
    content: '';
    display: block;
    background: var(--black-lighter);
    border-bottom: 2px solid var(--gold);
}

/* Column styles */
.program-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    overflow: hidden;
}

.new-badge {
    background: var(--success);
    color: var(--black);
    padding: 0.125rem 0.375rem;
    font-size: 0.625rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.25px;
    flex-shrink: 0;
    width: fit-content;
}

.program-name {
    font-size: 0.9375rem;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
}

.program-name a {
    color: var(--gold);
    text-decoration: none;
    transition: color 0.2s;
}

.program-name a:hover {
    color: var(--gold-dark);
}

.platform-badge {
    background: var(--black-lighter);
    color: var(--text-muted);
    padding: 0.25rem 0.625rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: capitalize;
    border: 1px solid var(--gray);
    width: fit-content;
}

.bounty-value {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--text);
}

.bounty-value.bounty {
    color: var(--success);
    font-weight: 700;
}

.bounty-value.vdp {
    color: var(--text-muted);
}

.program-details {
    display: contents;
}

.detail {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.detail-label {
    font-weight: 600;
    color: var(--text-muted);
    font-size: 0.6875rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.detail-value {
    color: var(--text);
    font-size: 0.875rem;
}

.detail-value.bounty {
    color: var(--success);
    font-weight: 700;
    font-size: 0.9375rem;
}

.detail-value.vdp {
    color: var(--text-muted);
}

.scope-preview {
    font-family: 'SF Mono', 'Consolas', monospace;
    font-size: 0.8125rem;
    color: var(--text-muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.program-footer {
    display: flex;
    justify-content: flex-end;
}

.view-link {
    color: var(--gold);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.8125rem;
    padding: 0.375rem 0.75rem;
    border: 1px solid var(--gold-dark);
    transition: all 0.2s;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.view-link:hover {
    background: var(--gold);
    color: var(--black);
    border-color: var(--gold);
}

/* Loading & error states */
.loading-state {
    text-align: center;
    padding: 3rem 2rem;
    color: var(--text-muted);
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--gray);
    border-top-color: var(--gold);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.error-state,
.no-results {
    text-align: center;
    padding: 3rem 2rem;
    color: var(--text-muted);
    background: var(--black-lighter);
    border: 1px dashed var(--gray);
}

.error-state {
    color: var(--danger);
    border-color: var(--danger);
}

/* Footer */
footer {
    background: var(--black-light);
    border-top: 2px solid var(--gold);
    padding: 2rem 0 1.5rem;
    margin-top: 4rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 1.5rem;
}

.footer-section h3 {
    font-size: 1.125rem;
    margin-bottom: 0.5rem;
    color: var(--gold);
    font-weight: 700;
}

.footer-section h4 {
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
    color: var(--text);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.footer-section ul {
    list-style: none;
}

.footer-section li {
    margin-bottom: 0.375rem;
    color: var(--text-muted);
    font-size: 0.8125rem;
}

.footer-section li::before {
    content: '• ';
    color: var(--gold);
    margin-right: 0.5rem;
}

.footer-bottom {
    text-align: center;
    padding-top: 1.5rem;
    border-top: 1px solid var(--gray);
    color: var(--text-muted);
    font-size: 0.8125rem;
}

.footer-bottom a {
    color: var(--gold);
    text-decoration: none;
    font-weight: 600;
}

.footer-bottom a:hover {
    text-decoration: underline;
}

.disclaimer {
    font-size: 0.75rem;
    margin-top: 0.75rem;
    opacity: 0.6;
}

/* Responsive - Stack columns on mobile */
@media (max-width: 1024px) {
    .program-card {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .program-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .detail {
        flex-direction: row;
        align-items: baseline;
    }

    .detail-label {
        min-width: 80px;
    }

    .stats {
        flex-wrap: wrap;
        gap: 1rem;
    }
}

@media (max-width: 768px) {
    header h1 {
        font-size: 1.5rem;
    }

    .filters {
        flex-direction: column;
        align-items: stretch;
    }

    .search-input {
        width: 100%;
    }
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Selection color */
::selection {
    background: var(--gold);
    color: var(--black);
}
