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

body {
    background-image: url('/images/background/18.png');
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center center;
    font-family: 'Book Antiqua';
    padding: 12px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.container {
    max-width: 1500px;
    width: 100%;
}

.title {
    margin: 0;
    color: yellow;
    font-family: "Book Antiqua", "Yu Mincho";
    font-size: 40px;
    font-weight: normal;
    text-align: center;
}

/* 核心布局：使用 flex 换行，每行填满 */
.grid {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-content: flex-start;
    justify-content: flex-start;
}

/* 每个图片卡片 — 无圆角 */
.grid-item {
    overflow: hidden;
    background: blue;
    border: blue solid 1px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    transition: transform 0.2s ease, box-shadow 0.25s ease, z-index 0.2s;
    cursor: default;
    position: relative;
    line-height: 0;
    padding: 0;
    flex: 1 0 auto;
    min-width: 80px;
    max-width: 400px;
    border-radius: 0;
}

.grid-item:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    z-index: 10;
}

.grid-item img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    background-color: #eaeef3;
    margin: 0;
    padding: 0;
    border: none;
    user-select: none;
    -webkit-user-drag: none;
    -webkit-user-select: none;
    pointer-events: none;
}

/* 小屏适配 */
@media (max-width: 600px) {
    .grid {
        gap: 4px;
    }
    .grid-item {
        min-width: 60px;
        max-width: 300px;
    }
    body {
        padding: 6px;
    }
}

/* 工具栏 */
.toolbar {
    margin: 24px 0 18px;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    justify-content: center;
}

.counter {
    border: purple solid 1px;
    padding: 6px 18px;
    font-size: 0.9rem;
    color: yellow;
}

.row-height-control {
    display: flex;
    align-items: center;
    gap: 12px;
    border: purple solid 1px;
    padding: 6px 18px 6px 20px;
}

.row-height-control label {
    font-weight: 500;
    color: yellow;
    font-size: 0.9rem;
}

.row-height-control input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    width: 120px;
    height: 6px;
    background: #d0d7de;
    outline: none;
    cursor: pointer;
    border-radius: 0;
}

.row-height-control input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 13px;
    height: 13px;
    background: purple;
    cursor: pointer;
    border-radius: 0;
    margin-top: -3.5px;
}

.row-height-control input[type="range"]::-webkit-slider-runnable-track {
    height: 6px;
    border-radius: 0;
    background: transparent;
}

.row-height-control input[type="range"]::-moz-range-track {
    height: 6px;
    border-radius: 0;
    background: #d0d7de;
    border: none;
}

.row-height-control input[type="range"]::-moz-range-thumb {
    width: 13px;
    height: 13px;
    background: purple;
    cursor: pointer;
    border: none;
    border-radius: 0;
}

.row-height-control input[type="range"]::-moz-range-progress {
    height: 6px;
    background: purple;
    border-radius: 0;
}

.row-height-control .height-value {
    min-width: 36px;
    font-weight: normal;
    color: yellow;
}

footer {
    margin-top: 30px;
    color: yellow;
    font-size: 0.85rem;
    border-top: 1px solid #dee4ec;
    padding-top: 20px;
    width: 100%;
    text-align: center;
    letter-spacing: 0.3px;
}

/* ===== 顶部三张横幅图片 ===== */
.hero-trio {
    display: flex;
    flex-wrap: nowrap;
    gap: 6px;
    width: 100%;
    margin-bottom: 6px;
    align-items: stretch;
}

.hero-trio-item {
    flex: 1 1 0;
    min-width: 0;
    overflow: hidden;
    background: blue;
    border: blue solid 1px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    transition: transform 0.2s ease, box-shadow 0.25s ease, z-index 0.2s;
    cursor: default;
    position: relative;
    line-height: 0;
    padding: 0;
    border-radius: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-trio-item:hover {
    transform: scale(1.02);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    z-index: 10;
}

.hero-trio-item img {
    display: block;
    width: 100%;
    height: auto;
    object-fit: cover;
    background-color: #eaeef3;
    margin: 0;
    padding: 0;
    border: none;
    user-select: none;
    -webkit-user-drag: none;
    -webkit-user-select: none;
    pointer-events: none;
}

@media (max-width: 600px) {
    .hero-trio {
        gap: 4px;
        margin-bottom: 4px;
    }
}