/* ===== 仓库面板 - iOS 透明毛玻璃风格 ===== */

/* 遮罩层 - 极淡的遮罩，不遮挡背景内容 */
.warehouse-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 5000;
    background: rgba(0, 0, 0, 0.2);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

.warehouse-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* 面板主体 - iOS 毛玻璃效果 */
.warehouse-panel {
    position: fixed;
    left: 8px;
    right: 8px;
    bottom: 8px;
    z-index: 5001;
    max-height: 82vh;
    background: rgba(20, 20, 30, 0.55);
    backdrop-filter: blur(50px) saturate(1.6);
    -webkit-backdrop-filter: blur(50px) saturate(1.6);
    border-radius: 32px;
    border: 1px solid rgba(255, 255, 255, 0.10);
    box-shadow: 
        0 -4px 40px rgba(0, 0, 0, 0.35),
        0 8px 60px rgba(0, 0, 0, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
    transform: translateY(calc(100% + 24px));
    transition: transform 0.45s cubic-bezier(0.32, 0.72, 0, 1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.warehouse-panel.active {
    transform: translateY(0);
}

/* 面板顶部光晕 */
.warehouse-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.10), transparent);
    z-index: 2;
}

/* 面板内边框 */
.warehouse-panel::after {
    content: '';
    position: absolute;
    inset: 3px;
    border-radius: 29px;
    border: 1px solid rgba(255, 255, 255, 0.03);
    pointer-events: none;
    z-index: 2;
}

/* 底部安全区域 */
.warehouse-safe-area {
    display: block;
    height: env(safe-area-inset-bottom, 8px);
    flex-shrink: 0;
    position: relative;
    z-index: 1;
}

/* 顶部拖拽指示条 */
.warehouse-handle {
    width: 36px;
    height: 4px;
    background: rgba(255, 255, 255, 0.10);
    border-radius: 2px;
    margin: 10px auto 6px;
    flex-shrink: 0;
    position: relative;
    z-index: 1;
}

/* 标题栏 */
.warehouse-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 4px 20px 10px;
    flex-shrink: 0;
    position: relative;
    z-index: 1;
}

.warehouse-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 16px;
    right: 16px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.06), transparent);
    pointer-events: none;
}

.warehouse-title {
    font-size: 18px;
    font-weight: 700;
    color: #fff;
    letter-spacing: 0.3px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.warehouse-title::before {
    content: '🏠';
    font-size: 18px;
}

.warehouse-close {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.4);
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    outline: none;
    -webkit-tap-highlight-color: transparent;
}

.warehouse-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.warehouse-close:active {
    transform: scale(0.88);
}

/* 分类标签栏 */
.warehouse-tabs {
    display: flex;
    gap: 6px;
    padding: 4px 16px 10px;
    flex-shrink: 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    position: relative;
    z-index: 1;
}

.warehouse-tabs::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 16px;
    right: 16px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.05), transparent);
    pointer-events: none;
}

.warehouse-tabs::-webkit-scrollbar {
    height: 0;
}

.warehouse-tab {
    flex: 1;
    min-width: 0;
    padding: 10px 0;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 14px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.06) 0%, rgba(255, 255, 255, 0.01) 100%);
    color: rgba(255, 255, 255, 0.35);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    letter-spacing: 0.3px;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    box-shadow: 
        0 2px 8px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.06),
        inset 0 -1px 0 rgba(0, 0, 0, 0.1);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    outline: none;
    -webkit-tap-highlight-color: transparent;
}

.warehouse-tab::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.04) 0%, transparent 100%);
    border-radius: 14px 14px 0 0;
    pointer-events: none;
}

.warehouse-tab.active {
    color: #fff;
    background: linear-gradient(180deg, rgba(251, 191, 36, 0.2) 0%, rgba(251, 191, 36, 0.08) 100%);
    border-color: rgba(251, 191, 36, 0.15);
    box-shadow: 
        0 4px 16px rgba(251, 191, 36, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.12),
        inset 0 -1px 0 rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
}

.warehouse-tab:active {
    transform: scale(0.94);
    box-shadow: 
        0 1px 4px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

/* 内容区域 */
.warehouse-content {
    flex: 1;
    overflow-y: auto;
    padding: 2px 14px 20px;
    -webkit-overflow-scrolling: touch;
    position: relative;
    z-index: 1;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 0 0 32px 32px;
    margin: 0 4px 0 4px;
}

.warehouse-content::-webkit-scrollbar {
    width: 2px;
}

.warehouse-content::-webkit-scrollbar-track {
    background: transparent;
}

.warehouse-content::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.06);
    border-radius: 1px;
}

/* 物品网格 - 一行5个 */
.warehouse-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
    padding: 4px 0;
    position: relative;
}

/* 单个物品卡片 - iOS 毛玻璃风格 */
.warehouse-item {
    position: relative;
    aspect-ratio: 1;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.06);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.25s ease;
    overflow: hidden;
    box-shadow: 
        0 2px 12px rgba(0, 0, 0, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.06);
    outline: none;
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    user-select: none;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

/* 物品卡片顶部高光 */
.warehouse-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 45%;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.05) 0%, transparent 100%);
    border-radius: 18px 18px 0 0;
    pointer-events: none;
    z-index: 1;
}

/* 物品卡片底部阴影 */
.warehouse-item::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 30%;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.04) 0%, transparent 100%);
    border-radius: 0 0 18px 18px;
    pointer-events: none;
    z-index: 1;
}

.warehouse-item:active {
    transform: translateY(-2px);
    box-shadow: 
        0 8px 24px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.06);
    background: rgba(255, 255, 255, 0.07);
}

/* 物品图片 */
.warehouse-item-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    user-select: none;
    -webkit-user-drag: none;
    border-radius: 18px;
    position: relative;
    z-index: 2;
    transition: transform 0.2s ease;
}

.warehouse-item:active .warehouse-item-img {
    transform: scale(1.08);
}

/* 数量角标 - 右下角 */
.warehouse-item-badge {
    position: absolute;
    bottom: 4px;
    right: 4px;
    min-width: 20px;
    height: 20px;
    padding: 0 5px;
    background: rgba(251, 191, 36, 0.85);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 800;
    color: #1a1a2e;
    letter-spacing: 0.2px;
    box-shadow: 0 2px 8px rgba(251, 191, 36, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.2);
    z-index: 3;
    line-height: 1;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

/* 物品名称标签 */
.warehouse-item-name {
    position: absolute;
    bottom: 24px;
    left: 2px;
    right: 2px;
    text-align: center;
    font-size: 8px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.35);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    z-index: 2;
    pointer-events: none;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
}

/* 空状态 */
.warehouse-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 50px 20px;
    gap: 12px;
}

.warehouse-empty-icon {
    font-size: 56px;
    opacity: 0.6;
    filter: grayscale(0.3);
    animation: whFloat 2s ease-in-out infinite;
}

@keyframes whFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

.warehouse-empty-text {
    font-size: 15px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.25);
    letter-spacing: 0.5px;
}

/* 加载状态 */
.warehouse-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 50px 20px;
}

.warehouse-loading-spinner {
    width: 36px;
    height: 36px;
    border: 3px solid rgba(255, 255, 255, 0.06);
    border-top-color: #fbbf24;
    border-right-color: rgba(251, 191, 36, 0.3);
    border-radius: 50%;
    animation: whSpin 0.7s linear infinite;
}

@keyframes whSpin {
    to { transform: rotate(360deg); }
}

/* ===== 物品卡片入场动画 ===== */

@keyframes whItemIn {
    0% {
        opacity: 0;
        transform: scale(0.6) translateY(12px);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.warehouse-item {
    animation: whItemIn 0.35s ease both;
}

/* ===== 稀有度边框效果 ===== */

/* 稀有 - 蓝色光晕 */
.warehouse-item--rare {
    border-color: rgba(96, 165, 250, 0.2);
    background: rgba(96, 165, 250, 0.04);
    box-shadow: 0 2px 12px rgba(96, 165, 250, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

/* 史诗 - 紫色光晕 */
.warehouse-item--epic {
    border-color: rgba(168, 85, 247, 0.25);
    background: rgba(168, 85, 247, 0.05);
    box-shadow: 0 2px 16px rgba(168, 85, 247, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

/* 传说 - 金色光晕 */
.warehouse-item--legendary {
    border-color: rgba(251, 191, 36, 0.3);
    background: rgba(251, 191, 36, 0.06);
    box-shadow: 0 2px 20px rgba(251, 191, 36, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

/* 传说物品的角标特殊样式 */
.warehouse-item--legendary .warehouse-item-badge {
    background: linear-gradient(135deg, #fbbf24, #f59e0b, #f97316);
    box-shadow: 0 2px 12px rgba(251, 191, 36, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

/* ===== 底部介绍框 - 半透明毛边 - 增强框架感 ===== */
.warehouse-info-bar {
    flex-shrink: 0;
    padding: 0 16px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s cubic-bezier(0.32, 0.72, 0, 1), padding 0.35s ease;
    background: rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    position: relative;
    z-index: 1;
    /* 底部圆角与面板一致 */
    border-radius: 0 0 28px 28px;
    margin: 0 4px;
}

/* 介绍框顶部高光分割线 */
.warehouse-info-bar::before {
    content: '';
    position: absolute;
    top: -1px;
    left: 10%;
    right: 10%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.06), transparent);
    pointer-events: none;
}

.warehouse-info-bar.active {
    max-height: 220px;
    padding: 14px 16px 16px;
}

.info-bar-content {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    position: relative;
    z-index: 1;
}

.info-bar-img {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    object-fit: cover;
    flex-shrink: 0;
    border: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(255, 255, 255, 0.03);
    margin-top: 2px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.info-bar-detail {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.info-bar-name {
    font-size: 16px;
    font-weight: 700;
    color: #fff;
    line-height: 1.3;
}

.info-bar-desc {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.info-bar-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.4);
    line-height: 1.5;
}

.info-bar-meta b {
    color: rgba(255, 255, 255, 0.75);
}

.info-bar-price b {
    color: #fbbf24;
    font-size: 14px;
}

/* 每行信息（单价/拥有/全部出售） - 增强对齐感 */
.info-bar-row {
    display: flex;
    align-items: center;
    gap: 4px;
    line-height: 1.6;
    padding: 1px 0;
}

.info-bar-label {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.4);
    flex-shrink: 0;
    min-width: 72px;
}

.info-bar-value {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
}

.info-bar-value b {
    font-size: 14px;
    color: #fbbf24;
}

.info-bar-sell-btn {
    flex-shrink: 0;
    padding: 12px 22px;
    border: none;
    border-radius: 14px;
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    color: #1a1a2e;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 16px rgba(251, 191, 36, 0.25);
    letter-spacing: 0.5px;
    align-self: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
    outline: none;
    -webkit-tap-highlight-color: transparent;
}


.info-bar-sell-btn:active {
    transform: scale(0.92);
    box-shadow: 0 2px 8px rgba(251, 191, 36, 0.15);
}


/* ===== 出售弹窗 ===== */
.sell-dialog-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 6000;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.sell-dialog-overlay.active {
    opacity: 1;
    visibility: visible;
}

.sell-dialog {
    width: 300px;
    background: rgba(10, 10, 18, 0.55);
    backdrop-filter: blur(50px) saturate(1.6);
    -webkit-backdrop-filter: blur(50px) saturate(1.6);
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 8px 48px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    padding: 24px 20px 20px;
    transform: scale(0.85) translateY(20px);
    transition: transform 0.35s cubic-bezier(0.32, 0.72, 0, 1);
}

.sell-dialog.active {
    transform: scale(1) translateY(0);
}

.sell-dialog-title {
    font-size: 18px;
    font-weight: 700;
    color: #fff;
    text-align: center;
    margin-bottom: 8px;
}

.sell-dialog-info {
    text-align: center;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.45);
    margin-bottom: 20px;
}

.sell-dialog-info b {
    color: rgba(255, 255, 255, 0.7);
}

.sell-dialog-slider-wrap {
    margin-bottom: 20px;
}

.sell-dialog-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.08);
    outline: none;
    margin-bottom: 12px;
}

.sell-dialog-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(251, 191, 36, 0.4);
    border: 2px solid rgba(255, 255, 255, 0.15);
    transition: transform 0.15s ease;
}

.sell-dialog-slider::-webkit-slider-thumb:active {
    transform: scale(1.15);
}

.sell-dialog-slider::-moz-range-thumb {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    cursor: pointer;
    border: 2px solid rgba(255, 255, 255, 0.15);
}

.sell-dialog-qty-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.sell-dialog-qty-label {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.45);
}

.sell-dialog-qty-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

.sell-qty-btn {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.04);
    color: #fff;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
    line-height: 1;
    outline: none;
    -webkit-tap-highlight-color: transparent;
}


.sell-qty-btn:active {
    transform: scale(0.85);
    background: rgba(251, 191, 36, 0.15);
    border-color: rgba(251, 191, 36, 0.3);
}

.sell-dialog-qty {
    font-size: 20px;
    font-weight: 700;
    color: #fbbf24;
    min-width: 36px;
    text-align: center;
}

.sell-dialog-total {
    text-align: center;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.5);
    padding: 8px 0;
}

.sell-dialog-total b {
    font-size: 18px;
    color: #fbbf24;
}

.sell-dialog-actions {
    display: flex;
    gap: 10px;
    margin-top: 16px;
}

.sell-dialog-btn {
    flex: 1;
    padding: 12px 0;
    border: none;
    border-radius: 14px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    letter-spacing: 0.3px;
    outline: none;
    -webkit-tap-highlight-color: transparent;
}

.sell-dialog-cancel {
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.sell-dialog-cancel:active {
    transform: scale(0.94);
    background: rgba(255, 255, 255, 0.08);
}

.sell-dialog-confirm {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    color: #1a1a2e;
    box-shadow: 0 4px 16px rgba(251, 191, 36, 0.25);
}

.sell-dialog-confirm:active {
    transform: scale(0.94);
    box-shadow: 0 2px 8px rgba(251, 191, 36, 0.15);
}


/* ===== 出售成功提示 - 半透明毛边 ===== */
.sell-toast {
    position: fixed;
    top: 60px;
    left: 50%;
    transform: translateX(-50%) translateY(-20px);
    z-index: 7000;
    padding: 14px 24px;
    background: rgba(10, 10, 18, 0.6);
    backdrop-filter: blur(40px) saturate(1.5);
    -webkit-backdrop-filter: blur(40px) saturate(1.5);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.08);
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.35s ease, transform 0.35s cubic-bezier(0.32, 0.72, 0, 1);
    pointer-events: none;
}

.sell-toast.active {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.sell-toast b {
    color: #fbbf24;
}

/* ===== 宠物启用按钮和状态样式 ===== */
.info-bar-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    width: 100%;
}

.info-bar-status-row {
    display: flex;
    align-items: center;
    gap: 6px;
}

.info-bar-status {
    font-size: 12px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 8px;
    letter-spacing: 0.3px;
}

.info-bar-status-active {
    color: #34d399;
    background: rgba(52, 211, 153, 0.1);
    border: 1px solid rgba(52, 211, 153, 0.15);
}

.info-bar-status-inactive {
    color: rgba(255, 255, 255, 0.4);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.info-bar-activate-btn {
    flex-shrink: 0;
    padding: 8px 18px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, #f472b6, #ec4899);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 16px rgba(244, 114, 182, 0.25);
    letter-spacing: 0.3px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    outline: none;
    -webkit-tap-highlight-color: transparent;
}

.info-bar-activate-btn:active {
    transform: scale(0.92);
    box-shadow: 0 2px 8px rgba(244, 114, 182, 0.15);
}

.info-bar-activate-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* 已启用状态的按钮 - 绿色主题 */
.info-bar-activate-btn[disabled] {
    background: linear-gradient(135deg, #34d399, #10b981);
    box-shadow: 0 4px 16px rgba(52, 211, 153, 0.2);
    opacity: 0.8;
}

/* ===== 土地道具"使用"按钮 ===== */
.info-bar-land-use-btn {
    flex-shrink: 0;
    padding: 10px 24px;
    border: none;
    border-radius: 14px;
    background: linear-gradient(135deg, #a855f7, #7c3aed);
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 20px rgba(168, 85, 247, 0.3);
    letter-spacing: 0.5px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    outline: none;
    -webkit-tap-highlight-color: transparent;
    width: 100%;
    text-align: center;
}

.info-bar-land-use-btn:active {
    transform: scale(0.94);
    box-shadow: 0 2px 10px rgba(168, 85, 247, 0.15);
}

/* ===== 土地选择弹窗 - 全屏毛玻璃 ===== */
.land-selector-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 6000;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.35s ease, visibility 0.35s ease;
    padding: 16px;
}

.land-selector-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* 弹窗主体 - 大尺寸毛玻璃卡片 */
.land-selector-dialog {
    width: 100%;
    max-width: 480px;
    max-height: 88vh;
    background: rgba(15, 15, 25, 0.65);
    backdrop-filter: blur(50px) saturate(1.6);
    -webkit-backdrop-filter: blur(50px) saturate(1.6);
    border-radius: 28px;
    border: 1px solid rgba(255, 255, 255, 0.10);
    box-shadow: 
        0 8px 60px rgba(0, 0, 0, 0.4),
        0 0 0 1px rgba(255, 255, 255, 0.03),
        inset 0 1px 0 rgba(255, 255, 255, 0.06);
    transform: scale(0.88) translateY(24px);
    transition: transform 0.4s cubic-bezier(0.32, 0.72, 0, 1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.land-selector-dialog.active {
    transform: scale(1) translateY(0);
}

/* 弹窗头部 */
.land-selector-header {
    position: relative;
    padding: 20px 20px 14px;
    text-align: center;
    flex-shrink: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.land-selector-title {
    font-size: 19px;
    font-weight: 700;
    color: #fff;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.land-selector-subtitle {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.45);
    font-weight: 500;
}

.land-selector-close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.4);
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    outline: none;
    -webkit-tap-highlight-color: transparent;
}

.land-selector-close:active {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    transform: scale(0.88);
}

/* 土地网格 - 4列 flex布局 */
.land-selector-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    padding: 20px 16px 16px;
    overflow-y: auto;
    flex: 1;
    -webkit-overflow-scrolling: touch;
    align-content: flex-start;
}

.land-selector-grid::-webkit-scrollbar {
    width: 2px;
}

.land-selector-grid::-webkit-scrollbar-track {
    background: transparent;
}

.land-selector-grid::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.06);
    border-radius: 1px;
}

/* 单个土地块 - 正方形 */
.land-selector-item {
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.04);
    border: 1.5px solid rgba(255, 255, 255, 0.06);
    cursor: pointer;
    transition: all 0.25s ease;
    overflow: hidden;
    position: relative;
    box-shadow: 
        0 2px 12px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.04);
    outline: none;
    -webkit-tap-highlight-color: transparent;
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 calc(25% - 10.5px);
}

/* 已启用的土地 - 高亮可点击 */
.land-selector-item--active {
    border-color: rgba(168, 85, 247, 0.25);
    background: rgba(168, 85, 247, 0.05);
    box-shadow: 
        0 2px 16px rgba(168, 85, 247, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.land-selector-item--active:active {
    transform: scale(0.92);
    border-color: rgba(168, 85, 247, 0.4);
    box-shadow: 0 4px 24px rgba(168, 85, 247, 0.2);
}

/* 未启用的土地 - 变暗不可点击 */
.land-selector-item--inactive {
    opacity: 0.4;
    cursor: not-allowed;
    border-color: rgba(255, 255, 255, 0.04);
    background: rgba(255, 255, 255, 0.02);
    filter: grayscale(0.6);
}

.land-selector-item--inactive:active {
    transform: none;
    box-shadow: none;
}

.land-selector-item-inner {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6px;
}

.land-selector-item-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    border-radius: 12px;
    user-select: none;
    -webkit-user-drag: none;
    background: rgba(0, 0, 0, 0.15);
}


/* 底部按钮区域 */
.land-selector-footer {
    flex-shrink: 0;
    padding: 8px 16px 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.land-selector-cancel-btn {
    width: 100%;
    padding: 12px 0;
    border: none;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.5);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    letter-spacing: 0.3px;
    outline: none;
    -webkit-tap-highlight-color: transparent;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.land-selector-cancel-btn:active {
    transform: scale(0.94);
    background: rgba(255, 255, 255, 0.1);
}
