/* =========【基本樣式】========= */
body {
    font-family: Arial, sans-serif;
    padding: 30px;
    margin: 0;
    box-sizing: border-box;
    /*=========【背景圖】=========*/
    background-image: url('img/pokemon-bg.png');    /* bg圖片路徑 */
    background-repeat: repeat;
    background-size: 300px;                         /* 使用縮小背景圖像素大小 */
    background-position: top left;                  /* 從左上開始鋪 */
}

/* =========【按鈕區塊】========= */
.buttons {
    margin-bottom: 40px;
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
}

/* =========【按鈕樣式設定】========= */
.buttons button {
    padding: 15px 30px;
    font-size: 18px;
    border-radius: 30px;
    background-color: #D7D7D7;
    color: #000000;
    cursor: pointer;
    border: none;
    transition: background-color 0.3s, color 0.3s;
}

/* =========【按鈕懸停時的樣式】========= */
.buttons button:hover {
    background-color: #0EB087;
    color: white;
}


/* =========【✅ 被選中時的樣式】========= */
.buttons button.active {
    background-color: #0EB087;
    color: white;
}

/* =========【圖片展示區】========= */
.gallery {
    display: grid;                          /* 使用 CSS Grid 進行排版 */
    grid-template-columns: repeat(5, 1fr);  /* 視窗最大時一行5張圖 */
    gap: 40px;                              /* 圖片格子間距為40px */
    justify-items: center;                  /* 讓每個格子內容(水平)置中 */
    align-items: center;                    /* 讓每個格子內容(垂直)置中 */
}


/* =========【圖片樣式 + 效果】========= */
.gallery img {
    background-color: white;                /* 白色背景讓圖片像卡片 */
    padding: 20px;                          /* 內距讓圖片有留白 */
    border-radius: 20px;                    /* 卡片圓角 */
    width: 100%;
    max-width: 300px;
    height: auto;
    object-fit: cover;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

/* =========【圖片懸停時的樣式】========= */
.gallery img:hover {
    transform: scale(1.2);
    box-shadow: none;
}

/* =========【隱藏圖片】========= */
.hidden {
    display: none;
}

/* =========【響應式】========= */
@media (max-width: 1200px) {
    .gallery {
        grid-template-columns: repeat(4, 1fr); /* 較大螢幕每行4張 */
        gap: 32px;
    }
}
@media (max-width: 900px) {
    .gallery {
        grid-template-columns: repeat(3, 1fr); /* 中等螢幕每行3張 */
        gap: 24px;
    }
}
@media (max-width: 600px) {
    .gallery {
        grid-template-columns: repeat(2, 1fr); /* 小螢幕每行2張 */
        gap: 16px;
    }
}
@media (max-width: 400px) {
    .gallery {
        grid-template-columns: 1fr; /* 超小螢幕每行1張 */
        gap: 10px;
    }
}
