body {
    margin: 0;
    padding: 0;
    overflow: hidden;
    background: #000;
}

#boot-loading {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    background: #090d14 url('../img/背景/加载背景.png') center center / cover no-repeat;
    transition: opacity 280ms ease;
}

html.skip-boot-loading #boot-loading {
    display: none;
}

#boot-loading.is-hidden {
    opacity: 0;
    pointer-events: none;
}

#boot-loading .boot-loading-panel {
    width: min(320px, calc(100vw - 32px));
    margin-bottom: 30vh;
    padding: 16px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(222, 231, 245, 0.95);
    box-sizing: border-box;
    font-family: "Microsoft YaHei", sans-serif;
}

#boot-loading .boot-loading-title {
    font-size: 16px;
    font-weight: 700;
    color: #294265;
}

#boot-loading .boot-loading-progress-track {
    margin-top: 10px;
    width: 100%;
    height: 10px;
    border-radius: 999px;
    background: #dce8f8;
    overflow: hidden;
}

#boot-loading .boot-loading-progress-fill {
    width: 0;
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, #3f8df0 0%, #66b6ff 100%);
    transition: width 120ms linear;
}

#boot-loading .boot-loading-progress-text {
    margin-top: 8px;
    font-size: 12px;
    color: #4c668b;
    text-align: right;
}

#left-top-panel {
    position: fixed;
    top: 12px;
    left: 12px;
    z-index: 20;
    width: 165px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

#level-ui {
    width: 100%;
    padding: 11px 11px 8px;
    border-radius: 13px;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid #dbe5f5;
    box-shadow: 0 8px 18px rgba(10, 19, 37, 0.18);
    font-family: "Microsoft YaHei", sans-serif;
    pointer-events: none;
    box-sizing: border-box;
}

#level-ui .level-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

#level-ui .level-title {
    font-size: 10px;
    color: #5f6f87;
    letter-spacing: 0.2px;
    cursor: pointer;
    pointer-events: auto;
    border: none;
    background: none;
    padding: 0;
    font-family: inherit;
    transition: color 120ms ease;
}

#level-ui .level-title:hover {
    color: #2c5ea8;
}

#level-ui .name-input {
    font-size: 10px;
    color: #2c5ea8;
    letter-spacing: 0.2px;
    border: 1px solid #5ea8ff;
    border-radius: 4px;
    padding: 1px 4px;
    width: 60px;
    outline: none;
    font-family: "Microsoft YaHei", sans-serif;
    background: #fff;
    pointer-events: auto;
}

#level-ui .level-pill {
    height: 19px;
    min-width: 66px;
    padding: 0 8px;
    border-radius: 10px;
    background: #eaf2ff;
    color: #2c5ea8;
    font-size: 11px;
    font-weight: 700;
    line-height: 19px;
    text-align: center;
    box-sizing: border-box;
}

#level-ui .exp-track {
    width: 100%;
    height: 10px;
    border-radius: 5px;
    background: #eef3fb;
    overflow: hidden;
}

#level-ui .exp-fill {
    width: 0;
    height: 100%;
    border-radius: 5px;
    background: #5ea8ff;
    transition: width 180ms ease-out;
}

#level-ui .exp-footer {
    margin-top: 6px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 10px;
}

#level-ui .exp-text {
    color: #495b75;
}

#level-ui .exp-percent {
    color: #2f7ee6;
}

#level-ui .max-level-text {
    display: none;
    margin-top: 5px;
    padding: 5px 6px;
    border-radius: 8px;
    background: #ecf9f0;
    color: #2e7d50;
    font-size: 9px;
    font-weight: 700;
    text-align: center;
}

#warehouse-card {
    width: 100%;
    padding: 8px 8px 6px;
    border-radius: 11px;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid #dbe5f5;
    box-shadow: 0 8px 18px rgba(10, 19, 37, 0.14);
    font-family: "Microsoft YaHei", sans-serif;
    box-sizing: border-box;
}

#warehouse-card .warehouse-toggle {
    width: 100%;
    height: 24px;
    border: none;
    border-radius: 8px;
    background: #eef4ff;
    color: #38567c;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 8px;
    font-size: 10px;
    font-weight: 700;
    cursor: pointer;
}

#warehouse-card .warehouse-arrow {
    font-size: 10px;
    line-height: 1;
    transition: transform 160ms ease;
}

#warehouse-card.collapsed .warehouse-arrow {
    transform: rotate(-90deg);
}

#warehouse-card .warehouse-list {
    margin-top: 6px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    overflow: hidden;
    max-height: 208px;
    opacity: 1;
    transition: max-height 220ms ease, opacity 180ms ease, margin-top 180ms ease;
}

#warehouse-card.collapsed .warehouse-list {
    max-height: 0;
    opacity: 0;
    margin-top: 0;
}

#warehouse-card .warehouse-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 10px;
    padding: 3px 5px;
    border-radius: 6px;
    background: #f6f9ff;
}

#warehouse-card .warehouse-name {
    color: #5f6f87;
}

#warehouse-card .warehouse-count {
    color: #235fab;
    font-weight: 700;
}

.quick-action-btn.daily-task-card {
    left: 183px;
    right: auto;
    top: 12px;
}

.daily-task-card .daily-task-label {
    font-size: 12px;
    color: #3b4f70;
    line-height: 1;
}

.daily-task-card .daily-task-progress {
    font-size: 12px;
    color: #205fac;
    font-weight: 700;
    line-height: 1;
}

.seed-item.stage-donate-card img {
    width: 30px;
    height: 30px;
}

#daily-task-modal {
    position: fixed;
    inset: 0;
    z-index: 41;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: "Microsoft YaHei", sans-serif;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 220ms ease;
}

#daily-task-modal.show {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

#daily-task-modal.closing {
    opacity: 0;
    visibility: visible;
    pointer-events: none;
}

#daily-task-modal .daily-task-modal-mask {
    position: absolute;
    inset: 0;
    background: rgba(11, 20, 35, 0.45);
}

#daily-task-modal .daily-task-modal-card {
    position: relative;
    width: min(320px, calc(100vw - 36px));
    border-radius: 18px;
    padding: 18px 16px 14px;
    box-sizing: border-box;
    background: #ffffff;
    border: 1px solid #dbe5f5;
    box-shadow: 0 14px 32px rgba(9, 20, 40, 0.28);
    opacity: 0;
    transform: translateY(12px) scale(0.98);
    transition: transform 220ms ease, opacity 220ms ease;
}

#daily-task-modal.show .daily-task-modal-card {
    opacity: 1;
    transform: translateY(0) scale(1);
}

#daily-task-modal .daily-task-modal-title {
    font-size: 17px;
    color: #233652;
    font-weight: 700;
    margin-bottom: 10px;
}

#daily-task-modal .daily-task-modal-text {
    font-size: 13px;
    color: #4d6180;
    line-height: 1.5;
}

#daily-task-modal .daily-task-modal-claim,
#daily-task-modal .daily-task-modal-close {
    margin-top: 12px;
    width: 100%;
    height: 38px;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
}

#daily-task-modal .daily-task-modal-claim {
    background: #2d78d5;
    color: #fff;
}

#daily-task-modal .daily-task-modal-claim:disabled {
    background: #bdc9da;
    color: #eef2f8;
    cursor: not-allowed;
}

#daily-task-modal .daily-task-modal-close {
    margin-top: 8px;
    background: #e8eef8;
    color: #466288;
}

#golden-exchange-modal {
    position: fixed;
    inset: 0;
    z-index: 41;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: "Microsoft YaHei", sans-serif;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 220ms ease;
}

#golden-exchange-modal.show {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

#golden-exchange-modal.closing {
    opacity: 0;
    visibility: visible;
    pointer-events: none;
}

#golden-exchange-modal .golden-exchange-mask {
    position: absolute;
    inset: 0;
    background: rgba(11, 20, 35, 0.45);
}

#golden-exchange-modal .golden-exchange-card {
    position: relative;
    width: min(320px, calc(100vw - 36px));
    border-radius: 18px;
    padding: 18px 16px 14px;
    box-sizing: border-box;
    background: #ffffff;
    border: 1px solid #dbe5f5;
    box-shadow: 0 14px 32px rgba(9, 20, 40, 0.28);
    opacity: 0;
    transform: translateY(12px) scale(0.98);
    transition: transform 220ms ease, opacity 220ms ease;
}

#golden-exchange-modal.show .golden-exchange-card {
    opacity: 1;
    transform: translateY(0) scale(1);
}

#golden-exchange-modal .golden-exchange-title {
    font-size: 17px;
    color: #233652;
    font-weight: 700;
    margin-bottom: 10px;
}

#golden-exchange-modal .golden-exchange-desc,
#golden-exchange-modal .golden-exchange-need {
    font-size: 13px;
    color: #4d6180;
    line-height: 1.5;
}

#golden-exchange-modal .golden-exchange-need {
    margin-top: 6px;
}

#golden-exchange-modal .golden-exchange-options {
    margin-top: 10px;
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
}

#golden-exchange-modal .golden-exchange-item {
    border: 1px solid #d9e5f8;
    border-radius: 12px;
    padding: 10px;
    background: #f9fbff;
}

#golden-exchange-modal .golden-exchange-item-title {
    color: #254064;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.2;
}

#golden-exchange-modal .golden-exchange-item-need {
    margin-top: 4px;
    color: #5f7392;
    font-size: 12px;
}

#golden-exchange-modal .golden-exchange-item-action {
    margin-top: 8px;
    width: 100%;
    height: 34px;
    border: none;
    border-radius: 8px;
    background: #2b78d6;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}

#golden-exchange-modal .golden-exchange-item-action:disabled {
    background: #b9c6d8;
    color: #eef3f9;
    cursor: not-allowed;
}

#golden-exchange-modal .golden-exchange-tip {
    min-height: 20px;
    margin-top: 8px;
    font-size: 12px;
    color: #9a3f3f;
}

#golden-exchange-modal .golden-exchange-tip.success {
    color: #247648;
}

#golden-exchange-modal .golden-exchange-close {
    margin-top: 12px;
    width: 100%;
    height: 38px;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
}

#golden-exchange-modal .golden-exchange-close {
    margin-top: 8px;
    background: #e8eef8;
    color: #466288;
}

#levelup-toast {
    position: fixed;
    left: 50%;
    top: 78px;
    transform: translate(-50%, -12px);
    z-index: 30;
    padding: 10px 16px;
    border-radius: 999px;
    background: rgba(27, 42, 69, 0.92);
    color: #ffffff;
    font-family: "Microsoft YaHei", sans-serif;
    font-size: 14px;
    font-weight: 700;
    box-shadow: 0 10px 22px rgba(9, 20, 40, 0.35);
    opacity: 0;
    transition: opacity 180ms ease, transform 180ms ease;
    pointer-events: none;
}

#levelup-toast.show {
    opacity: 1;
    transform: translate(-50%, 0);
}

#collect-modal {
    position: fixed;
    inset: 0;
    z-index: 40;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: "Microsoft YaHei", sans-serif;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 220ms ease;
}

#collect-modal.show {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

#collect-modal.closing {
    opacity: 0;
    visibility: visible;
    pointer-events: none;
}

#collect-modal .collect-modal-mask {
    position: absolute;
    inset: 0;
    background: rgba(11, 20, 35, 0.45);
}

#collect-modal .collect-modal-card {
    position: relative;
    width: min(320px, calc(100vw - 36px));
    max-height: calc(100vh - 48px);
    overflow-y: auto;
    border-radius: 18px;
    padding: 18px 16px 14px;
    box-sizing: border-box;
    background: #ffffff;
    border: 1px solid #dbe5f5;
    box-shadow: 0 14px 32px rgba(9, 20, 40, 0.28);
    opacity: 0;
    transform: translateY(12px) scale(0.98);
    transition: transform 220ms ease, opacity 220ms ease;
}

#collect-modal.show .collect-modal-card {
    opacity: 1;
    transform: translateY(0) scale(1);
}

#collect-modal .collect-modal-title {
    font-size: 17px;
    color: #233652;
    font-weight: 700;
    margin-bottom: 12px;
}

#collect-modal .collect-stat-card {
    border-radius: 14px;
    background: linear-gradient(135deg, #eef5ff, #f7fbff);
    border: 1px solid #d9e6fb;
    padding: 14px;
}

#collect-modal .collect-stat-label {
    font-size: 13px;
    color: #5a6f8f;
    margin-bottom: 6px;
}

#collect-modal .collect-stat-value {
    font-size: 30px;
    line-height: 1.1;
    color: #1f67c0;
    font-weight: 800;
}

#collect-modal .collect-detail-list {
    margin-top: 10px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

#collect-modal .collect-detail-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 10px;
    padding: 6px 8px;
    background: #f7faff;
    border: 1px solid #e4ecf8;
    font-size: 12px;
}

#collect-modal .collect-detail-name {
    color: #5a6f8f;
}

#collect-modal .collect-detail-count {
    color: #215ea9;
    font-weight: 700;
}

#collect-modal .trade-title {
    margin-top: 12px;
    margin-bottom: 8px;
    font-size: 14px;
    color: #324b70;
    font-weight: 700;
}

#collect-modal .trade-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

#collect-modal .trade-item {
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid #d9e5f8;
    border-radius: 12px;
    padding: 8px;
    background: #f9fbff;
}

#collect-modal .trade-icon {
    width: 42px;
    height: 42px;
    object-fit: contain;
    flex-shrink: 0;
}

#collect-modal .trade-meta {
    flex: 1;
    min-width: 0;
}

#collect-modal .trade-name {
    color: #254064;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.2;
}

#collect-modal .trade-desc,
#collect-modal .trade-owned {
    margin-top: 2px;
    color: #5f7392;
    font-size: 12px;
}

#collect-modal .trade-action {
    height: 30px;
    min-width: 56px;
    border: none;
    border-radius: 8px;
    background: #2b78d6;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}

#collect-modal .trade-action:active {
    transform: translateY(1px);
}

#collect-modal .trade-action:disabled {
    background: #b9c6d8;
    color: #eef3f9;
    cursor: not-allowed;
}

#collect-modal .trade-tip {
    min-height: 20px;
    margin-top: 8px;
    color: #9a3f3f;
    font-size: 12px;
    line-height: 1.4;
}

#collect-modal .trade-tip.success {
    color: #247648;
}

#collect-modal .collect-close-btn {
    margin-top: 14px;
    width: 100%;
    height: 38px;
    border: none;
    border-radius: 10px;
    background: #1f67c0;
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
}

#collect-modal .collect-close-btn:active {
    transform: translateY(1px);
}

#seed-toolbar {
    position: fixed;
    left: 50%;
    bottom: 14px;
    transform: translateX(-50%);
    z-index: 25;
    display: flex;
    gap: 10px;
    padding: 8px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 10px 24px rgba(9, 20, 40, 0.2);
    border: 1px solid #dbe5f5;
}

.quick-action-btn {
    position: fixed;
    top: 58px;
    z-index: 26;
    width: 69px;
    padding: 6px 5px 6px;
    border: 1px solid #dbe5f5;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 8px 18px rgba(10, 19, 37, 0.18);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    font-family: "Microsoft YaHei", sans-serif;
    cursor: pointer;
}

.quick-action-left {
    right: 10px;
}

.quick-action-right {
    right: 10px;
    top: 144px;
}

.quick-action-plant {
    right: 10px;
    top: 230px;
}

.quick-action-harvest {
    right: 10px;
    top: 316px;
}

.quick-action-btn img {
    width: 22px;
    height: 22px;
    object-fit: contain;
}

.quick-action-label {
    font-size: 10px;
    color: #3b4f70;
    line-height: 1;
}

.quick-action-count {
    font-size: 10px;
    color: #205fac;
    font-weight: 700;
    line-height: 1;
}

.quick-action-btn:disabled {
    opacity: 0.52;
    cursor: not-allowed;
}

.seed-item {
    width: 66px;
    border: 1px solid #d7e2f4;
    border-radius: 12px;
    background: #f8fbff;
    padding: 6px 4px;
    text-align: center;
    cursor: pointer;
    user-select: none;
    transition: transform 120ms ease, border-color 120ms ease, background 120ms ease;
}

.seed-item img {
    width: 34px;
    height: 34px;
    object-fit: contain;
    display: block;
    margin: 0 auto 4px;
}

.seed-item .seed-name {
    font-size: 12px;
    color: #4e5f79;
    line-height: 1;
}

.seed-item .seed-sub {
    margin-top: 2px;
    font-size: 11px;
    color: #1f66bd;
    line-height: 1;
    font-weight: 700;
}

.seed-item.active {
    border-color: #5ea8ff;
    background: #e9f3ff;
    transform: translateY(-2px);
}

.seed-item.active .seed-name {
    color: #1f66bd;
    font-weight: 700;
}

@media (max-width: 420px) {
    #left-top-panel {
        width: 144px;
    }

    #level-ui {
        width: 144px;
        padding: 10px 10px 6px;
    }

    #warehouse-card {
        width: 144px;
        padding: 6px;
    }

    #level-ui .level-pill {
        min-width: 58px;
        font-size: 10px;
    }

    #seed-toolbar {
        gap: 8px;
        padding: 7px;
        bottom: 10px;
    }

    .quick-action-btn {
        width: 62px;
        top: 50px;
        padding: 6px 4px 5px;
    }

    .quick-action-left {
        right: 8px;
    }

    .quick-action-right {
        right: 8px;
        top: 128px;
    }

    .quick-action-plant {
        right: 8px;
        top: 206px;
    }

    .quick-action-harvest {
        right: 8px;
        top: 284px;
    }

    .quick-action-btn.daily-task-card {
        left: 162px;
        right: auto;
        top: 12px;
    }

    .seed-item {
        width: 60px;
    }
}

/* 帮助弹窗 */
#help-modal {
    position: fixed;
    inset: 0;
    z-index: 42;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: "Microsoft YaHei", sans-serif;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 220ms ease;
}

#help-modal.show {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

#help-modal.closing {
    opacity: 0;
    visibility: visible;
    pointer-events: none;
}

#help-modal .help-modal-mask {
    position: absolute;
    inset: 0;
    background: rgba(11, 20, 35, 0.45);
}

#help-modal .help-modal-card {
    position: relative;
    width: min(300px, calc(100vw - 36px));
    border-radius: 18px;
    padding: 18px 16px 14px;
    box-sizing: border-box;
    background: #ffffff;
    border: 1px solid #dbe5f5;
    box-shadow: 0 14px 32px rgba(9, 20, 40, 0.28);
    opacity: 0;
    transform: translateY(12px) scale(0.98);
    transition: transform 220ms ease, opacity 220ms ease;
}

#help-modal.show .help-modal-card {
    opacity: 1;
    transform: translateY(0) scale(1);
}

#help-modal .help-modal-title {
    font-size: 17px;
    color: #233652;
    font-weight: 700;
    margin-bottom: 14px;
}

#help-modal .help-modal-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

#help-modal .help-item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 12px;
    border: 1px solid #e4ecf8;
    border-radius: 12px;
    background: #f7faff;
    cursor: pointer;
    transition: background 150ms ease;
    font-family: "Microsoft YaHei", sans-serif;
}

#help-modal .help-item:hover {
    background: #eef4ff;
}

#help-modal .help-item:active {
    transform: scale(0.98);
}

#help-modal .help-item-icon {
    font-size: 20px;
    flex-shrink: 0;
}

#help-modal .help-item-text {
    font-size: 14px;
    color: #233652;
    font-weight: 600;
}

#help-modal .help-modal-close {
    margin-top: 14px;
    width: 100%;
    height: 38px;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    background: #e8eef8;
    color: #466288;
    font-family: "Microsoft YaHei", sans-serif;
}

/* 设备警告弹窗 */
#device-warning-modal {
    position: fixed;
    inset: 0;
    z-index: 9998;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: "Microsoft YaHei", sans-serif;
    opacity: 0;
    transition: opacity 220ms ease;
}

#device-warning-modal.show {
    opacity: 1;
}

#device-warning-modal.closing {
    opacity: 0;
}

#device-warning-modal .device-warning-mask {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
}

#device-warning-modal .device-warning-card {
    position: relative;
    width: min(320px, calc(100vw - 36px));
    border-radius: 20px;
    padding: 28px 24px 24px;
    box-sizing: border-box;
    background: #ffffff;
    box-shadow: 0 14px 40px rgba(0, 0, 0, 0.3);
    text-align: center;
    transform: scale(0.9);
    transition: transform 220ms ease;
}

#device-warning-modal.show .device-warning-card {
    transform: scale(1);
}

#device-warning-modal .device-warning-icon {
    font-size: 48px;
    color: #f5a623;
    margin-bottom: 12px;
    line-height: 1;
}

#device-warning-modal .device-warning-title {
    font-size: 20px;
    font-weight: 700;
    color: #233652;
    margin-bottom: 12px;
}

#device-warning-modal .device-warning-text {
    font-size: 14px;
    color: #5a7194;
    line-height: 1.6;
    margin-bottom: 20px;
}

#device-warning-modal .device-warning-btn {
    width: 100%;
    height: 44px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, #f5a623, #e89b1d);
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: transform 120ms ease;
}

#device-warning-modal .device-warning-btn:active {
    transform: scale(0.97);
}
