.account-page {
    padding: 34px 0 52px;
}

.account-layout {
    display: grid;
    grid-template-columns: minmax(220px, .7fr) minmax(0, 1.7fr);
    gap: 20px;
}

.account-card {
    padding: 24px;
    border: 1px solid rgba(255, 255, 255, .05);
    border-radius: 8px;
    background: #28282d;
}

.account-card h1,
.account-card h2,
.account-card h3 {
    margin: 0;
    color: #fff;
}

.account-card h1 {
    font-size: 25px;
}

.account-card h2 {
    font-size: 19px;
}

.account-card p {
    color: rgba(255, 255, 255, .72);
}

.account-user-name {
    margin-top: 14px !important;
    overflow-wrap: anywhere;
    color: #fef9a6 !important;
    font-size: 19px;
    font-weight: 800;
}

.account-user-detail {
    display: grid;
    gap: 9px;
    margin: 20px 0;
    color: rgba(255, 255, 255, .76);
    font-size: 14px;
}

.account-user-detail strong {
    display: block;
    margin-bottom: 2px;
    color: #fff;
    font-size: 15px;
}

.account-tabs {
    display: grid;
    gap: 8px;
    margin-top: 22px;
}

.account-tab {
    width: 100%;
    padding: 11px 12px;
    border: 1px solid rgba(255, 255, 255, .05);
    border-radius: 8px;
    color: #fff;
    text-align: left;
    background: #2b2b31;
    cursor: pointer;
}

.account-tab.is-active {
    border-color: transparent;
    color: #000;
    font-weight: 800;
    background: linear-gradient(90deg, #fe5b09 0%, #fef9a6 100%);
    box-shadow: 0 0 16px 0 rgb(254 155 33 / 30%);
}

.account-tab:hover,
.account-tab:focus {
    border-color: rgba(254, 91, 9, .65);
    color: #fff;
    text-decoration: none;
}

.account-tab.is-active:hover,
.account-tab.is-active:focus {
    color: #000;
    background: linear-gradient(90deg, #fef9a6 0%, #fe5b09 100%);
}

.account-panel[hidden],
.account-auth[hidden],
.account-notice[hidden] {
    display: none;
}

.account-panel > p:first-of-type {
    margin: 9px 0 20px;
}

.account-form {
    display: grid;
    gap: 15px;
}

.account-field {
    display: grid;
    gap: 7px;
}

.account-field label {
    color: rgba(255, 255, 255, .9);
    font-size: 14px;
    font-weight: 700;
}

.account-field input {
    width: 100%;
    min-height: 44px;
    padding: 10px 12px;
    border: 1px solid rgba(255, 255, 255, .05);
    border-radius: 8px;
    outline: none;
    color: #fff;
    background: #2b2b31;
}

.account-field input:focus {
    border-color: #feb029;
    box-shadow: 0 0 0 2px rgba(254, 91, 9, .15);
}

.account-field small {
    color: rgba(255, 255, 255, .58);
    font-size: 12px;
}

.account-submit,
.account-login-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 43px;
    padding: 10px 16px;
    border: 0;
    border-radius: 8px;
    color: #000;
    font-weight: 800;
    text-decoration: none;
    background: linear-gradient(90deg, #fe5b09 0%, #fef9a6 100%);
    box-shadow: 0 0 16px 0 rgb(254 155 33 / 30%);
    cursor: pointer;
}

.account-submit:hover,
.account-submit:focus,
.account-login-link:hover,
.account-login-link:focus {
    color: #000;
    text-decoration: none;
    background: linear-gradient(90deg, #fef9a6 0%, #fe5b09 100%);
}

.account-submit:disabled {
    cursor: wait;
    opacity: .6;
}

.payout-option {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 12px;
    padding: 15px;
    border: 1px solid rgba(255, 255, 255, .09);
    border-radius: 11px;
    background: rgba(255, 255, 255, .025);
    cursor: pointer;
    transition: border-color .2s ease, background .2s ease, transform .2s ease;
}

.payout-option:has(input:checked) {
    border-color: rgba(255, 212, 90, .62);
    background: linear-gradient(115deg, rgba(255, 122, 26, .13), rgba(255, 212, 90, .07));
}

.payout-option:hover { transform: translateY(-1px); }

.payout-option input {
    width: 18px;
    height: 18px;
    margin-top: 2px;
    accent-color: #ff8a24;
}

.payout-option__content { display: grid; gap: 5px; }
.payout-option__content strong { color: #fff; font-size: 15px; }
.payout-option__content small { color: rgba(255, 255, 255, .65); line-height: 1.5; }
.payout-option__content em { padding: 3px 6px; margin-left: 6px; border-radius: 999px; color: #2c1808; font-size: 11px; font-style: normal; background: #ffd45a; }

.account-notice {
    margin: 0 0 17px;
    padding: 11px 13px;
    border-radius: 9px;
    font-size: 14px;
}

.account-notice.is-success {
    color: #c6f6d5;
    background: rgba(44, 122, 72, .38);
}

.account-notice.is-error {
    color: #fed7d7;
    background: rgba(197, 48, 48, .34);
}

.account-auth {
    max-width: 580px;
    margin: 40px auto;
    text-align: center;
}

.account-auth p {
    margin: 10px 0 20px;
}

.history-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 20px;
}

.history-header h1 {
    margin-bottom: 7px;
}

.history-updated {
    flex: 0 0 auto;
    margin: 0 !important;
    font-size: 12px;
}

.history-summary {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 20px;
}

.history-stat {
    padding: 16px;
    border: 1px solid rgba(255, 255, 255, .05);
    border-radius: 8px;
    background: #2b2b31;
}

.history-stat span {
    display: block;
    margin-bottom: 6px;
    color: rgba(255, 255, 255, .62);
    font-size: 12px;
}

.history-stat strong {
    color: #fff;
    font-size: 17px;
}

.history-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 17px;
}

.history-toolbar input,
.history-toolbar select {
    min-height: 40px;
    padding: 8px 11px;
    border: 1px solid rgba(255, 255, 255, .05);
    border-radius: 8px;
    outline: none;
    color: #fff;
    background: #2b2b31;
}

.history-toolbar input {
    flex: 1 1 230px;
}

.history-toolbar select option {
    color: #111;
}

.history-table-wrap {
    overflow-x: auto;
}

.history-table {
    width: 100%;
    min-width: 760px;
    border-collapse: collapse;
}

.history-table th,
.history-table td {
    padding: 12px 10px;
    border-bottom: 1px solid rgba(255, 255, 255, .09);
    color: rgba(255, 255, 255, .86);
    text-align: left;
    white-space: nowrap;
    font-size: 14px;
}

.history-table th {
    color: #fff;
    font-size: 12px;
    letter-spacing: .03em;
}

.history-table .history-code {
    color: #fff;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

.history-result {
    display: inline-block;
    padding: 4px 7px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
}

.history-result.is-win {
    color: #c6f6d5;
    background: rgba(44, 122, 72, .45);
}

.history-result.is-loss {
    color: #fed7d7;
    background: rgba(197, 48, 48, .4);
}

.history-result.is-draw {
    color: #feebc8;
    background: rgba(192, 86, 33, .4);
}

.history-empty {
    padding: 34px 16px;
    color: rgba(255, 255, 255, .7);
    text-align: center;
}

@media (max-width: 850px) {
    .account-layout {
        grid-template-columns: 1fr;
    }

    .history-summary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 520px) {
    .account-page {
        padding-top: 18px;
    }

    .account-card {
        padding: 18px;
    }

    .history-header {
        display: block;
    }

    .history-updated {
        margin-top: 10px !important;
    }
}

/* Account cards share the CLTX language but deliberately use different roles. */
.account-card {
    position: relative;
    overflow: hidden;
    border-color: rgba(255, 158, 70, .22);
    border-radius: 14px;
    background: radial-gradient(circle at 100% 0%, rgba(255, 122, 26, .12), transparent 38%), linear-gradient(145deg, #303037, #222329 64%, #1e1f24);
    box-shadow: 0 16px 38px rgba(0, 0, 0, .24), inset 0 1px 0 rgba(255, 255, 255, .045);
}

.account-card::before {
    position: absolute;
    top: 0;
    right: 18px;
    left: 18px;
    height: 2px;
    content: '';
    background: linear-gradient(90deg, transparent, #ff7a1a, #ffd45a, transparent);
}

.account-layout > aside.account-card {
    background: radial-gradient(circle at 0 0, rgba(255, 212, 90, .16), transparent 44%), linear-gradient(155deg, #303037, #25262c 62%, #202126);
}

.account-layout > aside .account-user-name {
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, .1);
    color: #ffd45a !important;
}

.account-user-detail > div {
    padding: 10px 11px;
    background: rgba(0, 0, 0, .14);
    border: 1px solid rgba(255, 255, 255, .055);
    border-radius: 9px;
}

.account-user-detail > div:nth-child(3) {
    background: linear-gradient(90deg, rgba(255, 122, 26, .13), rgba(255, 212, 90, .09));
    border-color: rgba(255, 194, 91, .22);
}

.account-tab {
    position: relative;
    overflow: hidden;
    min-height: 47px;
    border-color: rgba(255, 255, 255, .08);
    background: rgba(0, 0, 0, .14);
    transition: border-color .18s ease, background .18s ease, transform .18s ease;
}

.account-tab:hover,
.account-tab:focus {
    background: rgba(255, 122, 26, .08);
    transform: translateX(2px);
}

.account-tab.is-active {
    background: linear-gradient(100deg, #ff7a1a, #ffd45a);
}

.account-panel h2 {
    display: inline-block;
    padding-bottom: 9px;
    border-bottom: 2px solid #ff7a1a;
}

.account-field input {
    border-color: rgba(255, 255, 255, .09);
    background: rgba(0, 0, 0, .16);
}

.account-submit,
.account-login-link {
    border-radius: 10px;
    background: linear-gradient(100deg, #ff7a1a, #ffd45a);
    box-shadow: 0 9px 19px rgba(255, 122, 26, .2);
}

.account-auth {
    max-width: 580px;
    background: radial-gradient(circle at 50% 0%, rgba(255, 212, 90, .15), transparent 44%), linear-gradient(145deg, #303037, #222329);
}

.history-header {
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, .1);
}

.history-updated {
    padding: 7px 9px;
    color: rgba(255, 226, 168, .8) !important;
    background: rgba(255, 122, 26, .09);
    border: 1px solid rgba(255, 153, 67, .18);
    border-radius: 999px;
}

.history-stat {
    position: relative;
    overflow: hidden;
    border-color: rgba(255, 255, 255, .09);
    border-radius: 11px;
    background: linear-gradient(145deg, rgba(255, 122, 26, .13), rgba(0, 0, 0, .15));
}

.history-stat::before {
    position: absolute;
    top: 0;
    left: 0;
    width: 3px;
    height: 100%;
    content: '';
    background: #ff7a1a;
}

.history-stat:nth-child(2) {
    background: linear-gradient(145deg, rgba(255, 167, 70, .14), rgba(0, 0, 0, .15));
}

.history-stat:nth-child(2)::before { background: #ff9a43; }

.history-stat:nth-child(3) {
    background: linear-gradient(145deg, rgba(255, 212, 90, .14), rgba(0, 0, 0, .15));
}

.history-stat:nth-child(3)::before { background: #ffd45a; }

.history-stat:nth-child(4) {
    background: linear-gradient(145deg, rgba(255, 122, 26, .1), rgba(255, 212, 90, .08));
}

.history-stat:nth-child(4)::before { background: #ffbf55; }

.history-toolbar {
    padding: 11px;
    background: rgba(0, 0, 0, .13);
    border: 1px solid rgba(255, 255, 255, .06);
    border-radius: 11px;
}

.history-toolbar input,
.history-toolbar select {
    border-color: rgba(255, 255, 255, .09);
    background: #202126;
}

.history-table-wrap {
    padding: 6px 9px;
    background: rgba(0, 0, 0, .1);
    border: 1px solid rgba(255, 255, 255, .055);
    border-radius: 11px;
}

.history-table tbody tr:hover td {
    background: rgba(255, 122, 26, .075);
}

@media (max-width: 520px) {
    .account-card {
        border-radius: 11px;
    }

    .account-layout > aside .account-user-name {
        padding-bottom: 9px;
    }
}
