* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    font-family: 'Noto Sans TC', Arial, sans-serif;
    color: #333;
    -webkit-font-smoothing: antialiased;
}

button {
    font-size: 20px;
    border-radius: 8px;
    padding: 0px 8px 0px 8px;
    font-family: 'Noto Sans TC', Arial, sans-serif;
}

.top {
    background: linear-gradient(135deg, #0a7ea8 0%, #12b5d8 50%, #0a9ec4 100%);
    color: white;
    text-align: center;
    padding: 5px;
    flex: 0 0 auto;
    position: fixed;
    top: 0;
    z-index: 1000;
    width: 100%;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
}

.middle .content {
    background-color: #ffffff;
    display: flex;
    flex: 1;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.middle {
    margin-top: 55px;
    flex: 1;
}

.bottom {
    background: linear-gradient(180deg, #2a2a2a 0%, #1a1a1a 100%);
    color: #ccc;
    text-align: center;
    padding: 1.5rem 1rem;
    flex: 0 0 auto;
    border-top: 3px solid #0a9ec4;
    font-size: 14px;
    letter-spacing: 0.3px;
}
.bottom a:link, .bottom a:visited {
    color: #9edcee;
    text-decoration: none;
}
.bottom a:hover {
    color: #fff;
}

a:link, a:visited {
    color: #FFFFFF;
    text-decoration: none;
}

.pageBox {
    display: inline-block;
    margin: 0 8px;
    font-size: 20px;
    color: #666;
    vertical-align: middle;
}

.breakLine {
    margin: 0 10px;
}

.paginateBox,
.paginateBox>div {
    display: inline-block;
    vertical-align: middle;
}

.paginate_button {
    width: 32px;
    height: 32px;
    margin: 0 4px;
    border-radius: 50%;
    border: 1px solid #c4c4c4;
    background-color: #fff;
    cursor: pointer;
}

.paginate_button.previous {
    background: #fff url(../../img/icon/icon_na_grey.png) no-repeat 48% center;
    background-size: 9px auto;
}

.paginate_button.next {
    background: #fff url(../../img/icon/icon_na_grey.png) no-repeat 48% center;
    background-size: 9px auto;
    transform: rotate(-180deg);
}

.paginate_button.previous.active {
    background: #fff url(../img/icon/icon_na_blue.png) no-repeat 50% center;
    background-size: 9px auto;
    border: 1px solid #1366E1;
    transform: rotate(-180deg);
}

.paginate_button.next.active {
    background: #fff url(../img/icon/icon_na_blue.png) no-repeat 50% center;
    background-size: 9px auto;
    border: 1px solid #1366E1;
    transform: rotate(0deg);
}

.paginate_button.disabled {
    cursor: not-allowed;
}

.sphoto {
    position: relative;
    padding: 4px;
}

#search {
    font-size: 20px;
    width: 105px;
    text-align: center;
}

#page_num {
    font-size: 20px;
    width: 50px;
    text-align: center;
}

#per_page {
    font-size: 20px;
    width: 40px;
    text-align: center;
}

#search_bar {
    font-size: 20px;
    margin: 3px 0px 3px 0px;
}

#search_btn {
    width: 60px;
    margin: 0px 3px 0px 3px;
}

#search_btn_x  #search_btn_empty {
    width: 120px;
    font-size: 20px;
    margin: 0px 3px 0px 3px;
}

.buy-button {
    position: absolute;
    bottom: 5px;
    left: 50%;
    transform: translateX(-50%);
    display: block;
    padding: 0px 0px;
    cursor: pointer;
}

.sphoto:hover .buy-button {
    display: block;
}

.buy-btn {
    width: 100px;
    font-size: 16px;
    border-radius: 10px;
    opacity: 0.85;
}

.hidden {
    display: none;
}

.t_img {
    border: 1px solid rgba(0,0,0,0.1);
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.t_img:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

#fullScreenView {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.85);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

#fullScreenView img {
    max-width: 100%;
    max-height: 100%;
    border: none;
    border-radius: 6px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
}

#fullScreenView li {
    text-align: center;
}

#fullScreenView ul {
    list-style-type: none;
}

#fullScreenView button {
    font-size: 20px;
}

#fullScreenView span {
    padding-left: 20px;
}

#closeBtn {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 40px;
    color: white;
    cursor: pointer;
}

.pay_btn {
    cursor: pointer;
    font-size: 32px;
    border-radius: 12px;
    padding: 5px;
}

#act_buy_btn, #act_close_btn, #act_search_time  {
    cursor: pointer;
    font-size: 24px;
    border-radius: 8px;
    margin: 5px;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

@keyframes pulse-badge {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.15); }
}

.blinking-text {
    animation: pulse-badge 2s ease-in-out infinite;
}

#howto_buy {
    position: fixed;
    right: 10px;
    bottom: 80px;
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 24px;
    border-radius: 8px;
    backdrop-filter: blur(4px);
}

.logo {
    margin-left: 5px;
}

#header_title {
    display: none;
}

@media (min-width: 481px) {
    #header_title {
        display: block;
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
        font-size: 26px;
        color: white;
        text-shadow: 0 1px 4px rgba(0,0,0,0.3);
        white-space: nowrap;
        max-width: 50%;
        overflow: hidden;
        text-overflow: ellipsis;
        line-height: 50px;
        pointer-events: none;
        font-weight: 500;
    }
    .activity-page #act_title {
        display: none;
    }
    .activity-page .middle {
        margin-top: 65px;
    }
}

.number-title {
    position: absolute;
    top: 5px;
    left: 10px;
    background-color: #ffff00;
    font-size: 16px;
    width: 90%;
}

.order-title {
    position: absolute;
    top: 20px;
    left: 10px;
    background-color: #00ff00;
    font-size: 16px;
    width: 20%;
}

.number-button {
    position: absolute;
    bottom: 0px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    padding: 8px 16px;
    cursor: pointer;
}

.number-btn {
    width: 65px;
    font-size: 16px;
    border-radius: 10px;
    z-index: 1;
}

.number-button2 {
    position: absolute;
    bottom: 30px;
    left: 0px;
    display: flex;
    justify-content: space-between;
    padding: 0px 0px 2px 5px;
    cursor: pointer;
}

.sphoto:hover .number-button {
    display: flex;
}

#act_title {
    font-size: 32px;
    text-shadow: 0 1px 3px rgba(0,0,0,0.15);
    margin: 10px 0px 10px 0px;
    font-weight: 600;
}

.detail-title {
    position: absolute;
    top: 0px;
    left: 0px;
    font-size: 12px;
    width: 5%;
}

.no_photo {
    font-size: 32px;
    margin: 10px 0px 10px 0px;
}

#order_notice {
    margin: 0px 10px 0px 0px;
}

.best-mark {
    position: absolute;
    top: 2px;
    left: 0px;
}

.top img {
    vertical-align: middle;
}

.lang-switch {
    font-size: 14px;
    font-weight: 500;
    color: #ffffff !important;
    background-color: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.4);
    border-radius: 6px;
    padding: 0 8px;
    margin-right: 4px;
    text-decoration: none !important;
    display: inline-flex;
    align-items: center;
    height: 32px;
    vertical-align: middle;
    box-sizing: border-box;
    transition: background-color 0.2s;
}
.lang-switch:hover {
    background-color: rgba(255,255,255,0.3);
}

@media (max-width: 480px) {
    .cart-text { display: none; }
}

@media (max-width: 768px) {
    .bottom {
        font-size: 12px;
        padding: 1rem;
    }
}
