/* farm_card.css */
/* 地图卡片作为定位父容器 */
.map-card {
    position: relative;
}

/* 悬浮卡牌按钮：相对于map-card左下角 */
.map-float-card-btn {
    position: absolute;
    left: 16px;
    bottom: 16px;
    z-index: 3000;
    padding: 10px 16px;
    font-size: 15px;
}

/* 弹窗：限定在地图容器内部，不再全屏fixed */
.card-modal-mask {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.65);
    z-index: 4000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 16px;
}
.card-modal-wrap {
    position: relative;
    background: var(--card);
    border-radius: 14px;
    padding: 20px;
    max-width: 700px;
    width: 100%;
    max-height: 80%;
    overflow-y: auto;
}
.card-close-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    border: none;
    background: var(--muted);
    color: #fff;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}
.card-close-btn:hover{
    background: var(--forest);
}
.card-menu-buttons{
    display: flex;
    gap: 16px;
    justify-content: center;
    padding: 20px 0;
}
.card-menu-buttons .btn{
    padding: 12px 24px;
    font-size: 16px;
}
.card-grid{
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px,1fr));
    gap: 14px;
    margin-top: 16px;
}
.card-item{
    border: 1px solid rgba(59,122,87,0.25);
    border-radius: 10px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-bottom: 8px;
}
.card-item img{
    width: 100%;
    display: block;
}
/* 卡牌名称文字样式 */
.card-item > div {
    text-align: center;
    margin-top:4px;
    font-size:13px;
    color:#222;
}
/* 数量统计文字 */
.card-count {
    text-align:center;
    color:var(--muted);
    margin-bottom:12px;
    font-size:14px;
}

/* 卡牌入口按钮：图标+文字｜绿色扁平，无边框，悬浮在地图（定位交给外层map-float-card-btn） */
.card-icon-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    padding: 8px 10px;
    min-width: 56px;
    min-height: 56px;
    background: #388e3c;
    border: none;
    border-radius: 14px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.22);
    color: #e8f5e9;
    font-weight: bold;
    font-size: 12px;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.card-icon-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 14px rgba(0, 0, 0, 0.28);
}

.card-icon-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.card-icon-btn svg {
    display: block;
}

.card-icon-btn span {
    line-height: 1;
    letter-spacing: 1px;
}



@media(max-width:600px){
    .card-menu-buttons{
        flex-direction: column;
    }
    .map-float-card-btn {
        left: 12px;
        bottom: 12px;
    }
}
