/* === 基本狀態（桌機與平板） ========================== */
.show-only-mobile {
  display: none !important; /* 預設先隱藏 */
}

.hide-on-mobile {
  display: block !important; /* 預設顯示；視情況可改 inline、flex 等 */
}

/* === 手機斷點：max-width 可依 UI/框架調整 ============== */
@media (max-width: 767.98px) {
  .show-only-mobile {
    display: block !important; /* 手機出現 */
  }
  .hide-on-mobile {
    display: none !important; /* 手機隱藏 */
  }
}

/* iPhone (including iPhone Pro Max) */
@media only screen and (min-width: 320px) and (max-width: 500px) {
  /* Styles for iPhone */

  .red-tag,
  .green-tag {
    left: 8px;
    bottom: 12px;
    font-size: 11px;
  }

  .probability_text {
    bottom: 16px;
    right: 7px;
    font-size: 11px;
  }

  .ichiban-nav {
    gap: 5px 0px;
  }

  .homepage-slider-area .swiper-button-next,
  .homepage-slider-area .swiper-button-prev {
    top: 50%;
  }

  .card .swiper-button-prev,
  .homepage-slider-area .swiper-button-prev {
    position: absolute;
    left: -10px;
  }

  .card .swiper-button-next,
  .homepage-slider-area .swiper-button-next {
    position: absolute;
    right: -10px;
  }

  .ichiban-prize-page .prize_box_wrapper {
    width: 48%;
    margin: 3% 1%;
  }

  .ichiban-prize-page {
    padding: 15px;
  }

  .card .search-area {
    max-width: 90%;
    margin: 0 auto;
    margin-right: auto;
    margin-left: auto;
  }

  /* Prize box */
  .prize_box {
    border: 1px solid #ccc;
    border-radius: 0.25rem;
    position: relative;
    overflow: hidden;
    display: block;
  }

  .prize_box .prize_box_inner {
    position: relative;
  }

  .prize_box .red-circle {
    width: 40px;
    height: 40px;
    background-color: #b23533;
    border-radius: 50%;
    display: flex;
    align-items: center;

    justify-content: center;
    line-height: 40px;
    font-size: 12px;
    left: 5px;
  }

  .prize_box .prize_box_footer {
    padding: 5px 8px;
  }

  .prize_box .draw-price {
    position: relative;
    right: -15px;
    text-align: right;
    display: inline-block;
    border-radius: 8px;
    padding: 5px 12px;
  }

  .prize_box .badge {
    left: -12px;
    padding: 5px 8px;
    margin-right: -20px;
  }

  .prize_box .prize-amount-text {
    font-size: 0.8rem;
    margin-left: 0px;
    margin-right: 0px;
  }

  .prize_box .number {
    font-size: 1rem;
    font-family: "Noto Sans TC", "PingFang TC", "微軟正黑體", sans-serif;
    font-weight: 900;
    letter-spacing: -1px;
  }

  .prize_box small {
    font-size: 0.7em;
  }

  .prize_box .caption {
    position: absolute;
    bottom: 0px;
    flex-direction: row;
    gap: 10px;
  }

  .prize_box .cover-image {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    aspect-ratio: 1 / 1;
  }

  .prize_box .cover-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    aspect-ratio: 1 / 1;
  }

  .prize_box .overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: linear-gradient(
      to top,
      rgba(0, 0, 0, 1) 0%,
      rgba(0, 0, 0, 0) 50%,
      rgba(0, 0, 0, 0) 100%
    );
  }

  .prize_box .title {
    font-size: 0.9rem;
    margin-top: 5px;
    margin-bottom: 5px;
  }

  .blog_article {
    flex-direction: column;
  }

  .blog_article .title {
    margin: 8px 0;
  }

  .prize-item {
    width: 100%;
    margin-right: 0;
    border: 0;
    box-shadow: none;
  }

  .draw_item {
    width: 31.2%;
    margin-right: 1%;
    margin-left: 1%;
    margin-bottom: -5px;
  }

  .draw_item .image-container .title {
    font-size: 0.8rem;
    padding: 3px 14px;
  }

  #drawItemsContainer {
    margin-top: 20px;
    padding-left: 12px;
  }

  .refresh-button {
  }

  .card .nav-link {
    color: #272570;
    font-size: 16px;
    font-weight: bold;
    border-radius: 50px;
    border: 1px solid #272570;
    padding: 5px 12px;
    margin-right: 8px;
    margin-bottom: 8px;
  }

  .prize-item-wrapper {
    flex-direction: column;
  }

  .prize-item .card-wrapper {
    display: flex;
    flex-direction: column;
  }

  .page-content-area {
    margin: 15px 5px;
  }

  .footer-links ul {
    flex-direction: column;
  }

  .footer-links ul li {
    flex-direction: column;
    border-right: 0;
    border-left: 2px solid #272570;
  }

  .ichiban-prize-page {
    padding: 10px 0px;
  }

  body {
    background-size: 100vw auto;
    background-position: 50% 0%;
  }

  .top-logo {
    margin-bottom: -40px;
  }

  .top-logo-wrapper {
    margin-top: 65px;
    margin-bottom: 20px;
  }

  .top-logo {
    display: inline-block;
    width: 180px;
  }

  .section-title {
    font-size: 32px;
    margin-top: 5px;
    background-size: 60%;
  }

  #prize-cabinet {
    background-color: #d41b1b;
    display: block;
    width: 54px;
    height: 54px;
    border-radius: 50px;
    padding-top: 5px;
    cursor: grab;
    position: fixed;
    top: 226px;
    right: 2vw;
    z-index: 1000;
  }

  #prize-cabinet h4 {
    color: #fff;
    text-align: center;
    font-size: 11px;
    position: relative;
    top: -4px;
  }

  #prize-cabinet .prize-cabinet-icon {
    display: block;
    background-image: url("/app/assets/images/prize-cabinet-icon1.png");
    width: 28px;
    height: 28px;
    background-size: cover;
    margin: 0 auto 6px auto;
  }

  #prize-cabinet:hover {
    background-color: #ffe100;
  }

  #prize-cabinet:hover h4 {
    color: #27256f;
  }

  #prize-cabinet:hover .prize-cabinet-icon {
    background-image: url("/app/assets/images/prize-cabinet-icon2.png");
    width: 28px;
    height: 28px;
    background-size: cover;
    margin: 0 auto 6px auto;
  }

  .card .swiper-button-next,
  .card .swiper-button-prev,
  .homepage-slider-area .swiper-button-next,
  .homepage-slider-area .swiper-button-prev {
    width: 28px;
    height: 28px;
  }

  .swiper-button-next::after,
  .swiper-button-prev::after {
    font-size: 14px;
    position: relative;
    top: 2px;
  }

  .swiper-button-next::after {
    right: -1px;
  }

  .swiper-button-prev::after {
    left: -1px;
  }

  .ranking-message-box {
    background: #e6f6ff;
    padding: 15px 15px;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 12px;
  }

  .ranking-message {
    width: 100%;
  }

  .ranking-message.time {
    text-align: right;
    font-size: 12px;
  }
}

/* iPad (including iPad Pro) */
@media only screen and (min-width: 501px) and (max-width: 1024px) {
  /* Styles for iPad */
}

/* Overlapping range for larger iPhones and smaller iPads */
@media only screen and (min-width: 480px) and (max-width: 550px) {
  /* Styles for the overlapping range */
}

/* Responsive styles FOR spending rewards */
@media (max-width: 767.98px) {
  /* When screen size is less than 768px (like mobile phones) */

  body,
  .page-wrapper {
    width: 100vw;
    overflow-x: hidden;
  }

  /* Stack sidebar and main content */
  .sidebar {
    width: 100%;
    margin-bottom: 20px;
    padding: 0;
    background: transparent;
  }

  .sidebar a {
    font-size: medium;
    padding: 8px;
  }

  /* Adjust flex layout to stack the items vertically */
  .info-value-container {
  }

  .info-value-item {
    margin-right: 0;
    margin-bottom: 20px;
  }

  .info-box img {
    width: 80px; /* 手機版縮小圖片 */
    height: auto;
  }

  .value {
    font-size: 1.2em;
    color: red;
    position: relative;
    top: 1px;
    left: 2px;
  }

  .value-box {
    padding: 10px; /* 手機版縮小間距 */
  }

  .value-box h5 {
    font-size: 1em; /* 手機版縮小字體 */
  }

  .free-shipping-box {
    font-size: 1.2em; /* 手機版縮小字體 */
    margin-bottom: 35px;
  }

  .referral-section {
    flex-direction: column;
    gap: 15px;
  }

  /* 針對子選單在手機版的顯示 */
  .sidebar .submenu a {
    font-size: medium; /* 手機上減小字體 */
    padding: 8px;
  }

  /* 將側邊欄設為全寬顯示 */
  .sidebar {
    width: 100%;
    margin-bottom: 20px;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: space-between;
  }

  .sidebar a {
    width: auto;
    border-radius: 12px;
    font-size: 14px;
    height: 4em;
    overflow: hidden;
    flex-basis: 18%;
    align-content: center;
    align-self: center;
    min-width: 10px;
    display: flex;
    flex-direction: column;
    padding: 8px 0px;
    align-items: center;
  }

  .nav-button-icon {
    height: 25px;
    width: auto;
  }

  .deposit-btn {
    background: #27256f;
    border-radius: 50px;
    margin: 18px auto;
    width: 55%;
    color: #fff;
    font-size: 1.2em;
    padding: 7px 20px;
    text-align: center;
  }

  .deposit-btn img {
    height: 1.6em;
    width: auto;
  }

  .nav-button-text {
    font-size: 11px;
  }

  .product-title {
    font-size: 18px;
    margin-top: 35px;
    margin-bottom: -5px;
  }

  .deposit-option-card {
    padding: 10px;
  }

  .reward-item {
    flex-direction: column;
    text-align: center;
    padding-bottom: 3em;
    border-bottom: 2px solid #ccc;
  }

  .reward-item img {
    margin-bottom: 10px;
  }

  .reward-item .btn {
    width: 100%;
  }
  .reward-info {
    padding-right: 0;
  }
  .left-top-box,
  .center-top-box,
  .right-top-box {
    border-radius: 20px 20px 0px 0px;
  }
  .content-area {
    padding: 0px 15px;
  }
  .search-btn {
    margin: 10px 0;
    width: 100%;
  }
  .card {
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
    background-color: #fff;
  }

  .card-title {
    font-size: 1.2em;
    color: #333;
  }

  .card-text {
    margin-bottom: 10px;
  }
  .form-group.row-flex {
    flex-direction: column;
    align-items: flex-start; /* 在小螢幕上按鈕換行顯示 */
  }

  .resend-btn {
    width: 100%; /* 在小螢幕上按鈕寬度為100% */
    margin-top: 10px;
  }

  .verification-status {
    margin-top: 10px; /* 在小螢幕上給狀態文字一點間距 */
  }

  .free-shipping-box {
    background-image: url("/app/assets/images/free-shipping-icon.png");
    background-size: contain;
    background-repeat: no-repeat;
    background-color: #fff;
    text-align: center;
    padding: 10px 5px 12px 60px;
  }

  .product-container {
  }

  .product-title {
    margin-top: 60px;
    margin-bottom: -10px;
  }

  .yellow-bottom-border {
    margin-top: 1rem;
    padding-top: 1rem;
    margin-bottom: -1rem;
    border-bottom: 2px solid #fee100;
  }

  .cabinet-table .row-entry > .row {
  }

  .cabinet-table .table-cell {
    align-items: center;
    text-wrap: balance;
    word-wrap: anywhere;
    font-size: 13px;
  }

  .cabinet-table .select-all-label {
    display: none;
  }

  .cabinet-table .image-thumbnail {
  }

  .cabinet-table thead th {
  }

  .cabinet-table tbody tr {
  }

  .cabinet-table .the-row-th-1 {
    max-width: 2em;
  }

  .cabinet-table .the-row-th-2 {
    max-width: 100px;
  }

  .cabinet-table .the-row-th-3 {
  }

  .cabinet-table .the-row-th-4 {
  }

  .cabinet-table .the-row-th-5 {
    max-width: 3em;
    text-align: right;
  }

  .cabinet-table .the-row-tb-1 {
    max-width: 2em;
  }

  .cabinet-table .the-row-tb-2 {
    max-width: 100px;
  }

  .cabinet-table .the-row-tb-3 {
  }

  .cabinet-table .the-row-tb-4 {
  }

  .cabinet-table .the-row-tb-5 {
    max-width: 3em;
    text-align: right;
  }

  .cabinet-table .bg-color1 {
    /*
  background-color: #e5f6fe;
  */
  }

  .cabinet-table .bg-color2 {
    /*
  background-color: #e5f6fe;
  */
  }

  .cabinet-table .bg-color3 {
    /*
  background-color: #e5f6fe;
  */
  }

  .cabinet-table tbody tr:not(:last-child) {
  }

  .cabinet-table .table-cell {
  }
}
