/* HTMX 加载指示器 */
html, body {
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", "PingFang SC", "Noto Sans CJK SC", sans-serif;
}

body {
    background:
        radial-gradient(circle at 8% 8%, rgba(244, 114, 182, 0.10), transparent 28rem),
        radial-gradient(circle at 88% 12%, rgba(125, 211, 252, 0.13), transparent 30rem),
        radial-gradient(circle at 52% 92%, rgba(196, 181, 253, 0.10), transparent 34rem),
        hsl(var(--b2));
}

button,
a,
.btn,
label,
select {
    -webkit-tap-highlight-color: transparent;
}

.jelly-click,
.btn,
a {
    transition: transform 200ms cubic-bezier(0.16, 1, 0.3, 1), background-color 200ms ease, color 200ms ease, opacity 200ms ease, box-shadow 200ms ease;
}

.jelly-click:hover,
.btn:hover,
a:hover {
    transform: scale(1.03);
}

.jelly-click:active,
.btn:active,
a:active {
    transform: scale(0.95);
}

.jelly-hover {
    transition: transform 300ms cubic-bezier(0.16, 1, 0.3, 1), box-shadow 300ms ease, background-color 300ms ease;
}

.jelly-hover:hover {
    transform: translateY(-4px) scale(1.01);
}

.page-fade {
    animation: page-fade-in 420ms cubic-bezier(0.16, 1, 0.3, 1);
}

.soft-card {
    border-radius: 1.5rem;
    background: hsl(var(--b1) / 0.88);
    box-shadow: 0 24px 80px hsl(var(--bc) / 0.05);
    backdrop-filter: blur(18px) saturate(1.1);
}

.soft-label {
    display: inline-flex;
    align-items: center;
    width: max-content;
    border-radius: 999px;
    background: hsl(var(--p) / 0.10);
    color: hsl(var(--p));
    padding: 0.35rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.04em;
}

.soft-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    padding: 0.35rem 0.7rem;
    font-size: 0.75rem;
    font-weight: 800;
    white-space: nowrap;
}

.soft-input {
    width: 100%;
    border-radius: 1.25rem;
    background: hsl(var(--b2) / 0.75);
    color: hsl(var(--bc) / 0.82);
    padding: 0.9rem 1rem;
    outline: none;
    box-shadow: inset 0 1px 0 hsl(var(--b1) / 0.9), 0 18px 45px hsl(var(--bc) / 0.04);
    transition: transform 220ms cubic-bezier(0.16, 1, 0.3, 1), background-color 220ms ease, box-shadow 220ms ease;
}

.soft-input:focus {
    transform: translateY(-1px);
    background: hsl(var(--b1));
    box-shadow: 0 0 0 5px hsl(var(--p) / 0.10), 0 18px 55px hsl(var(--p) / 0.08);
}

.account-data-head,
.account-data-row {
    grid-template-columns: minmax(42px, 0.45fr) minmax(130px, 1.5fr) minmax(52px, 0.55fr) minmax(52px, 0.55fr) minmax(70px, 0.72fr) minmax(150px, 1.35fr) minmax(95px, 0.95fr) minmax(76px, 0.75fr) minmax(96px, 0.92fr) minmax(76px, 0.72fr) minmax(120px, 1fr);
    gap: 0.75rem;
}

.account-mobile-field {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    border-radius: 1rem;
    background: hsl(var(--b2) / 0.62);
    padding: 0.55rem 0.75rem;
    font-size: 0.82rem;
    color: hsl(var(--bc) / 0.55);
}

.account-mobile-field b {
    color: hsl(var(--bc) / 0.82);
    font-weight: 800;
    text-align: right;
}

@media (max-width: 1279px) {
    .account-data-row {
        display: grid;
        grid-template-columns: 52px minmax(0, 1fr);
        gap: 0.75rem;
    }

    .account-data-row > :nth-child(n+3) {
        grid-column: 1 / -1;
    }

    .account-data-row > :last-child {
        margin-top: 0.25rem;
    }
}

@media (min-width: 1280px) {
    .account-mobile-field {
        display: block;
        background: transparent;
        padding: 0;
        color: hsl(var(--bc) / 0.62);
    }

    .account-mobile-field span {
        display: none;
    }
}

.htmx-indicator {
    display: none;
}

.htmx-indicator.htmx-request {
    display: inline-block;
}

.htmx-request .htmx-indicator {
    display: inline-block;
}

.htmx-indicator.htmx-request + .htmx-indicator-hide {
    display: none;
}

.htmx-request .htmx-indicator-hide {
    display: none;
}

.htmx-request-row {
    opacity: 0.58;
    filter: saturate(0.85);
}

#htmx-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    width: 0;
    background: linear-gradient(90deg, hsl(var(--p) / 0.25), hsl(var(--p) / 0.9), hsl(var(--s) / 0.55));
    z-index: 9999;
    transition: width 180ms ease, opacity 250ms ease;
    opacity: 0;
}

#htmx-progress.active {
    width: 80%;
    opacity: 1;
}

#htmx-progress.done {
    width: 100%;
    opacity: 0;
}

#check-result-modal {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    background:
        radial-gradient(circle at 50% 42%, hsl(var(--b1) / 0.35), transparent 30rem),
        hsl(var(--bc) / 0.20);
    backdrop-filter: blur(14px) saturate(1.2);
    animation: check-modal-in 260ms cubic-bezier(0.16, 1, 0.3, 1);
}

#check-result-modal.fade-out {
    animation: check-modal-out 450ms ease-in forwards;
}

.check-result-card {
    width: min(440px, calc(100vw - 48px));
    padding: 2.1rem 2.25rem 1.9rem;
    border-radius: 2rem;
    background: hsl(var(--b1) / 0.90);
    color: hsl(var(--bc) / 0.90);
    text-align: center;
    box-shadow: 0 34px 110px hsl(var(--bc) / 0.16), inset 0 1px 0 hsl(var(--b1) / 0.90);
    transform-origin: center;
    animation: check-card-in 360ms cubic-bezier(0.18, 1.35, 0.32, 1);
    transition: transform 260ms cubic-bezier(0.16, 1, 0.3, 1), box-shadow 260ms ease, background 260ms ease;
}

.check-result-ring {
    width: 4rem;
    height: 4rem;
    margin: 0 auto 1rem;
    border-radius: 999px;
    display: grid;
    place-items: center;
    font-size: 2rem;
    font-weight: 900;
    box-shadow: 0 16px 40px hsl(var(--p) / 0.16);
    transition: background 220ms ease, color 220ms ease, box-shadow 220ms ease;
}

.check-result-card.loading .check-result-ring {
    position: relative;
    color: transparent;
    background: linear-gradient(135deg, hsl(var(--p) / 0.10), hsl(var(--s) / 0.10));
    box-shadow: 0 18px 44px hsl(var(--p) / 0.15);
}

.check-result-card.loading .check-result-ring::before {
    content: "";
    width: 2rem;
    height: 2rem;
    border-radius: 999px;
    border: 3px solid hsl(var(--p) / 0.16);
    border-top-color: hsl(var(--p) / 0.72);
    animation: check-spinner 820ms linear infinite;
}

.check-result-card.success .check-result-ring {
    color: hsl(var(--su));
    background: hsl(var(--su) / 0.12);
}

.check-result-card.error .check-result-ring {
    color: hsl(var(--er));
    background: hsl(var(--er) / 0.12);
    box-shadow: 0 16px 40px hsl(var(--er) / 0.14);
}

.check-result-title {
    font-size: 1.35rem;
    line-height: 1.2;
    font-weight: 900;
    color: hsl(var(--bc) / 0.90);
    letter-spacing: -0.02em;
}

.check-result-subtitle {
    margin-top: 0.55rem;
    font-size: 0.92rem;
    line-height: 1.45;
    color: hsl(var(--bc) / 0.58);
}

@keyframes check-modal-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes check-modal-out {
    from { opacity: 1; }
    to { opacity: 0; }
}

@keyframes check-card-in {
    from { opacity: 0; transform: translateY(18px) scale(0.90); }
    70% { opacity: 1; transform: translateY(-2px) scale(1.025); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes check-spinner {
    to { transform: rotate(360deg); }
}

/* 平滑过渡 */
.htmx-swapping {
    opacity: 0.4;
    transform: translateY(0.25rem);
    transition: opacity 300ms ease-out, transform 300ms ease-out;
}

.htmx-settling {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 300ms ease-out, transform 300ms ease-out;
}

/* 模态框样式 */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: hsl(var(--bc) / 0.22);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(16px) saturate(1.16);
    animation: check-modal-in 260ms cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-content {
    background: hsl(var(--b1));
    border-radius: 1.5rem;
    max-width: 90vw;
    max-height: 90vh;
    overflow: auto;
}

.soft-modal-overlay {
    padding: 1rem;
}

.soft-modal-card {
    border-radius: 2rem;
    background: hsl(var(--b1) / 0.92);
    padding: 2rem;
    box-shadow: 0 34px 110px hsl(var(--bc) / 0.16);
    backdrop-filter: blur(18px) saturate(1.1);
    animation: check-card-in 360ms cubic-bezier(0.18, 1.35, 0.32, 1);
}

/* Tinder 风格配色 */
:root {
    --tinder-pink: #FE3C72;
    --tinder-red: #FF6B6B;
    --tinder-orange: #FFA500;
}

/* 卡片阴影 */
.card-shadow {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 
                0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.card-shadow:hover {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 
                0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

@keyframes page-fade-in {
    from { opacity: 0; transform: translateY(0.4rem); }
    to { opacity: 1; transform: translateY(0); }
}
