@import url('https://fonts.googleapis.com/css2?family=Chakra+Petch:wght@400;500;600;700&display=swap');

body {
    font-family: "Chakra Petch", sans-serif;
    background-color: #363636;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    overflow: hidden;
    color: #fff;
    image-rendering: pixelated;
    background-image: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('./../img/background.jpg');
    /* เปลี่ยน 'images/background.jpg' เป็น path ที่ถูกต้อง */
    background-size: cover;
    /* ขยายภาพให้เต็มจอ */
    background-position: center bottom;
    /* ตำแหน่งภาพตรงกลาง */
    background-repeat: no-repeat;
    /* ไม่ให้ภาพซ้ำ */
    background-attachment: fixed;
    /* ภาพติดพื้นหลัง ไม่เลื่อนตาม scroll */
}

.shop-window-container {
    background-color: #cacbce;
    border: 3px solid #000;
    border-top: 3px solid #6c6c6c;
    border-left: 3px solid #6c6c6c;
    border-right: 3px solid #1a1a1a;
    border-bottom: 3px solid #1a1a1a;
    border-radius: 5px;
    box-shadow: 0px 5px 15px rgba(0, 0, 0, 0.7);
    width: 700px;
    height: 550px;
    display: flex;
    flex-direction: column;
    padding: 10px;
    box-sizing: border-box;
}

.shop-header {
    background-color: #8e9098;
    border: 1px solid #000;
    border-top: 1px solid #4b4d55;
    border-left: 1px solid #4b4d55;
    border-right: 1px solid #4b4d55;
    border-bottom: 1px solid #4b4d55;
    padding: 8px 15px;
    display: flex;
    justify-content: flex-end;
    /* justify-content: space-between; */
    align-items: center;
    margin-bottom: 10px;
    position: relative;
    box-shadow: 0px 0px 0px 2px rgba(0, 0, 0, 0.4) inset;
    -webkit-box-shadow: 0px 0px 0px 2px rgba(0, 0, 0, 0.4) inset;
    -moz-box-shadow: 0px 0px 0px 2px rgba(0, 0, 0, 0.4) inset;
}

.shop-title {
    font-size: 1.5em;
    font-weight: 700;
    color: #ffffff;
    flex-grow: 1;
    text-align: center;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    text-shadow: 0px 0px 3px rgba(0, 0, 0, 1);
    -webkit-text-stroke: 0.6px rgba(0, 0, 0, 0.4);
}

.header-buttons {
    display: flex;
    gap: 5px;
    z-index: 1;
}

.header-btn {
    width: 25px;
    height: 25px;
    background-color: #c6c6c6;
    border: 1px solid #000;
    border-top: 1px solid #000;
    border-left: 1px solid #000;
    border-right: 1px solid #000;
    border-bottom: 1px solid #000;
    color: #3e3e3e;
    font-family: "Chakra Petch", sans-serif;
    font-weight: bold;
    font-size: 0.8em;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 1px 1px 0px 1px rgba(255, 255, 255, 0.4) inset;
    -webkit-box-shadow: 1px 1px 0px 1px rgba(255, 255, 255, 0.4) inset;
    -moz-box-shadow: 1px 1px 0px 1px rgba(255, 255, 255, 0.4) inset;
}

.header-btn:hover {
    background-color: #6bae46;
    /* 909090 */
}

.header-btn:active {
    background-color: #606060;
    border: 2px solid #363636;
    border-top: 2px solid #000;
    border-left: 2px solid #000;
    border-right: 2px solid #afafaf;
    border-bottom: 2px solid #afafaf;
}

.minimize-btn::before {
    content: '_';
    font-size: 1.2em;
    line-height: 0.5;
}

/* --- Shop Content (iFrame) --- */
.shop-content {
    display: flex;
    flex-grow: 1;
    background-color: #8e9098;
    border: 1px solid #000;
    border-top: 1px solid #4b4d55;
    border-left: 1px solid #4b4d55;
    border-right: 1px solid #4b4d55;
    border-bottom: 1px solid #4b4d55;
    padding: 2px;
    box-shadow: 0px 0px 0px 2px rgba(0, 0, 0, 0.4) inset;
    -webkit-box-shadow: 0px 0px 0px 2px rgba(0, 0, 0, 0.4) inset;
    -moz-box-shadow: 0px 0px 0px 2px rgba(0, 0, 0, 0.4) inset;
    position: relative;
}

/* สไตล์สำหรับ iframe */
iframe {
    width: 100%;
    height: 100%;
    border: none;
    background-color: #8e9098;
}


.shop-footer {
    background-color: #8e9098;
    border: 1px solid #000;
    border-top: 1px solid #4b4d55;
    border-left: 1px solid #4b4d55;
    border-right: 1px solid #4b4d55;
    border-bottom: 1px solid #4b4d55;
    padding: 10px 15px;
    margin-top: 10px;
    display: flex;
    justify-content: space-around;
    align-items: center;
    box-shadow: 0px 0px 0px 2px rgba(0, 0, 0, 0.4) inset;
    -webkit-box-shadow: 0px 0px 0px 2px rgba(0, 0, 0, 0.4) inset;
    -moz-box-shadow: 0px 0px 0px 2px rgba(0, 0, 0, 0.4) inset;
}

.shop-controls {
    display: flex;
    gap: 8px;
}

.control-btn {
    background-color: #7b7b7b;
    border: 2px solid #000;
    border-top: 2px solid #afafaf;
    border-left: 2px solid #afafaf;
    border-right: 2px solid #363636;
    border-bottom: 2px solid #363636;
    color: #fff;
    font-family: "Chakra Petch", sans-serif;
    font-weight: bold;
    font-size: 0.9em;
    padding: 8px 15px;
    cursor: pointer;
    text-shadow: 1px 1px #000;
    box-shadow: inset 0px 0px 3px rgba(0, 0, 0, 0.3);
    white-space: nowrap;
}

.control-btn:hover {
    background-color: #909090;
}

.control-btn:active {
    background-color: #606060;
    border: 2px solid #363636;
    border-top: 2px solid #000;
    border-left: 2px solid #000;
    border-right: 2px solid #afafaf;
    border-bottom: 2px solid #afafaf;
}

.player-footer {
    font-size: 0.9em;
    font-weight: 700;
    color: #fff;
    text-shadow: 1px 1px #000;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 5px;
    text-shadow: 0px 0px 3px rgba(0, 0, 0, 1);
    -webkit-text-stroke: 0.6px rgba(0, 0, 0, 0.4);
}

.player-footer a {
    color: #fff;
    text-decoration: none;
}


h1 .site-title {
    font-size: 34px;
    display: block;
    line-height: 1;
    color: #fff;
    text-align: center;
    margin-top: -30px;
}

h1 .site-description {
    font-size: 14px;
    display: block;
    line-height: 1;
    color: #fff;
    text-align: center;
    margin-top: 10px
}

@media (max-width: 768px) {
    .shop-title {
        font-size: 1.1em;
    }

    .shop-window-container {
        width: 95%;
        /* ให้กว้างเกือบเต็มหน้าจอ */
        height: 50vh;
        /* ให้สูง 90% ของความสูง viewport */
        padding: 8px;
        /* ลด padding */
        border-width: 2px;
        /* ลดขนาดขอบ */
    }

    .player-footer {
        font-size: 0.8em;
    }
}

@media (max-width: 480px) {
    .shop-window-container {
        width: 98%;
        /* ให้กว้างขึ้นอีกสำหรับจอที่เล็กมากๆ */
        height: 55vh;
        border-radius: 3px;
    }
}