:root {
  --main-warm1: #DCC9A9; /*more colorful: choose*/
  --main-cold1: #4E6851; /*more colorful: choose*/
  --gray-black: #4e4e4e;
  --light-green: #8e8f6d;
  --light-mint: #e8e5da;
}
html, body {
  margin: 0;
  padding: 0;
  font-family: 'Montserrat', sans-serif;
  height: 100%;
  width: 100%;
  display: flex;
  flex-direction: row;
  overflow: hidden;
}
.chinese-font {
  font-family: "ZCOOL XiaoWei", sans-serif;
}

.english-font {
  font-family: 'Montserrat', sans-serif;
}

.left-panel {
  flex: 0 0 55%;
  background: url('https://gallery.yitingli.xyz/smallgalleryBG.jpg') center/cover no-repeat;
  color: white;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;   /* 从上方开始布局 */
  align-items: flex-start; 
  padding: 20px 0 20px 5%;      /* left 20% */
  box-sizing: border-box;
  position: relative;
}

.left-panel .portfolio {
  color: #fff;
  margin-top: 20%;           
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.left-panel .portfolio h1 {
  font-size: 52px;
  font-weight: 700;
  color: var(--light-mint);
  text-shadow: 2px 2px 3px rgba(0, 0, 0, 0.5), 0 0 5px var(--gray-black);
  text-align: left;
  margin-bottom: 5px;
}

.left-panel .portfolio p {
  font-family: "ZCOOL XiaoWei", sans-serif;
  font-size: 28px;
  color: var(--light-mint);
  text-shadow: 2px 2px 3px rgba(0, 0, 0, 0.5), 0 0 2px var(--gray-black);
  text-align: left;
  margin-top: 5px;
}

.left-panel .buttons {
  /*position: absolute;
  bottom: 5%;
  left: 5%;
  display: flex;
  gap: 10px;*/
  margin-top: 15px;
}

.left-panel .buttons a,
.left-panel .buttons buttonGF,
#messageBtn {
  display: inline-block;
  padding: 0.5rem;
  /*background: rgba(0,0,0,0.6);*/
  background: transparent;
  color: var(--light-mint);
  text-decoration: none;
  border-radius: 5px;
  transition: transform 0.2s ease;
}
.left-panel .buttons a i,
.left-panel .buttons buttonGF i,
#messageBtn i {
  cursor: pointer;
  font-size: 1.2rem;
}
.left-panel .buttons a:hover,
.left-panel .buttons buttonGF:hover,
#messageBtn:hover {
  transform: scale(1.1);
}
.left-panel .buttons a:active,
.left-panel .buttons buttonGF:active,
#messageBtn:active {
  transform: scale(0.90);
}
/* right panel - gallery grid */
.right-panel {
  flex: 0 0 45%;
  background-color: var(--light-mint);
  overflow-y: auto;
  /*display: flex;*/
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 10px 15px 0;
  position: relative;
}
.tag-bar {
  position: relative; 
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  margin: 10px auto 2px auto;    

}
.tag-row {
  display: flex;
  gap: 10px;
}
.tag-row .tag {
  background-color: var(--light-green);
  color: var(--light-mint);
  font-size: 12px;
  padding: 6px 6px;
  border-radius: 8px;
  cursor: pointer;
  transition: transform 0.2s ease;
}
.tag-row .tag:hover {
  transform: scale(1.05);
}
.tag-row .tag:active {
  color: var(--gray-black);
  background-color: var(--light-mint); 
  transform: scale(0.95);
}
.tag-row .tag.active {
  color: var(--gray-black);
  background-color: var(--light-mint);
  font-weight: bold;
}
.gallery-grid {
  width: 85%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 35px;
  margin-top: 35px;
  margin-bottom: 40px;
}
.album-wrapper {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.album-image-container {
  position: relative;
  width: 100%;
  padding-top: 100%;
  overflow: hidden;
  border-radius: 15px; /*need to be the same as container img below */
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}
.album-image-container img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 15px;
  cursor: pointer;
  transition: transform 0.2s ease;
}
/* --------- adjust to container hover later!!!! ----------- */
/*.album-image-container img:hover {
  transform: scale(1.05);
}*/
.album-image-container:hover {
  transform: scale(1.02);
  transition: transform 0.2s ease;
}
/* ----------------------*/
.album-title {
  font-family: 'Montserrat', sans-serif; /* change to handwriting later */
  margin-top: 10px;
  margin-left: 10px;
  font-size: 0.8rem;
  text-align: left;
  color: var(--gray-black);
  font-weight: 400;
  width: 95%;
}
/* CSS for glowing NEW badge */
.new-badge {
  color: var(--light-green); /* Matching your green tone */
  font-family: 'Permanent Marker', cursive;
  padding-right: 0px;
  text-shadow: 0 0 5px rgba(212, 175, 55, 0.8), 0 0 10px rgba(255, 215, 0, 0.6);
  font-size: 0.8em; /* 80% of the album title */
}

.more-btn {
  margin: 20px 0;
  padding: 10px 20px;
  background-color: var(--light-green);
  color: var(--light-mint);
  border: none;
  border-radius: 10px;
  cursor: pointer;
  position: relative;
  z-index: 10;
  transition: background 0.3s, transform 0.2s;
}
.more-btn:hover {
  color: var(--light-green);
  background-color: var(--light-mint);
  transform: translateY(-2px);
}

.right-panel footer {
  position: relative;
  margin-top: 10px;
  font-size: 12px;
  color: #000;
  text-align: center;
  font-family: 'Montserrat', sans-serif;
  background: transparent;
  opacity: 0.75;
  padding: 5px 0;
}

/* Back button */
#backHomeBtn {  
  font-size: 16px;
  font-weight: 500; 
  padding: 5px 10px;                
  border-radius: 20px;              
  text-decoration: none;             
  background-color: transparent;
  color: var(--light-mint);
  border: 1.7px solid var(--light-mint);
  align-items: center;  
  display: flex;                   /* Enables gap between icons */
  gap: 10px;
  transition: border-color 0.3s ease, gap 0.3s ease; /* Smooth transition */

  position: fixed;                   
  bottom: 5%;
  left: 5%;
  /*transform: translateX(-50%);*/
  z-index: 500;
  cursor: pointer;
}
#backHomeBtn i {
  transition: transform 0.3s ease, color 0.3s ease;
}
#backHomeBtn:hover {
  transform: scale(1.1); /* UPDATED */
}

#backHomeBtn:active {
  transform: scale(0.90);
}

#lightbox {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #fff;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  z-index: 200;
}
#lightbox.show {
  display: flex;
}
#lightbox img {
  max-width: 90%;
  max-height: 85%;
}

.lightbox-controls {
  position: absolute; /* COMMENT: Fix position */
  bottom: 3%; /* Fixed 5% from bottom */
  width: 100%;
  justify-content: center;
  display: flex;
  gap: 10px 60px; /* row-gap column-gap */
  background-color: transparent;
  border: none;
}
.lightbox-controls button i {
  font-size: 1.5rem;
  background-color: transparent;
  color: var(--gray-black);
}

/* 2. lightbox: Close button with circle background */
.close-btn {
  color: var(--gray-black);
  font-size: 3rem; /* Size of the icon */
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  position: absolute;
  top: 4%;
  right: 8%;
}
/* lightbox: Info Button */
#info-button {
  position: absolute; /* COMMENT: Position it absolutely relative to #lightbox */
  bottom: 5.8%;        /* COMMENT: 6% from bottom of lightbox */
  right: 8%;         /* COMMENT: 10% from right side of lightbox */
  z-index: 230;       /* COMMENT: Ensure it appears above the image */
  background-color: transparent;
  border: none;
  border-radius: 50%;
  padding: 8px;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
}

#info-button i {
  pointer-events: none; /* COMMENT: Make the entire button clickable */
  font-size: 1.5rem;
  color: var(--gray-black);
}

#info-button:hover {
  transform: scale(1.1);
}

#info-button:active {
  transform: scale(0.9);
}

/* lightbox: Description Box */
#photo-desc-content {
  display: none;
  position: absolute;
  bottom: 10%;
  right: 3%;
  width: 250px;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  padding: 10px;
  border-radius: 8px;
  font-size: 0.8rem;
  text-align: left;
  line-height: 1.2rem;
  z-index: 230;                  /* COMMENT: Ensure above image */
}
/* Desc Box Spacing */
.photo-desc {
  margin-bottom: 1px; /* 1px gap from the info button */
}

#photo-desc-content.show {
  display: block;
}

/* right panel: scroll button */
#scrollTopBtn {
  display: none;
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 9999;
  background-color: var(--light-green);
  color: var(--light-mint);
  border: none;
  border-radius: 50%;
  padding: 10px 15px;
  font-size: 1.2rem;
  cursor: pointer;
}
#scrollTopBtn:hover {
  transform: scale(1.1);
}

#scrollTopBtn:active {
  transform: scale(0.9);
}

/* ---------------- vertical screen change layout ---------------- */
html.vertical-layout, body.vertical-layout {
  flex-direction: column; 
  overflow-y: auto;
}

.vertical-layout .left-panel,
.vertical-layout .right-panel {
  width: 100%;
  flex: none;
}

.vertical-layout .left-panel {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center; 
  position: relative; /* wont cover by other text */
  z-index: 10; /* font  */
}
/* vertical layout set to center */
.vertical-layout .left-panel .portfolio {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
}
.vertical-layout .left-panel .portfolio h1 {
  font-size: 3rem; 
}

.vertical-layout .left-panel .portfolio p {
  font-size: 2rem; 
}

.vertical-layout .left-panel .buttons {
  position: static; 
  margin-top: 10px;
  justify-content: center;
}


.vertical-layout .gallery-grid {
  grid-template-columns: 1fr 1fr; 
  gap: 30px;
  width: 100%;
  max-width: 90%;
  margin: 0 auto; 
}


.vertical-layout .tag-bar {
  position: static;
  margin: 10px auto 15px auto;
  display: flex;
  justify-content: center;
  gap: 10px;
}
.vertical-layout .tag-bar .tag{
  font-size: 10px;
}

.vertical-layout .right-panel {
  background-color: var(--light-mint);
  min-height: 100vh; 
  box-sizing: border-box;
  padding-bottom: 40px;
}

/* TAG 状态修复 */
.vertical-layout .tag-bar .tag.active:hover {
  background-color: var(--light-mint);
  color: var(--gray-black);
  transform: none; 
}

}
/* Scroll to top button */
.vertical-layout #scrollTopBtn {
  display: none;
  position: fixed;
  bottom: 20px;
  right: 20px;
  background-color: var(--light-green);
  color: var(--light-mint);
  border: none;
  border-radius: 50%;
  padding: 10px 15px;
  font-size: 1.2rem;
  cursor: pointer;
  z-index: 9999;
}

.vertical-layout #backHomeBtn{
  left: 50%;
  transform: translateX(-50%);
  margin-bottom: 10px;
  background-color: var(--light-green);
  color: var(--light-mint);
  border: none;
  font-size: 14px;
  opacity: 0.75;
}

.vertical-layout #backHomeBtn i{
  color: var(--light-mint);
}

.vertical-layout #scrollTopBtn{
  opacity: 0.7; /* COMMENT: Make button semi-transparent */
}

.vertical-layout .lightbox-controls {
  bottom: 5%; /* Fixed 5% from bottom */
}
.vertical-layout #info-button {
  bottom: 3.8%;        /* COMMENT: 6% from bottom of lightbox */
  right: 5%;         /* COMMENT: 10% from right side of lightbox */
}
.vertical-layout .close-btn {
  top: 3%;
  right: 6%;
}

 .vertical-layout .right-panel .footer {
    position: relative;
    margin-bottom: 0px;
    left: auto !important;
    right: auto !important;
    width: 100%;
    font-size: 8px;
    padding: 2px 0;
  }

/* specific for phone */
@media (max-width: 768px) {
  .vertical-layout .gallery-grid {
    grid-template-columns: 1fr;
    gap: 25px;
    margin-bottom: 50px;
  }
  .vertical-layout .left-panel .portfolio {
  align-items: center;   
  text-align: center;
  margin-top: 5%;       
}

.vertical-layout .left-panel .portfolio h1 {
  font-size: 20px;       
}

.vertical-layout .left-panel .portfolio p {
  font-size: 18px;       
}

.vertical-layout .left-panel {
  padding: 1rem;         
  align-items: center;   
}
.vertical-layout #backHomeBtn {
  bottom: 10px;
}
  
.vertical-layout .right-panel footer {
  margin-top: 20px;
  margin-bottm: 0;
}
}



