/**
 * 拍卖 / 寄售 / 赛马 — 手机端通用样式
 */
:root {
    --act-bg: #0f1419;
    --act-card: #1a2332;
    --act-border: rgba(255, 255, 255, 0.08);
    --act-text: #f0f4f8;
    --act-muted: #8b9cb3;
    --act-safe-b: env(safe-area-inset-bottom, 0px);
    --act-safe-t: env(safe-area-inset-top, 0px);
    --act-touch: 48px;
    --act-radius: 14px;
}

/* 活动页深色底（覆盖商城浅色 body） */
body.act-page {
    background: linear-gradient(165deg, #0f1419 0%, #16213e 45%, #0f3460 100%) !important;
    color: var(--act-text);
    min-height: 100vh;
    padding-bottom: calc(16px + var(--act-safe-b));
    -webkit-tap-highlight-color: transparent;
}

.act-topbar {
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: calc(10px + var(--act-safe-t)) 14px 10px;
    background: rgba(15, 20, 35, 0.92);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--act-border);
}

.act-topbar .back-link {
    color: #7ee787;
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    padding: 8px 4px;
    min-height: var(--act-touch);
    display: inline-flex;
    align-items: center;
}

.act-topbar .act-user {
    font-size: 13px;
    color: var(--act-muted);
    text-align: right;
    line-height: 1.4;
}

.act-topbar .act-user strong {
    color: #ffd700;
    font-weight: 700;
}

.act-page-header {
    text-align: center;
    padding: 8px 16px 20px;
}

.act-page-header h1 {
    font-size: 1.45rem;
    margin: 0 0 6px;
    font-weight: 700;
}

.act-page-header p {
    margin: 0;
    font-size: 13px;
    color: var(--act-muted);
    line-height: 1.5;
}

/* 底部抽屉模态 */
.act-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: rgba(0, 0, 0, 0.55);
    align-items: flex-end;
    justify-content: center;
    padding: 0;
}

.act-modal.show {
    display: flex;
}

.act-modal-sheet {
    width: 100%;
    max-height: min(92vh, 720px);
    background: linear-gradient(180deg, #1e2a3a 0%, #151c28 100%);
    border-radius: 18px 18px 0 0;
    border: 1px solid var(--act-border);
    border-bottom: none;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: actSheetUp 0.28s ease-out;
    padding-bottom: var(--act-safe-b);
}

@keyframes actSheetUp {
    from { transform: translateY(100%); opacity: 0.6; }
    to { transform: translateY(0); opacity: 1; }
}

.act-modal-drag {
    width: 40px;
    height: 4px;
    background: rgba(255, 255, 255, 0.25);
    border-radius: 4px;
    margin: 10px auto 4px;
    flex-shrink: 0;
}

.act-modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 16px 12px;
    border-bottom: 1px solid var(--act-border);
    flex-shrink: 0;
}

.act-modal-head h3 {
    margin: 0;
    font-size: 17px;
    font-weight: 700;
    flex: 1;
    padding-right: 8px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.act-modal-close {
    width: var(--act-touch);
    height: var(--act-touch);
    border: none;
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
    border-radius: 50%;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    flex-shrink: 0;
}

.act-modal-scroll {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 16px;
    overscroll-behavior: contain;
}

.act-modal-foot {
    flex-shrink: 0;
    padding: 12px 16px calc(12px + var(--act-safe-b));
    background: rgba(10, 14, 22, 0.95);
    border-top: 1px solid var(--act-border);
    box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.35);
}

.act-btn-primary {
    width: 100%;
    min-height: var(--act-touch);
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
}

.act-btn-row {
    display: flex;
    gap: 10px;
    align-items: stretch;
}

.act-btn-row .act-input {
    flex: 1;
    min-width: 0;
    min-height: var(--act-touch);
    padding: 0 14px;
    border-radius: 12px;
    border: 1px solid var(--act-border);
    background: rgba(0, 0, 0, 0.35);
    color: var(--act-text);
    font-size: 18px;
    font-weight: 600;
    text-align: center;
}

.act-btn-row .act-btn-primary {
    flex: 0 0 38%;
    min-width: 100px;
}

.act-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
}

.act-chip {
    min-height: 36px;
    padding: 0 14px;
    border-radius: 20px;
    border: 1px solid var(--act-border);
    background: rgba(255, 255, 255, 0.06);
    color: var(--act-text);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

.act-chip:active {
    transform: scale(0.97);
}

.act-hint {
    font-size: 12px;
    color: var(--act-muted);
    margin: 0 0 8px;
    text-align: center;
}

/* 横向 Tab（寄售） */
.act-tabs-scroll {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding: 0 12px 14px;
    scrollbar-width: none;
}

.act-tabs-scroll::-webkit-scrollbar {
    display: none;
}

.act-tab-pill {
    flex: 0 0 auto;
    min-height: 40px;
    padding: 0 16px;
    border-radius: 20px;
    border: 1px solid var(--act-border);
    background: rgba(255, 255, 255, 0.05);
    color: var(--act-muted);
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    cursor: pointer;
}

.act-tab-pill.active {
    background: linear-gradient(135deg, rgba(126, 231, 135, 0.35), rgba(0, 217, 255, 0.2));
    border-color: #7ee787;
    color: #fff;
}

/* 可折叠说明 */
.act-rules-toggle {
    margin: 0 12px 12px;
    border-radius: var(--act-radius);
    border: 1px solid var(--act-border);
    background: rgba(0, 0, 0, 0.25);
    overflow: hidden;
}

.act-rules-toggle summary {
    padding: 12px 14px;
    font-size: 13px;
    font-weight: 600;
    color: #7ee787;
    cursor: pointer;
    list-style: none;
}

.act-rules-toggle summary::-webkit-details-marker {
    display: none;
}

.act-rules-toggle summary::after {
    content: '▼';
    float: right;
    font-size: 10px;
    opacity: 0.6;
}

.act-rules-toggle[open] summary::after {
    transform: rotate(180deg);
}

.act-rules-toggle .rules-body {
    padding: 0 14px 12px;
    font-size: 12px;
    line-height: 1.6;
    color: var(--act-muted);
}

@media (min-width: 769px) {
    .act-modal {
        align-items: center;
        padding: 20px;
    }

    .act-modal-sheet {
        max-width: 480px;
        border-radius: 18px;
        max-height: 85vh;
        animation: none;
    }

    .act-modal-drag {
        display: none;
    }
}
