:root {
    --bg: #090b10;
    --elev: #141922;
    --elev-2: #1b212c;
    --line: #2c3444;
    --text: #e8eef7;
    --muted: #93a0b5;
    --green: #2fe3a1;
    --green-deep: #18c789;
    --danger: #ff6d7a;
    --shadow: 0 16px 40px rgba(0, 0, 0, 0.28);
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    background: var(--bg);
    color: var(--text);
    font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

body.modal-open { overflow: hidden; }

a { color: inherit; text-decoration: none; }

button, input { font: inherit; }

.head-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 64px;
    padding: 0 28px;
    border-bottom: 1px solid #1c2230;
    background: #0c0f16;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--green);
    font-weight: 700;
    letter-spacing: 0.2px;
}

.brand-mark { width: 18px; height: 18px; }

.nav-right {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #c5cedb;
    font-size: 14px;
}

.nav-link:hover,
.nav-signin:hover { color: #fff; }

.nav-link.is-current { color: var(--green); }

.nav-sep { color: #465064; }

.nav-signin {
    border: 1px solid #3a4458;
    border-radius: 8px;
    padding: 6px 12px;
}

.nav-nick {
    color: var(--green);
    font-variant-numeric: tabular-nums;
    cursor: pointer;
}

.nav-nick:hover { color: #fff; }

.nick-slot {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.claim-float {
    position: absolute;
    left: 50%;
    bottom: calc(100% - 2px);
    z-index: 5;
    color: #2fe3a1;
    font-size: 15px;
    font-weight: 800;
    line-height: 1;
    white-space: nowrap;
    pointer-events: none;
    text-shadow: 0 2px 8px rgba(47, 227, 161, 0.45);
    animation: claim-pop 1.35s ease-out forwards;
}

@keyframes claim-pop {
    0% { opacity: 0; transform: translateX(-50%) translateY(8px) scale(0.85); }
    18% { opacity: 1; transform: translateX(-50%) translateY(0) scale(1.08); }
    100% { opacity: 0; transform: translateX(-50%) translateY(-26px) scale(1); }
}

.is-hidden { display: none; }

.page {
    width: min(920px, calc(100% - 32px));
    margin: 0 auto;
    padding: 28px 0 48px;
}

.banner-slot,
.ad-cell {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--muted);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.02), transparent 40%),
        var(--elev);
}

.banner-slot {
    min-height: 90px;
    border-radius: 10px;
    margin-bottom: 22px;
    font-size: 13px;
    letter-spacing: 0.4px;
}

.stat-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 14px;
}

.stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 78px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--elev);
    padding: 14px 10px 12px;
    text-align: center;
}

.stat-label {
    display: block;
    color: var(--muted);
    font-size: 12px;
    letter-spacing: 0.2px;
    margin-top: 6px;
}

.stat-value {
    display: block;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.35;
    font-variant-numeric: tabular-nums;
}

.claim-card,
.modal-panel {
    background: var(--elev);
    border: 1px solid var(--line);
    border-radius: 14px;
    box-shadow: var(--shadow);
}

.claim-card {
    position: relative;
    padding: 28px 22px 22px;
}

.claim-countdown {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 2;
    width: 52px;
    height: 52px;
}

.claim-countdown-ring {
    position: relative;
    width: 52px;
    height: 52px;
}

.claim-countdown-ring svg {
    display: block;
    width: 52px;
    height: 52px;
    transform: rotate(-90deg);
}

.claim-countdown-ring .ring-bg,
.claim-countdown-ring .ring-fg {
    fill: none;
    stroke-width: 3;
}

.claim-countdown-ring .ring-bg { stroke: #2c3444; }

.claim-countdown-ring .ring-fg {
    stroke: var(--green);
    stroke-linecap: round;
}

.claim-countdown-num {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.claim-refresh {
    width: 52px;
    height: 52px;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: #10161f;
    color: var(--green);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    cursor: pointer;
}

.claim-refresh svg {
    width: 22px;
    height: 22px;
    animation: claim-refresh-spin 1.4s linear infinite;
}

.claim-refresh:hover {
    color: #fff;
    border-color: var(--green);
}

.claim-countdown-ring[hidden],
.claim-refresh[hidden] { display: none; }

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

.claim-hint {
    margin: 0 0 18px;
    text-align: center;
    color: #d5deea;
    font-size: 14px;
}

.claim-form,
#login-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.turnstile-box {
    min-height: 65px;
    display: flex;
    justify-content: center;
}

.form-msg,
.form-error {
    min-height: 1.2em;
    margin: 0;
    text-align: center;
    font-size: 13px;
}

.form-msg { color: var(--green); }

.form-msg.is-err { color: var(--danger); }

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

.btn-claim {
    width: 100%;
    height: 46px;
    border: 0;
    border-radius: 8px;
    background: var(--green);
    color: #06281c;
    font-weight: 700;
    cursor: pointer;
}

.btn-claim:hover { background: var(--green-deep); color: #fff; }

.btn-claim:disabled {
    opacity: 0.65;
    cursor: wait;
}

.btn-claim:disabled:hover {
    background: var(--green);
    color: #06281c;
}

.btn-claim.is-done:disabled {
    cursor: not-allowed;
    opacity: 0.45;
}

.board {
    margin-top: 22px;
    border: 1px solid var(--line);
    border-radius: 12px;
    overflow: hidden;
    background: #10141c;
}

.board h2 {
    margin: 0;
    padding: 12px 10px;
    text-align: center;
    font-size: 14px;
    letter-spacing: 1.5px;
    border-bottom: 1px solid var(--line);
}

.ad-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
}

.ad-cell {
    min-height: 96px;
    border-right: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    font-size: 13px;
}

.ad-cell:nth-child(4n) { border-right: 0; }

.ad-cell:nth-last-child(-n + 4) { border-bottom: 0; }

.claim-log-wrap { overflow-x: auto; }

.claim-log {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.claim-log th,
.claim-log td {
    padding: 10px 14px;
    text-align: left;
    border-bottom: 1px solid var(--line);
}

.claim-log th {
    color: var(--muted);
    font-size: 12px;
    font-weight: 600;
}

.claim-log tr:last-child td { border-bottom: 0; }

.claim-log td:nth-child(2),
.claim-log td:nth-child(3) {
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.claim-log-empty {
    margin: 0;
    padding: 18px;
    text-align: center;
    color: var(--muted);
    font-size: 13px;
}

.modal {
    position: fixed;
    inset: 0;
    z-index: 30;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(5, 7, 12, 0.72);
}

.modal[hidden] { display: none; }

.modal-panel {
    position: relative;
    width: min(420px, 100%);
    padding: 28px 22px 20px;
}

.modal-panel h2 {
    margin: 0 0 18px;
    text-align: center;
    font-size: 20px;
}

.modal-close {
    position: absolute;
    top: 8px;
    right: 10px;
    width: 32px;
    height: 32px;
    border: 0;
    background: transparent;
    color: var(--muted);
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
}

.modal-close:hover { color: #fff; }

#login-form label {
    font-size: 13px;
    color: var(--muted);
}

#fp-email {
    width: 100%;
    height: 42px;
    padding: 0 12px;
    border: 1px solid #3a4458;
    border-radius: 8px;
    background: var(--elev-2);
    color: var(--text);
    outline: none;
}

#fp-email:focus { border-color: var(--green); }

.referral {
    margin: 14px 0 0;
    text-align: center;
    color: var(--muted);
    font-size: 13px;
}

.referral a {
    color: var(--green);
    text-decoration: underline;
}

.account-card {
    margin-bottom: 22px;
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--elev);
}

.account-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 28px;
    margin-bottom: 16px;
}

.account-meta p {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
}

.account-meta strong {
    color: var(--text);
    font-weight: 700;
}

.withdraw-form {
    display: flex;
    gap: 10px;
}

.withdraw-form input {
    flex: 1;
    min-width: 0;
    height: 42px;
    padding: 0 12px;
    border: 1px solid #3a4458;
    border-radius: 8px;
    background: var(--elev-2);
    color: var(--text);
    outline: none;
}

.withdraw-form input:focus { border-color: var(--green); }

.btn-all,
.btn-withdraw {
    height: 42px;
    padding: 0 16px;
    border: 0;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
}

.btn-all {
    background: #243044;
    color: var(--text);
}

.btn-all:hover { background: #314056; }

.btn-withdraw {
    background: var(--green);
    color: #06281c;
}

.btn-withdraw:hover { background: var(--green-deep); color: #fff; }

.withdraw-msg {
    margin: 12px 0 0;
    font-size: 13px;
}

.withdraw-msg.is-ok { color: var(--green); }

.withdraw-msg.is-err { color: var(--danger); }

.ptc-msg {
    min-height: 1.2em;
    margin: 0 0 12px;
    text-align: center;
    font-size: 13px;
    color: var(--green);
}

.page-ptc {
    width: min(1180px, calc(100% - 32px));
}

.ptc-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.ptc-card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-height: 156px;
    padding: 16px 16px 14px;
    border: 1px solid #2a3346;
    border-radius: 16px;
    background: #161b26;
    overflow: hidden;
}

.ptc-card.is-watching { padding-top: 42px; }

.ptc-bar {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    height: 28px;
    padding: 0 10px;
    background: #10151f;
    border-bottom: 1px solid #2a3346;
}

.ptc-bar[hidden] { display: none; }

.ptc-bar-track {
    flex: 1;
    height: 6px;
    border-radius: 99px;
    background: #243044;
    overflow: hidden;
}

.ptc-bar-fill {
    height: 100%;
    width: 0;
    background: var(--green);
}

.ptc-bar-left {
    min-width: 36px;
    color: var(--green);
    font-size: 12px;
    font-weight: 700;
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.ptc-bar.is-paused .ptc-bar-left { color: #e0b15a; }

.ptc-msg.is-err { color: var(--danger); }

.ptc-head {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    min-width: 0;
}

.ptc-letter {
    display: grid;
    place-items: center;
    flex: 0 0 42px;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: linear-gradient(180deg, #31456f, #24344f);
    color: #fff;
    font-size: 20px;
    font-weight: 700;
    line-height: 1;
}

.ptc-copy { min-width: 0; flex: 1; }

.ptc-title {
    margin: 0;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ptc-desc {
    height: 2.8em;
    margin: 4px 0 0;
    color: #93a0b5;
    font-size: 12.5px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.ptc-foot {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: auto;
}

.ptc-pay { min-width: 0; }

.ptc-amount {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: #3ee0c5;
    font-size: 13px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.ptc-usd {
    display: block;
    margin: 2px 0 0 19px;
    color: #7f8ba0;
    font-size: 12px;
}

.ptc-time {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin: 0 0 0 auto;
    color: #9aa6b8;
    font-size: 13px;
    white-space: nowrap;
}

.btn-watch {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 32px;
    padding: 0 12px;
    border: 0;
    border-radius: 8px;
    background: #3d6bff;
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}

.btn-watch:hover { background: #2f5ae6; }

.btn-watch:disabled {
    background: #2a3142;
    color: #8b95a7;
    cursor: default;
}

.ptc-empty {
    margin: 0;
    padding: 42px 20px;
    border: 1px dashed #3a4458;
    border-radius: 12px;
    background: #10141c;
    text-align: center;
    color: var(--muted);
}

.ptc-empty p {
    max-width: 42ch;
    margin: 8px auto 0;
    font-size: 13px;
    line-height: 1.5;
}

.ptc-empty-icon {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    margin: 0 auto 12px;
    border-radius: 10px;
    background: #1b212c;
    color: #8b95a7;
}

.ptc-empty-title {
    color: var(--text);
    font-size: 16px;
    font-weight: 700;
}

.page-account {
    width: min(1180px, calc(100% - 32px));
}

.account-split {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(280px, 0.9fr);
    gap: 18px;
    align-items: start;
}

.surf-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px 12px;
    margin-bottom: 14px;
}

.surf-form label {
    display: flex;
    flex-direction: column;
    gap: 6px;
    color: var(--muted);
    font-size: 12px;
}

.surf-form input,
.surf-form select {
    height: 40px;
    padding: 0 10px;
    border: 1px solid #3a4458;
    border-radius: 8px;
    background: var(--elev-2);
    color: var(--text);
    outline: none;
}

.surf-form input:focus,
.surf-form select:focus { border-color: var(--green); }

.surf-form button { justify-self: start; }

.surf-fee {
    grid-column: 1 / -1;
    margin: 0;
    color: var(--text);
    font-size: 13px;
    font-variant-numeric: tabular-nums;
}

.surf-confirm-amount,
.surf-confirm-warn {
    margin: 0 0 12px;
    text-align: center;
    font-size: 14px;
}

.surf-confirm-amount strong { font-variant-numeric: tabular-nums; }

.surf-confirm-warn { color: #e0b15a; }

.surf-confirm-actions {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 18px;
}

.surf-confirm-actions button {
    min-width: 96px;
    height: 40px;
    padding: 0 16px;
    border: 0;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
}

.pager {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 12px;
}

.pager a,
.pager span {
    min-width: 28px;
    height: 28px;
    padding: 0 8px;
    border-radius: 8px;
    text-align: center;
    line-height: 28px;
    color: var(--text);
}

.pager a { background: #243044; }

.pager a:hover { background: #314056; }

.pager .is-off {
    color: #5c677a;
    background: transparent;
}

@media (max-width: 980px) {
    .ptc-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 720px) {
    .head-nav {
        padding: 10px 14px;
        align-items: flex-start;
    }

    .nav-right { flex-wrap: wrap; justify-content: flex-end; }

    .stat-row,
    .ad-grid { grid-template-columns: 1fr 1fr; }

    .ad-cell:nth-child(4n) { border-right: 1px solid var(--line); }

    .ad-cell:nth-child(2n) { border-right: 0; }

    .ad-cell:nth-last-child(-n + 4) { border-bottom: 1px solid var(--line); }

    .ad-cell:nth-last-child(-n + 2) { border-bottom: 0; }

    .stat-value { font-size: 16px; }

    .ptc-grid { grid-template-columns: 1fr; }

    .withdraw-form { flex-wrap: wrap; }

    .withdraw-form input { flex-basis: 100%; }

    .account-split,
    .surf-form { grid-template-columns: 1fr; }
}

.watch-body {
    overflow: hidden;
}

.watch-top {
    display: flex;
    align-items: center;
    gap: 12px;
    height: 48px;
    padding: 0 14px;
    background: #0c0f16;
    border-bottom: 1px solid #1c2230;
}

.watch-back {
    color: var(--muted);
    font-size: 13px;
    white-space: nowrap;
}

.watch-back:hover { color: #fff; }

.watch-track {
    flex: 1;
    height: 8px;
    border-radius: 99px;
    background: #243044;
    overflow: hidden;
}

.watch-fill {
    height: 100%;
    width: 0;
    border-radius: 99px;
    background: var(--green);
}

.watch-left {
    min-width: 42px;
    color: var(--green);
    font-size: 13px;
    font-weight: 700;
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.watch-left.is-paused { color: #e0b15a; }

.watch-frame {
    display: block;
    width: 100%;
    height: calc(100vh - 48px);
    border: 0;
    background: #fff;
}
