/* =========================
   Record Type Tabs
========================= */
.record-type-tabs {
    display: flex;
    justify-content: center;
    gap: 4px;
    margin-bottom: 20px;
    background: #2c2c2c;
    border-radius: 10px;
    padding: 4px;
    max-width: 420px;
    margin-left: auto;
    margin-right: auto;
}

.record-type-btn {
    flex: 1;
    padding: 10px 16px;
    background: transparent;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 700;
    color: #8e8e93;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.record-type-btn.active {
    background: #e0fd53;
    color: #1a1a1a;
}

.record-type-btn:hover:not(.active) {
    color: #ccc;
}

/* Record Type Sections */
.record-type-section {
    display: none;
}

.record-type-section.active {
    display: block;
}

/* =========================
   Filter Bar & Segment Control
========================= */
.filter-bar {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin-bottom: 20px;
}

.segment-control {
    display: flex;
    background: #2c2c2c;
    border-radius: 8px;
    padding: 3px;
    gap: 2px;
}

.segment-btn {
    padding: 8px 16px;
    background: transparent;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    color: #8e8e93;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.segment-btn:hover:not(.active) {
    color: #ccc;
}

.segment-btn.active {
    background: #e0fd53;
    color: #1a1a1a;
}


/* =========================
   Records Section
========================= */
.records-section {
    display: none;
}

.records-section.active {
    display: block;
}

/* =========================
   Table Styles
========================= */
.table-container {
    overflow-x: auto;
    border-radius: 8px;
    background: #1a1a1a;
    margin-bottom: 32px;
    border: 1px solid #333;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: #444 transparent;
}

.table-container::-webkit-scrollbar {
    height: 4px;
}

.table-container::-webkit-scrollbar-track {
    background: transparent;
}

.table-container::-webkit-scrollbar-thumb {
    background: #444;
    border-radius: 2px;
}

.records-table {
    width: 100%;
    border-collapse: collapse;
    margin: 0;
    background: #1a1a1a;
}

.records-table th {
    background: #111;
    color: #8e8e93 !important;
    padding: 10px 14px;
    text-align: left;
    font-weight: 600;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: sticky;
    top: 0;
    z-index: 10;
    border-bottom: 1px solid #333;
}

.records-table th:first-child {
    text-align: center;
}

.records-table td {
    padding: 10px 14px;
    text-align: left;
    border-bottom: 1px solid #2a2a2a;
    font-size: 13px;
    color: #e5e5e5;
}

.records-table tbody tr {
    transition: background 0.15s;
}

.records-table tbody tr:hover {
    background-color: #222;
}

/* Row backgrounds */
.snatch-row {
    background-color: transparent;
}

.clean-jerk-row {
    background-color: rgba(255, 255, 255, 0.02);
}

.total-row {
    background-color: rgba(255, 255, 255, 0.04);
}

/* =========================
   Cell Styles
========================= */
.weight-class {
    background-color: #151515 !important;
    font-weight: 800;
    color: #e0fd53 !important;
    vertical-align: middle;
    text-align: center !important;
    font-size: 15px;
    letter-spacing: -0.3px;
}

.lift-type {
    font-weight: 600;
    padding: 10px 14px !important;
}

.lift-snatch {
    color: #fbbf24;
}

.lift-cj {
    color: #60a5fa;
}

.lift-total {
    color: #e0fd53;
}

.snatch, .clean-jerk, .total {
    font-weight: 700;
    font-size: 15px;
    font-variant-numeric: tabular-nums;
}

.snatch {
    color: #fbbf24;
}

.clean-jerk {
    color: #60a5fa;
}

.total {
    color: #e0fd53;
}

.athlete {
    font-weight: 600;
    color: #fff;
}

.affiliation {
    font-weight: 400;
    color: #8e8e93;
}

.birth-year {
    color: #6d6d6d;
    font-size: 12px;
    font-variant-numeric: tabular-nums;
}

.competition {
    font-size: 12px;
    color: #6d6d6d;
}

.date {
    color: #6d6d6d;
    font-size: 12px;
    font-variant-numeric: tabular-nums;
}

/* =========================
   Responsive - 1024px
========================= */
@media (max-width: 1024px) {
    .records-table th,
    .records-table td {
        padding: 10px 10px;
    }
}

/* =========================
   Responsive - 768px
========================= */
@media (max-width: 768px) {
    .filter-bar {
        flex-direction: column;
        align-items: center;
        gap: 6px;
    }

    .segment-btn {
        padding: 7px 14px;
        font-size: 12px;
    }

    .record-type-btn {
        padding: 8px 12px;
        font-size: 13px;
    }

    .table-container {
        margin-bottom: 24px;
        border-radius: 6px;
        overflow-x: hidden;
    }

    .records-table {
        font-size: 13px;
        min-width: 0;
    }

    /* Hide columns 5+ on mobile */
    .records-table th:nth-child(n+5),
    .records-table td.date,
    .records-table td.affiliation,
    .records-table td.birth-year,
    .records-table td.competition {
        display: none;
    }

    .records-table th {
        padding: 10px 8px;
        font-size: 10px;
    }

    .records-table td {
        padding: 10px 8px;
    }

    .weight-class {
        font-size: 14px !important;
    }

    .snatch, .clean-jerk, .total {
        font-size: 14px;
    }

    .athlete {
        font-size: 13px;
    }
}

/* =========================
   Responsive - 480px
========================= */
@media (max-width: 480px) {
    .record-type-tabs {
        max-width: 100%;
    }

    .record-type-btn {
        padding: 7px 8px;
        font-size: 12px;
    }

    .segment-btn {
        padding: 6px 12px;
        font-size: 11px;
    }

    .table-container {
        margin-bottom: 20px;
    }

    .records-table th {
        padding: 8px 6px;
        font-size: 9px;
    }

    .records-table td {
        padding: 8px 6px;
    }

    .weight-class {
        font-size: 13px !important;
    }

    .snatch, .clean-jerk, .total {
        font-size: 13px;
    }

    .athlete {
        font-size: 12px;
        max-width: 100px;
        word-break: keep-all;
    }
}
