html {
    font-size: 14px;
    position: relative;
    min-height: 100%;
}

@media (min-width: 768px) {
    html {
        font-size: 16px;
    }
}

body {
    margin: 0;
    background-color: #d0d0d0;
    overflow-x: hidden;
}

/* 调整标签字体颜色一致性 */
label {
    color: white;
    font-weight: bold;
    font-size: 0.95rem;
}

/* 让 form-control / form-select 不挤压 */
input.form-control,
select.form-select {
    min-width: 100%;
    font-size: 1rem;
    padding: 0.4rem 0.6rem;
}

/* 自定义绿色背景 */
.bg-custom-green {
    background-color: #198754 !important;
}

/* 表单容器：自动换行并居中，适配小屏 */
.form-group-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    padding: 1rem;
}

/* 表单项：垂直排列，输入框自适应 */
.form-item {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
    max-width: 220px;
    min-width: 160px;
}

    .form-item label {
        font-weight: bold;
        margin-bottom: 4px;
        font-size: 0.9rem;
    }

    .form-item input,
    .form-item select {
        width: 100%;
        padding: 0.5rem;
        font-size: 1rem;
        border-radius: 4px;
        border: 1px solid #ccc;
    }

/* 游戏卡片：自动换行、最大宽度限制 */
.gameList {
    position: relative;
    display: inline-block;
    text-align: center;
    width: 100%;
    max-width: 256px;
    margin: 10px;
}

/* 图片自动适应 */
.gameList img {
    width: 100%;
    max-width: 256px;
    height: auto;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 8px;
    pointer-events: auto;
}

/* 蒙层在图片上居中显示按钮 */
.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    display: none;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    border-radius: 8px;
    z-index: 10;
    pointer-events: auto;
}

.overlay button {
    margin: 5px;
    padding: 8px 16px;
    font-size: 1rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

/* 按钮样式 */
.btn-enter {
    background-color: #4CAF50;
    color: white;
}

/* 顶部留出导航栏高度 */
.navbar-space {
    margin-top: 80px; /* 根据 navbar 实际高度来调整 */
}

/* 适配超小屏幕 */
@media (max-width: 576px) {
    .form-item {
        max-width: 100%;
    }

    .overlay button {
        width: 80%;
        font-size: 0.95rem;
    }

    .form-group-container {
        gap: 0.5rem;
        padding: 0.5rem;
    }
}
