html,
body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  scroll-snap-type: y mandatory;
  scroll-behavior: smooth;
}

.nav-header {
  background-color: #ffffff;
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 80px;
  width: 100%;
  position: fixed;
  z-index: 999;
}

.menu-icon {
  display: none;
  font-size: 30px;
  cursor: pointer;
}

.logo {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-left: 3%;
  text-decoration: none;
  font-size: 22px;
  border: 2px solid #000000;
  border-radius: 50%;
  width: 60px;
  height: 60px;
  color: #000000;
}

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-right: 2%;
  gap: 20px;
}

.navbar a {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100px;
  height: 70%;
  font-size: 16px;
  text-decoration: none;
  border: 1px solid #000000;
  padding: 10px;
  border-radius: 30px;
  color: #000000;
  background-color: #ffffff;
  transition: 0.3s;
}

.navbar a:hover,
.navbar a.active {
  color: #ffffff;
  background-color: #000000;
}

.section {
  height: 100vh;
  width: 100%;
  scroll-snap-align: start;
  display: flex;
  justify-content: center;
  align-items: center;
}

.sameSet {
  height: 100%;
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

#home {
  background-color: #ffffff;
  color: #000000;
}
#aboutme {
  justify-content: center;
  align-items: center;
  flex-direction: row;
  background-color: #f5f5f5;
  color: #000000;
}
#sakuhin {
  background-color: #dddddd;
  color: #000000;
}
#irai {
  background-color: #f0f0f0;
  color: #000000;
  padding-top: 20px; /* 原本可能是 100px，改小一點 */
  padding-bottom: 20px;
}
#cyui {
  justify-content: center;
  align-items: center;
  flex-direction: row;
  background-color: #e5e5e5;
  color: #000000;
}
#last {
  height: 100%;
  width: 100%;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  flex-direction: column;
  background-color: #cccccc;
  color: #000000;
}

.usericon {
  width: 100%;
  height: 61.8%;
  background-color: #f5f5f5;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 250px;
}

.homeText {
  height: 38.2%;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 60px;
  background-color: transparent;
}

.about-left,
.about-right {
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.about-left {
  flex-direction: column;
}

.left-top,
.left-bottom {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.left-top {
  height: 61.8%;
  display: flex;
  flex-direction: column;
  justify-content: end;
  padding-bottom: 20px;
}

.left-bottom {
  padding-left: 35%;
  padding-bottom: 50px;
  height: 38.2%;
  display: flex;
  flex-direction: column;
  align-items: start;
  justify-content: start;
}

h1 {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.left-top h1 {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 30px 0 10px 0;
  font-size: 36px;
  text-align: center;
  width: 100%;
}

.left-top h2 {
  font-size: 30px;
  text-align: center;
  width: 100%;
  margin-top: 0px;
}

.twitter a {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: 60px;
  height: 60px;
  background: transparent;
  border: 2px solid black;
  border-radius: 50%;
  font-size: 40px;
  text-decoration: none;
  color: black;
  transition: 0.2s;
}

.twitter a:hover {
  background: #222222;
  color: #ffffff;
  box-shadow: 0 0 20px #222222;
}

.left-bottom h1 {
  font-size: 36px;
}

.left-bottom li {
  font-size: 30px;
}

.solid-line {
  width: 90%;
  border: none;
  border-top: 1px solid #000; /* 或改成你想要的顏色 */
  margin: 0; /* ✅ 取消預設間距 */
  padding: 0;
}

.cyui-left {
  width: 40%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cyui-right {
  width: 60%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: start;
  justify-content: center;
}

.cyui-bottom-list ul li,
.cyui-top-list ul li {
  text-decoration: none;
  padding: 10px;
  color: #000;
  font-size: 16px;
}

.cyui-bottom,
.cyui-top {
  padding-left: 0;
  padding-right: 5%;
  width: 100%;
}

.cyui-top {
  margin-top: 75px;
}

.cyui-bottom {
  margin-top: 20px;
}

.cyui-right h1 {
  margin-bottom: 0px;
  margin-top: 0px;
}

/* 容器 */
.cards-wrapper {
  display: flex;
  align-items: start;
  justify-content: center;
  height: 35%;
  gap: 40px;
  padding: 0;
  margin-bottom: 0;
  padding-top: 200px;
}

.card {
  width: 300px;
  height: 400px;
  background-color: #ddd;
  display: flex;
  flex-direction: column;
  justify-content: start;
  align-items: center;
  font-size: 24px;
  cursor: pointer;
  border-radius: 10px;
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
}

.card h3,
.card h4 {
  margin: 0;
}

.card h3 {
  padding-top: 20px;
  text-align: center;
}
.card h4 {
  padding: 0px;
}

.card-list {
  margin-top: 10px;
}

.card:hover {
  transform: translateY(-10px) scale(1.05) rotate(-5deg);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.3);
}
.card-list ul {
  padding: auto;
  margin: 0;
}

.card-list li {
  font-size: 16px;
  padding-left: 20px;
  padding-right: 20px;
  padding-bottom: 5px;
}

.card-detail-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  opacity: 0;
  transform: scale(0.9);
  pointer-events: none;
  display: flex; /* 改為一開始就是 flex */
  justify-content: center;
  align-items: center;
  z-index: 999;
  transition: all 0.3s ease;
}

.card-detail {
  width: 60%;
  height: 70%;
  background: white;
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  justify-content: start;
  align-items: center;
  transition: all 0.3s ease;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.2); /* ✅ 立體陰影 */
  transform: translateY(20px) scale(0.95); /* ✅ 初始偏移 + 縮小 */
}

.card-detail h3 {
  font-size: 40px;
  margin: 40px 0 0 0;
}

.card-detail h4 {
  font-size: 36px;
  padding: 0;
  margin: 0;
}

.card-detail .card-list {
  padding: 0 40px 0 40px;
}

.card-detail li {
  font-size: 22px;
  padding-bottom: 20px;
}

/* 顯示狀態 */
.card-detail-overlay.show {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}

.card-detail-overlay.show .card-detail {
  transform: translateY(0) scale(1); /* ✅ 漸漸浮起 */
  opacity: 1;
}

/* 補充區域 */
.bottom-info {
  height: 40%;
  width: 100%;
  display: flex;
  padding: 0;
  margin-bottom: 100px; /* 如果要稍微空一點也可以控制這裡 */
}

.payment-info,
.note-info {
  width: 50%;
  height: 100%;
  font-size: 18px;
  display: flex;
  justify-content: start;
  align-items: center;
  flex-direction: column;
  margin-top: 50px;
  margin-left: 30px;
  margin-right: 30px;
}
.payment-info h2,
.note-info h2 {
  padding: 0;
  margin-bottom: 0;
}

.payment-info ul,
.note-info ul {
  padding: 0 0 0 20px;
}

.last-div {
  display: flex;
  flex-direction: column;
  justify-content: center;
  flex-direction: column;
  align-items: center;
  width: 100%;
  height: 100%;
}

.last-top-box {
  display: flex;
  justify-content: end;
  flex-direction: column;
  align-items: center;
  width: 100%;
  height: 60%;
  padding-top: 100px;
}

.last-bottom-box {
  display: flex;
  justify-content: start;
  align-items: center;
  flex-direction: column;
  width: 100%;
  height: 40%;
}

.top-box-div {
  width: 100%;
  display: flex;
  flex-direction: column; /* 垂直排列內容 */
  justify-content: center;
  align-items: center;
  height: auto; /* ✅ 高度依內容自動延伸 */
}

.top-box-div ul {
  font-size: 20px;
}

.bottom-box-div {
  width: 100%;
  display: flex;
  flex-direction: column; /* 垂直排列內容 */
  justify-content: center;
  align-items: center;
  height: auto; /* ✅ 高度依內容自動延伸 */
  padding: 0px 10% 20px 10%; /* 可選：讓內容不會緊貼邊界 */
}

.bottom-box-div ul {
  font-size: 20px;
}

@media screen and (max-width: 800px) {
  * {
    box-sizing: border-box;
  }

  html,
  body {
    width: 100%;
    overflow-x: hidden;
  }

  .section,
  .sameSet {
    width: 100% !important;
    height: auto !important; /* ✅ 高度根據內容自動調整 */
    scroll-snap-align: none !important; /* ✅ 移除 snap 對齊效果 */
    display: flex;
    flex-direction: column; /* ✅ 手機端改為縱向排列 */
  }

  .nav-header {
    background-color: #ffffff;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
    width: 100%;
    position: fixed;
    z-index: 999;
  }

  .menu-icon {
    display: block;
    margin-right: 20px;
    font-size: 46px;
  }

  .navbar a {
    width: 100%;
    text-align: center;
    padding: 15px 0;
    border: none;
    transition: 0.3s;
    border-radius: 0px;
  }

  .navbar a:hover {
    background-color: black;
    color: white;
  }

  .navbar.show {
    display: flex;
  }

  .navbar {
    position: absolute;
    top: 80px;
    right: 0;
    width: 100%;
    background-color: #fff;
    flex-direction: column;
    align-items: center;
    display: none;
    gap: 0;
  }

  #home {
    padding-top: 80px;
    background-color: #f5f5f5;
  }

  .usericon {
    height: 100px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 100px;
  }

  .homeText {
    padding: 0 10px 0 10px ;
    height: 50px;
    font-size: 18px;
    border: 1px solid black;
    border-radius: 30px;
    background-color: #f5f5f5;
  }
  .homeText h3{
    margin: 0;
  }

  #aboutme {
    flex-direction: column;
  }

  .about-right {
    display: none;
  }

  .left-top {
    width: 100%;
    height: auto;
    padding: 0 5% 10% 5%;
    margin-bottom: 0%;
  }

  .left-top h1,
  .left-top h2 {
    font-size: 20px;
  }

  .left-bottom {
    padding: 0 10% 010% 10%;
  }

  .left-bottom h1 {
    font-size: 20px;
  }

  .left-bottom li {
    font-size: 20px;
    padding-bottom: 10px;
  }

  .left-bottom ul {
    margin: 0;
    padding: 0 0 0 20%;
  }

  .cards-wrapper {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
  }

  .bottom-info {
    display: flex;
    flex-direction: column;
  }

  .payment-info,
  .note-info {
    width: 100%;
    height: 50%;
    font-size: 14.5px;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    padding: 20px 10px 0 10px;
    margin: 0;
  }

  .cyui-top-list li,
  .payment-info li,
  .note-info li {
    padding-bottom: 5px;
  }

  .cyui-top h1,
  .cyui-bottom h1 {
    width: 100%;
    font-size: 21px;
    justify-content: center;
  }

  .cyui-bottom-list ul li,
  .cyui-top-list ul li {
    margin: 0;
    padding-bottom: 0 0 5px 0;
  }

  .sakuhin-div {
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    font-size: 50px;
    width: 100%;
    height: 800px;
  }

  .bikou-div {
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    font-size: 50px;
    width: 100%;
    height: 800px;
  }

  #cyui {
    flex-direction: column;
  }

  .cyui-left {
    width: 100%;
    height: 400px;
    text-align: center;
    background-color: pink;
  }

  .cyui-right {
    width: 100%;
    height: auto;
    padding: 0 20px 0 20px;
  }

  .bottom-box-div h1,
  .top-box-div h1 {
    font-size: 26px;
  }

  .bottom-box-div ul,
  .top-box-div ul {
    font-size: 17px;
  }

  .bottom-box-div,
  .top-box-div {
    padding: 0 20px 20px 20px;
  }

  .card-detail-overlay.show,
  .card-detail-overlay,
  .card-detail {
    display: none;
  }

  .card:hover {
    transform: rotate(0);
    box-shadow: none;
  }
}
