/* BLACK HEADER - matching Home Page */
.black-header {
    width: 100%;
    height: 100px;
    background-color: #000000;
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 100;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
}

.header-content {
    width: 100%;
    max-width: 1400px;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0 40px;
    box-sizing: border-box;
}

.center-logo {
    position: relative;
    height: 58px;
}

.center-logo img {
    height: 58px;
    width: auto;
    cursor: pointer;
    transition: transform 0.2s ease;
}

/* Block selection on header elements */
.black-header,
.header-content,
.center-logo,
.center-logo img {
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    overflow-x: hidden;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    background: url('https://i.postimg.cc/0yZsTQcy/matteblack.png') no-repeat top center;
    background-size: cover;
    background-attachment: fixed;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 100px;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

main {
    width: 800px;
    min-height: 1600px;
}

h1 {
    color: white;
    text-align: center;
    font-family: 'Goldman', sans-serif;
    font-weight: 400;
    margin-top: 60px;
    font-size: 47px;
    width: 100%;
    padding: 0 15px;
    box-sizing: border-box;
}

#transaction-list {
    list-style-type: none;
    padding: 0;
    margin: -70px auto 50px;
    width: 92%;
    max-width: 100%;
    box-sizing: border-box;
    animation: fade-in 2s ease-in-out;
}

/* Transactions Card */
#transaction-list li {
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 0;
    margin-bottom: 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    color: #ffffff;
    transition: all 0.22s ease;
    overflow: hidden;
    width: 100%;
    box-sizing: border-box;
}

#transaction-list li:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.5);
}

/* Row type variations (subtle background tint for deposit/cashout) */
#transaction-list li.deposit-row {
    background-color: rgba(40, 220, 130, 0.08); /* light green tint */
}

#transaction-list li.cashout-row {
    background-color: rgba(220, 60, 80, 0.08); /* light red tint */
}

/* 4-COLUMN LAYOUT WITH VERTICAL DIVIDERS */
.tx-row {
    display: grid;
    grid-template-columns: 1fr 1px 1.4fr 1px 1.2fr 1px 0.9fr;
    align-items: stretch;
    min-height: 110px;
    width: 100%;
    box-sizing: border-box;
}

.tx-divider {
    background: rgba(120, 120, 180, 0.22);
    width: 1px;
    align-self: stretch;
    margin: 18px 0;
}

/* Each cell */
.tx-cell {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 24px 16px;
    gap: 8px;
    text-align: center;
    box-sizing: border-box;
}

/* Label */
.tx-label {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #ffffff;
    margin: 0;
}

/* Value */
.tx-value {
    font-size: 20px;
    font-weight: 700;
    color: #ffffff;
    margin: 0;
    line-height: 1.2;
}

.tx-value.sub {
    font-size: 15px;
    font-weight: 500;
    color: #ffffff;
    margin-top: 2px;
}

/* Match ID cell */
.tx-cell.match-cell {
    user-select: text;
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
}

.tx-cell.match-cell .tx-label {
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.tx-cell.match-cell .tx-value {
    font-size: 22px;
    color: #ffffff;
}

/* Time cell */
.tx-cell.time-cell .tx-value {
    font-size: 22px;
    color: #ffffff;
}

.tx-cell.time-cell .tx-value.sub {
    font-size: 13px;
    color: #ffffff;
}

/* Finance cell — placed + won stacked (match) or single amount (deposit/cashout) */
.tx-cell.finance-cell {
    gap: 10px;
}

/* Single amount mode for deposit & cashout */
.tx-cell.finance-cell.single {
    grid-column: 2 / 6; /* span across placed + won + dividers for cleaner look */
    justify-content: center;
}

.tx-finance-row {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    width: 100%;
}

.tx-finance-row + .tx-finance-row {
    padding-top: 10px;
    border-top: 1px solid rgba(120, 120, 180, 0.15);
}

.tx-finance-label {
    font-size: 10.5px;
    font-weight: 600;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: #ffffff;
}

.tx-finance-value {
    font-size: 17px;
    font-weight: 700;
    color: #ffffff;
}

/* Larger + stronger colored amounts for Deposit/Cashout */
.tx-finance-value.deposit-amount {
    font-size: 20px;
    font-weight: 800;
    color: #40ff90;
}

.tx-finance-value.cashout-amount {
    font-size: 20px;
    font-weight: 800;
    color: #ff7070;
}

/* Result Cell desktop — same padding as all cells, centered both axes */
.tx-cell.result-cell {
    padding: 24px 16px;
    justify-content: center;
    align-items: center;
}

/* Badge desktop — auto width so centering works */
.result-badge {
    padding: 9px 18px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-align: center;
    width: auto;
    min-width: 90px;
    box-sizing: border-box;
    transition: all 0.2s ease;
}

.result-badge:hover {
    transform: scale(1.05);
}

/* Match Badges */
.result-badge.won {
    background: rgba(40, 220, 130, 0.18);
    color: #40ff90;
    border: 1px solid rgba(40, 220, 130, 0.4);
}

.result-badge.lost {
    background: rgba(220, 60, 80, 0.18);
    color: #ff7070;
    border: 1px solid rgba(220, 60, 80, 0.4);
}

/* Empty State */
#transaction-list li.empty {
    text-align: center;
    padding: 60px 20px;
    font-size: 18px;
    color: #ffffff;
    background: rgba(30, 30, 40, 0.4);
    border: 1px dashed rgba(100, 100, 140, 0.3);
}

@keyframes fade-in {
    0% { opacity: 0; }
    100% { opacity: 1; }
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 40px 0 60px;
    width: 100%;
    gap: 20px;
    flex-wrap: wrap;
    padding: 0 15px;
    box-sizing: border-box;
}

#first-button, #last-button {
    width: 44px;
    height: 44px;
    min-width: unset;
    border-radius: 50%;
    padding: 0;
    font-size: 16px;
}

.pagination button {
    padding: 10px 24px;
    border: none;
    border-radius: 20px;
    background-color: #007bff;
    color: white;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    min-width: 110px;
    font-size: 15px;
    text-align: center;
}

.pagination button:disabled {
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
    cursor: not-allowed;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.pagination button:hover:not(:disabled) {
    background-color: #0056b3;
    transform: scale(1.05);
}

.pagination span {
    font-family: Arial, sans-serif;
    font-size: 15px;
    color: white;
    white-space: nowrap;
}

/* ─────────────────────────────────────────────
   MOBILE & TABLET ADAPTATION (≤800px)
   ───────────────────────────────────────────── */
@media (max-width: 800px) {
    html, body {
        overflow-x: hidden;
    }

    main {
        width: 100%;
        min-height: unset;
    }

    .black-header {
        height: 90px;
    }

    .header-content {
        padding: 0 16px;
    }

    .center-logo {
        height: 48px;
    }

    .center-logo img {
        height: 48px;
    }

    body {
        padding-top: 90px;
    }

    h1 {
        font-size: 36px;
        margin-top: 40px;
        padding: 0 15px;
    }

    #transaction-list {
        margin: -70px 12px 60px;
        width: auto;
    }

    .tx-row {
        grid-template-columns: 0.9fr 1px 1.3fr 1px 1.1fr 1px 0.8fr;
        min-height: 80px;
        padding: 0 6px;
    }

    .tx-divider {
        margin: 10px 0;
    }

    .tx-cell {
        padding: 12px 6px;
        gap: 4px;
    }

    /* Single finance cell takes more space on mobile */
    .tx-cell.finance-cell.single {
        grid-column: 2 / 6;
        padding: 12px 8px;
    }

    /* Result Cell — status quo */
    .tx-cell.result-cell {
        padding: 12px 4px 12px 12px;
        justify-content: center;
        align-items: center;
    }

    .tx-label {
        font-size: 9px;
        color: #ffffff;
    }

    .tx-value {
        font-size: 14px;
        color: #ffffff;
    }

    .tx-value.sub {
        font-size: 11px;
        color: #ffffff;
    }

    .tx-cell.match-cell .tx-value {
        font-size: 16px;
        color: #ffffff;
    }

    .tx-cell.time-cell .tx-value {
        font-size: 15px;
        color: #ffffff;
    }

    .tx-cell.time-cell .tx-value.sub {
        font-size: 10px;
        color: #ffffff;
    }

    .tx-finance-label {
        font-size: 9px;
        color: #ffffff;
    }

    .tx-finance-value,
    .tx-finance-value.deposit-amount,
    .tx-finance-value.cashout-amount {
        font-size: 13px;
    }

    .result-badge {
        padding: 6px 12px;
        font-size: 11px;
        margin: 0;
        width: 100%;
        min-width: unset;
    }

    .result-badge.won {
        color: #40ff90;
    }

    .result-badge.lost {
        color: #ff7070;
    }

    .pagination {
        margin: 30px 0 50px;
        padding: 0;
        justify-content: center;
        gap: 14px;
    }

    #first-button, #last-button {
    width: 44px;
    height: 44px;
    min-width: unset;
    border-radius: 50%;
    padding: 0;
    font-size: 16px;
}

.pagination button {
        padding: 8px 16px;
        min-width: 80px;
        font-size: 13px;
    }

    .pagination span {
        font-size: 13px;
    }

    #transaction-list li:hover,
    .pagination button:hover:not(:disabled) {
        transform: scale(1.03);
    }
}
