* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #5f8ee6;
    --primary-light: #78c8cc;
    --primary-dark: #4e73d2;
    --primary-gradient: linear-gradient(135deg, #79cfd3 0%, #8aa4ff 100%);
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --error-color: #ef4444;
    --text-primary: #24324d;
    --text-secondary: #7a859c;
    --text-disabled: #d3dae8;
    --border-color: #e4ebf3;
    --bg-color: #f5fafb;
    --bg-white: #ffffff;
    --bg-gradient: linear-gradient(180deg, #fdfefe 0%, #f5fafb 52%, #f7f8fc 100%);
    --shadow-sm: 0 6px 16px rgba(123, 146, 181, 0.08);
    --shadow-md: 0 12px 28px rgba(123, 146, 181, 0.11);
    --shadow-lg: 0 18px 36px rgba(123, 146, 181, 0.14);
    --shadow-xl: 0 24px 48px rgba(123, 146, 181, 0.16);
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-xl: 20px;
}

a {
    text-decoration: none;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Helvetica Neue', sans-serif;
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--bg-gradient);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    letter-spacing: 0.01em;
}

.app-container {
    max-width: 750px;
    margin: 0 auto;
    background: linear-gradient(180deg, rgba(255,255,255,0.94) 0%, rgba(248,251,253,0.96) 100%);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(252, 254, 255, 0.84);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(228, 235, 243, 0.72);
    box-shadow: 0 6px 18px rgba(118, 141, 177, 0.06);
}

.header-content {
    display: flex;
    align-items: center;
    padding: 0 16px;
    height: 56px;
    gap: 0;
}

.logo {
    font-size: 18px;
    font-weight: 700;
    flex-shrink: 0;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.02em;
}

.page-title {
    font-size: 18px;
    font-weight: 600;
    flex: 1;
    text-align: center;
}

.btn-back {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 20px;
    cursor: pointer;
    text-decoration: none;
}

.btn-back:active {
    background-color: var(--bg-color);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 32px;
}

.points-display {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.15);
    transition: all 0.3s ease;
}

.points-display:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.2);
}

.points-icon {
    font-size: 16px;
}

.points-value {
    color: var(--warning-color);
}

.btn-icon {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 18px;
}

.btn-icon:active {
    background-color: var(--bg-color);
}

.badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 18px;
    height: 18px;
    padding: 0 4px;
    background-color: var(--error-color);
    color: white;
    font-size: 11px;
    font-weight: 600;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.main-content {
    flex: 1;
    background: var(--bg-white);
    /* 移除 overflow-y: auto 以支持子元素 sticky 定位 */
    -webkit-overflow-scrolling: touch;
}

.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 750px;
    display: flex;
    background: rgba(252, 254, 255, 0.9);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border-top: 1px solid rgba(228, 235, 243, 0.8);
    box-shadow: 0 -10px 28px rgba(118, 141, 177, 0.08);
    z-index: 100;
    padding: 8px 0;
}

.nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 6px 0;
    text-decoration: none;
    color: #9da8bb;
    position: relative;
    transition: all 0.3s ease;
}

.nav-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 3px;
    background: var(--primary-gradient);
    border-radius: 0 0 3px 3px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.nav-item.active {
    color: var(--primary-color);
}

.nav-item.active .nav-icon-svg {
    stroke: var(--primary-color);
    transform: scale(1.05);
}

.nav-item.active::before {
    opacity: 1;
}

.nav-item:hover {
    color: var(--primary-light);
}

.nav-item:hover .nav-icon-svg {
    stroke: var(--primary-light);
    transform: scale(1.08);
}

.nav-item:active {
    transform: scale(0.95);
}

.nav-icon {
    font-size: 22px;
    margin-bottom: 2px;
}

.nav-icon-svg {
    width: 24px;
    height: 24px;
    margin-bottom: 2px;
    stroke: currentColor;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-text {
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.02em;
}

.loading {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-secondary);
}

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    color: var(--text-secondary);
}

.empty-icon {
    font-size: 64px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.empty-text {
    font-size: 14px;
}

.btn-primary {
    width: 100%;
    padding: 14px 24px;
    background: var(--primary-gradient);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 10px 24px rgba(123, 151, 221, 0.22);
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 28px rgba(123, 151, 221, 0.28);
}

.btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 6px 16px rgba(123, 151, 221, 0.18);
}

.btn-primary:disabled {
    background: linear-gradient(135deg, #d1d5db 0%, #9ca3af 100%);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-secondary {
    padding: 8px 16px;
    background-color: var(--bg-color);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-secondary:active {
    background-color: var(--border-color);
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background-color: var(--bg-white);
    border-radius: var(--radius-lg);
    width: 90%;
    max-width: 500px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
}

.modal-title {
    font-size: 18px;
    font-weight: 600;
}

.btn-close {
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    font-size: 24px;
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
}

.btn-close:active {
    background-color: var(--bg-color);
}

.modal-body {
    padding: 20px;
    overflow-y: auto;
}

.native-select-hidden {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    pointer-events: none;
    display: none !important;
}

.h5-select {
    position: relative;
    width: 100%;
}

.h5-select-trigger {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border: 1px solid rgba(203, 214, 234, 0.92);
    border-radius: 18px;
    min-height: 54px;
    padding: 0 16px;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    color: #23324f;
    background: linear-gradient(180deg, rgba(255,255,255,0.98) 0%, rgba(247,250,255,0.98) 100%);
    box-shadow: 0 10px 24px rgba(115, 139, 175, 0.08), inset 0 1px 0 rgba(255,255,255,0.92);
    transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.2s ease;
}

.h5-select-trigger:active {
    transform: scale(0.995);
}

.h5-select .form-select.h5-select-trigger,
.h5-select .filter-select.h5-select-trigger {
    min-height: 54px;
    padding: 0 16px;
    border: 1px solid rgba(203, 214, 234, 0.92);
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(255,255,255,0.985) 0%, rgba(246,249,255,0.98) 100%);
    box-shadow: 0 10px 24px rgba(115, 139, 175, 0.08), inset 0 1px 0 rgba(255,255,255,0.94);
}

.h5-select .form-select.h5-select-trigger .h5-select-value,
.h5-select .filter-select.h5-select-trigger .h5-select-value {
    color: #22324d;
}

.h5-select .form-select.h5-select-trigger .h5-select-value.is-placeholder,
.h5-select .filter-select.h5-select-trigger .h5-select-value.is-placeholder {
    color: #71819a;
}

.h5-select-value {
    min-width: 0;
    flex: 1;
    text-align: left;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 15px;
    font-weight: 600;
}

.h5-select-value.is-placeholder {
    color: #71819a;
}

.h5-select-arrow {
    width: 11px;
    height: 11px;
    flex-shrink: 0;
    border-right: 2px solid #7f90ab;
    border-bottom: 2px solid #7f90ab;
    transform: rotate(45deg) translateY(-2px);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.h5-select.is-disabled {
    opacity: 0.5;
}

.h5-select.is-open .h5-select-trigger,
.h5-select-trigger:focus-visible {
    border-color: rgba(119, 142, 235, 0.96);
    box-shadow: 0 0 0 4px rgba(109, 132, 238, 0.12), 0 16px 32px rgba(116, 140, 178, 0.14);
    outline: none;
}

.h5-select.is-open .h5-select-arrow {
    transform: rotate(225deg) translateY(1px);
    border-color: #5d72de;
}

.h5-select-sheet-mask {
    position: fixed;
    inset: 0;
    z-index: 2200;
    background: rgba(14, 24, 42, 0.34);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: flex;
    align-items: flex-end;
}

.h5-select-sheet {
    width: 100%;
    max-height: min(74vh, 600px);
    background: linear-gradient(180deg, rgba(255,255,255,0.995) 0%, rgba(245,249,255,0.99) 100%);
    border-radius: 28px 28px 0 0;
    box-shadow: 0 -24px 64px rgba(48, 67, 99, 0.22);
    border-top: 1px solid rgba(228, 235, 246, 0.9);
    padding: 10px 0 calc(14px + env(safe-area-inset-bottom, 0px));
    animation: h5SelectSheetIn 0.24s ease-out;
}

.h5-select-sheet-handle {
    width: 42px;
    height: 5px;
    border-radius: 999px;
    background: rgba(168, 180, 200, 0.9);
    margin: 4px auto 10px;
}

.h5-select-sheet-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 0 18px 12px;
}

.h5-select-sheet-title {
    flex: 1;
    text-align: center;
    font-size: 17px;
    font-weight: 800;
    letter-spacing: 0.02em;
    color: #22324d;
}

.h5-select-sheet-action {
    min-width: 48px;
    border: none;
    background: transparent;
    color: #7b879b;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

.h5-select-sheet-action.confirm {
    color: var(--primary-color);
}

.h5-select-sheet-current {
    margin: 0 16px 14px;
    padding: 12px 14px;
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(242, 247, 255, 0.98) 0%, rgba(247, 250, 255, 0.98) 100%);
    border: 1px solid rgba(222, 231, 245, 0.86);
    color: #4a5b76;
    font-size: 13px;
}

.h5-select-sheet-current.is-placeholder {
    color: #8a97aa;
}

.h5-select-sheet-options {
    padding: 0 12px;
    overflow-y: auto;
}

.h5-select-option {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 14px;
    border: none;
    border-radius: 18px;
    background: transparent;
    color: #283851;
    font-size: 15px;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease, color 0.2s ease;
}

.h5-select-option:active {
    background: rgba(239, 244, 251, 0.96);
    transform: scale(0.995);
}

.h5-select-option.is-active {
    background: linear-gradient(135deg, rgba(120, 207, 210, 0.14) 0%, rgba(133, 160, 255, 0.18) 100%);
    color: #315bdc;
    font-weight: 800;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.75);
}

.h5-select-option:disabled {
    opacity: 0.42;
    cursor: not-allowed;
}

.h5-select-option-check {
    color: #315bdc;
    font-weight: 800;
}

.h5-select-option-text {
    line-height: 1.4;
}

@keyframes h5SelectSheetIn {
    from {
        transform: translateY(18px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.confirm-dialog-mask {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(15, 23, 42, 0.42);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 2100;
}

.confirm-dialog-panel {
    width: min(100%, 360px);
    padding: 24px 20px 18px;
    border-radius: 24px;
    background: linear-gradient(180deg, rgba(255,255,255,0.98) 0%, rgba(247,250,255,0.98) 100%);
    border: 1px solid rgba(215, 225, 238, 0.96);
    box-shadow: 0 28px 60px rgba(53, 76, 112, 0.24);
    text-align: center;
}

.confirm-dialog-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 14px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    font-weight: 800;
    color: #4f6ff0;
    background: linear-gradient(135deg, rgba(121, 207, 211, 0.18) 0%, rgba(138, 164, 255, 0.22) 100%);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.9);
}

.confirm-dialog-title {
    font-size: 18px;
    line-height: 1.2;
    font-weight: 700;
    color: #23324f;
}

.confirm-dialog-message {
    margin-top: 10px;
    font-size: 14px;
    line-height: 1.7;
    color: #66758f;
}

.confirm-dialog-actions {
    display: flex;
    gap: 12px;
    margin-top: 20px;
}

.confirm-dialog-btn {
    flex: 1;
    height: 44px;
    border: none;
    border-radius: 14px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.confirm-dialog-btn.secondary {
    color: #55657f;
    background: linear-gradient(180deg, #ffffff 0%, #f4f7fb 100%);
    border: 1px solid rgba(216, 226, 238, 0.92);
}

.confirm-dialog-btn.primary {
    color: #ffffff;
    background: var(--primary-gradient);
    box-shadow: 0 12px 24px rgba(122, 153, 227, 0.24);
}

.confirm-dialog-btn:active {
    transform: scale(0.98);
}

.prompt-dialog-mask {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(15, 23, 42, 0.42);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 2100;
}

.prompt-dialog-panel {
    width: min(100%, 380px);
    padding: 22px 18px 18px;
    border-radius: 24px;
    background: linear-gradient(180deg, rgba(255,255,255,0.98) 0%, rgba(247,250,255,0.98) 100%);
    border: 1px solid rgba(215, 225, 238, 0.96);
    box-shadow: 0 28px 60px rgba(53, 76, 112, 0.24);
}

.prompt-dialog-title {
    font-size: 18px;
    line-height: 1.2;
    font-weight: 700;
    color: #23324f;
    text-align: center;
}

.prompt-dialog-message {
    margin-top: 10px;
    font-size: 14px;
    line-height: 1.7;
    color: #66758f;
    text-align: center;
}

.prompt-dialog-field {
    margin-top: 16px;
}

.prompt-dialog-input {
    width: 100%;
    min-height: 112px;
    padding: 14px 16px;
    border: 1px solid rgba(215, 225, 238, 0.96);
    border-radius: 16px;
    font-size: 14px;
    line-height: 1.6;
    color: #23324f;
    background: rgba(248, 250, 255, 0.96);
    resize: none;
    outline: none;
}

.prompt-dialog-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

.prompt-dialog-input::placeholder {
    color: #9aa6b8;
}

.prompt-dialog-actions {
    display: flex;
    gap: 12px;
    margin-top: 18px;
}

.prompt-dialog-btn {
    flex: 1;
    height: 44px;
    border: none;
    border-radius: 14px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.prompt-dialog-btn.secondary {
    color: #55657f;
    background: linear-gradient(180deg, #ffffff 0%, #f4f7fb 100%);
    border: 1px solid rgba(216, 226, 238, 0.92);
}

.prompt-dialog-btn.primary {
    color: #ffffff;
    background: var(--primary-gradient);
    box-shadow: 0 12px 24px rgba(122, 153, 227, 0.24);
}

.prompt-dialog-btn:active {
    transform: scale(0.98);
}

.toast {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 12px 24px;
    border-radius: var(--radius-md);
    font-size: 14px;
    z-index: 2000;
    max-width: 80%;
    text-align: center;
    animation: fadeInOut 2s;
}

@keyframes fadeInOut {
    0%, 100% { opacity: 0; }
    10%, 90% { opacity: 1; }
}
