/* My Account page. Shared primitives live in platform.css. */
.account-page {
    width: 100%;
    max-width: 960px;
    gap: 1.25rem;
    padding-top: 2rem;
    padding-bottom: 3rem;
}

.account-title {
    text-align: center;
}

.account-title p,
.account-muted {
    color: var(--lot-text-muted);
}

.account-card {
    width: 100%;
    padding: 1.5rem;
    background: var(--lot-surface);
    border: 1px solid var(--lot-border);
    border-radius: var(--lot-radius);
    box-shadow: var(--lot-shadow-soft);
    text-align: left;
}

.account-card h2 {
    margin-top: 0;
}

.account-card > :last-child {
    margin-bottom: 0;
}

/* ── Sign in ── */

.account-content {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    width: 100%;
}

.account-content[hidden] {
    display: none;
}

/* Loading, sign-in and error states share one compact card. */
.account-card--compact {
    max-width: 400px;
    margin-inline: auto;
    padding: 2rem;
    text-align: center;
}

.account-providers {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

/* Social sign-in buttons, styled per each provider's brand guidelines for dark backgrounds. */
.social-btn {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 44px;
    padding: 0 44px;
    border: 1px solid transparent;
    border-radius: var(--lot-radius-sm);
    font-family: 'Roboto', system-ui, sans-serif;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: filter 0.15s ease;
}

.social-btn img {
    position: absolute;
    left: 14px;
    width: 20px;
    height: 20px;
    object-fit: contain;
}

.social-btn:hover {
    filter: brightness(0.92);
}

.social-btn:focus-visible {
    outline: 2px solid var(--lot-gold);
    outline-offset: 2px;
}

.social-btn--google {
    background: #ffffff;
    border-color: #747775;
    color: #1f1f1f;
}

.social-btn--apple {
    background: #ffffff;
    color: #000000;
}

.social-btn--apple img {
    filter: brightness(0);
}

.social-btn--discord {
    background: #5865f2;
    color: #ffffff;
}

.social-btn--x {
    background: #000000;
    border-color: var(--lot-border-strong);
    color: #ffffff;
}

.social-btn--discord:hover,
.social-btn--x:hover {
    filter: brightness(1.15);
}

.account-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
    margin-top: 1.25rem;
}

.account-error {
    margin-top: 0.75rem;
    color: var(--lot-red);
}

.account-error:empty {
    display: none;
}

.account-secondary {
    background: transparent;
    color: var(--lot-text);
    border-color: var(--lot-border-strong);
}

.account-secondary:hover:not(:disabled) {
    background: var(--lot-hover);
    color: var(--lot-text);
}

/* ── Status ── */

.account-status {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 1rem;
    align-items: flex-start;
    border-left: 4px solid var(--lot-green);
    padding-left: 1rem;
}

.account-status--muted {
    border-left-color: var(--lot-gold);
}

.account-status--banned {
    border-left-color: var(--lot-red);
}

.account-status h2 {
    margin: 0 0 0.25rem;
}

.account-status p {
    margin: 0.25rem 0 0;
    color: var(--lot-text-muted);
}

/* ── Thermometer ──
   Everything positions off --thermo-h (tube height) and a 0-100 value: --pct for the player's
   fill and marker, --at for each ladder tick. */

.thermo {
    --thermo-h: 440px;
    display: flex;
    gap: 0.5rem;
    align-items: flex-start;
    justify-content: center;
    padding: 1rem 0 0.5rem;
}

.thermo__gauge {
    position: relative;
    flex: 0 0 auto;
    width: 190px;
    height: calc(var(--thermo-h) + 56px);
}

.thermo__tube {
    position: absolute;
    top: 0;
    left: 140px;
    width: 34px;
    height: var(--thermo-h);
    border: 2px solid var(--lot-border-strong);
    border-radius: 17px 17px 0 0;
    background: rgba(255, 255, 255, 0.05);
    overflow: hidden;
    box-sizing: border-box;
}

.thermo__fill {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: calc(var(--thermo-h) * var(--pct, 0) / 100);
    background: linear-gradient(to top, var(--lot-green), var(--lot-gold) 40%, #fb923c 70%, var(--lot-red));
    background-size: 100% var(--thermo-h);
    background-position: bottom;
    transition: height 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}

.thermo__bulb {
    position: absolute;
    top: calc(var(--thermo-h) - 8px);
    left: 157px;
    width: 64px;
    height: 64px;
    transform: translateX(-50%);
    border: 2px solid var(--lot-border-strong);
    border-radius: 50%;
    background: var(--thermo-bulb, var(--lot-green));
    box-shadow: inset 0 -6px 12px rgba(0, 0, 0, 0.25);
    box-sizing: border-box;
}

.thermo__marker {
    position: absolute;
    right: 58px;
    top: calc(var(--thermo-h) * (100 - var(--pct, 0)) / 100);
    transform: translateY(-50%);
    padding: 0.25rem 0.6rem;
    border-radius: var(--lot-radius-sm);
    background: var(--lot-gold);
    color: #3a2500;
    font-size: 0.8rem;
    font-weight: 700;
    white-space: nowrap;
    transition: top 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}

.thermo__marker::after {
    content: "";
    position: absolute;
    left: 100%;
    top: 50%;
    width: 8px;
    height: 8px;
    transform: translate(-4px, -50%) rotate(45deg);
    background: var(--lot-gold);
}

.thermo__marker[hidden] {
    display: none;
}

.thermo__ticks {
    position: relative;
    flex: 1 1 auto;
    max-width: 380px;
    height: var(--thermo-h);
}

.thermo__tick {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(var(--thermo-h) * (100 - var(--at)) / 100);
    display: flex;
    align-items: center;
    gap: 0.6rem;
    transform: translateY(-50%);
    font-size: 0.85rem;
    line-height: 1.1;
}

.thermo__tick::before {
    content: "";
    flex: 0 0 18px;
    height: 2px;
    background: var(--lot-border-strong);
}

.thermo__tick-points {
    flex: 0 0 3rem;
    font-weight: 600;
    color: var(--lot-text);
}

.thermo__tick-label {
    color: var(--lot-text-muted);
    white-space: nowrap;
}

.thermo__tick--reached .thermo__tick-label {
    color: var(--lot-text);
}

.thermo__tick--warning .thermo__tick-label {
    color: var(--lot-blue);
}

.thermo__tick--mute .thermo__tick-label {
    color: var(--lot-gold);
}

.thermo__tick--ban .thermo__tick-label {
    color: var(--lot-red);
}

.thermo__caption {
    margin: 0.5rem 0 0;
    text-align: center;
    color: var(--lot-text-muted);
}

.thermo__caption strong {
    color: var(--lot-text);
}

/* ── Tables ── */

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

.account-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.92rem;
}

.account-table th,
.account-table td {
    padding: 0.65rem 0.75rem;
    border-bottom: 1px solid var(--lot-border);
    text-align: left;
    vertical-align: top;
}

.account-table th {
    color: var(--lot-text-faint);
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    white-space: nowrap;
}

.account-table td small {
    display: block;
    color: var(--lot-text-faint);
}

.account-table .num {
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.account-table .struck {
    text-decoration: line-through;
    color: var(--lot-text-faint);
}

.badge-pill {
    display: inline-block;
    padding: 0.15rem 0.6rem;
    border-radius: 999px;
    border: 1px solid var(--lot-border-strong);
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
}

.badge-pill--active {
    border-color: var(--lot-red);
    color: var(--lot-red);
}

.badge-pill--served {
    color: var(--lot-text-muted);
}

.badge-pill--revoked {
    color: var(--lot-blue);
    border-color: var(--lot-blue);
}

.account-steps {
    padding-left: 1.25rem;
    color: var(--lot-text-muted);
}

.account-steps li {
    margin-bottom: 0.6rem;
}

.account-steps strong {
    color: var(--lot-text);
}

@media (max-width: 640px) {
    .account-card {
        padding: 1.1rem;
    }

    .thermo {
        --thermo-h: 380px;
    }

    .thermo__gauge {
        width: 138px;
    }

    .thermo__tube {
        left: 100px;
    }

    .thermo__bulb {
        left: 117px;
    }

    .thermo__marker {
        right: 44px;
        font-size: 0.75rem;
    }

    .thermo__tick {
        gap: 0.4rem;
        font-size: 0.78rem;
    }

    .thermo__tick::before {
        flex-basis: 10px;
    }

    .thermo__tick-points {
        flex-basis: 2.4rem;
    }
}
