
/* pahe页面 */
.page {
  position: absolute;
  top: 3.4375rem;
  left: 0;
  width: 100%;
  padding: var(--page-padding);
  height: calc(100vh - 8.75rem);
  overflow-y: auto;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--transition-duration) ease, visibility var(--transition-duration) ease;
}
.page.active {
  opacity: 1;
  visibility: visible;
}
.fade-in, .fade-out {
  animation-duration: var(--transition-duration);
  animation-fill-mode: forwards;
}
.fade-in {
  animation-name: fadeIn;
}
.fade-out {
  animation-name: fadeOut;
}
@keyframes fadeIn {
  from { 
    opacity: 0; 
    transform: translateY(var(--fade-transform-distance)); 
  } 
  to { 
    opacity: 1; 
    transform: translateY(0); 
  }
}
@keyframes fadeOut {
  from { 
    opacity: 1; 
    transform: translateY(0); 
  }
  to { 
    opacity: 0; 
    transform: translateY(var(--fade-transform-distance)); 
  }
}

/* ================== 分界线 ================== */

/* 头部内容 */
.tou { 
  width: 100%; 
  height: 3.125rem; 
  font-weight: bold;
  color: var(--font-color);
  padding: 0.625rem 1.25rem 0rem 1.25rem;
}
/* 设置按钮样式 */
.settings-button {
  position: absolute;
  top: 1rem; 
  right: 1.25rem; 
  background: none;
  border: none;
  transition: transform 0.3s;
}
.settings-button:active {
  transform: scale(0.5);
}
.settings-button img {
  width: 1.25rem;
  height: 1.25rem; 
  filter: var(--default-filter); 
}

/* ================== 分界线 ================== */

/* 首页样式 */
#home .color-card {
  position: relative;
  width: 100%;
  height: 9.375rem; 
  border-radius: 1.25rem; 
  margin-bottom: 35%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0.0625rem 0.0625rem rgba(0, 0, 0, 0.03); 
  color: #333;
  font-size: 0.8rem;
  font-weight: bold;
}
.slider-container {
  display: flex;
  flex-direction: column;
  gap: 0.9375rem; 
}

/* 对立色卡片 */
.complementary-colors-card {
  position: absolute;
  left: 0.625rem;
  bottom: 0.625rem; 
  padding: 0.125rem; 
  height: auto;
  border-radius: 0.625rem; 
  background-color: var(--background-color);
}
.complementary-colors-card .complementary-colors {
  display: flex;
  flex-wrap: wrap;
}
.complementary-colors-card .complementary-color-swatch {
  width: 0.9375rem;
  height: 0.9375rem; 
  margin: 0.125rem;
  border-radius: 50%;
  cursor: pointer;
  position: relative;
}
.complementary-colors-card .complementary-color-swatch p {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  width: 0;
  opacity: 0;
  overflow: hidden; 
  padding: 0.0625rem; 
  text-align: center;
  font-size: 0.625rem; 
}

/* ================== 分界线 ================== */

/* HEX输入框样式 */
.hex-input {
  position: absolute;
  left: 0;
  bottom: -4.375rem; 
  display: flex;
  align-items: center;
  justify-content: flex-start; 
  margin-bottom: 1.25rem;
  font-size: 0.9rem;
  font-weight: bold;
  color: #666;
  width: 90%;
  left: 50%;
  transform: translateX(-50%);
}
.hex-input span {
  font-size: 1rem;
  font-weight: bold;
}
#rgbValue {
  font-weight: bold;
}
.hex-input input {
  padding: 0.3125rem; 
  font-size: 0.9rem;
  border: none;
  border-radius: 0.25rem; 
  font-weight: bold;
  color: #666;
  width: 4.3rem;
  background-color: transparent;
}
.hex-input button {
  position: absolute;
  right: 0;
  width: 0.9375rem; 
  height: 0.9375rem; 
  border: none;
  background-size: cover;
  background-color: transparent;
  background-image: url("f1.svg");
  transition: transform 0.3s;
}
.hex-input button:nth-of-type(1) {
  right: 2.1875rem; 
  background-image: url("sj1.svg");
}
.hex-input button:nth-of-type(1):active {
  transform: rotate(360deg);
}
.hex-input button:nth-of-type(2):active {
  transform: scale(0.5);
}
#hexValue {
  width: 0;
  overflow: hidden;
}

/* ================== 分界线 ================== */

/* 滑块样式 */
.slider {
  display: flex;
  position: relative;
  align-items: center;
  min-width: 16.25rem; 
  padding-left: 1.25rem;
  margin-bottom: 1.25rem; 
  margin-left: 50%;
  transform: translate(-50%);
  font-weight: bold;
  color: #666;
}
.slider input[type="range"] {
  -webkit-appearance: none;
  appearance: none; 
  width: 100%;
  margin: 0 0.625rem; 
  background: transparent; 
  border-radius: 1.25rem; 
  opacity: 0.6;
}
.four { height: 0.625rem; }

.slider input[type="range"]::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 1.25rem; 
  height: 1.25rem; 
  background: rgba(76, 175, 80, 0.5);
  border-radius: 50%;
}
.slider input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none; 
  width: 1.25rem;
  height: 2.5rem; 
  background: transparent; 
  border-radius: 0.3125rem;
  margin-top: 0;
  cursor: pointer; 
}
.slider:nth-of-type(1) input[type="range"]::before {
  background-color: #FB6362;
}
.slider:nth-of-type(2) input[type="range"]::before {
  background-color: #62AF61;
}
.slider:nth-of-type(3) input[type="range"]::before {
  background-color: #6261FA;
}
.slider:nth-of-type(4) input[type="range"]::before {
  background: linear-gradient(to right, #bebebe 50%, #666 50%);
}

/* ================== 分界线 ================== */

/* 取色页样式 */
#picker .image-upload {
  text-align: center;
  margin-bottom: 1.2500rem;
}
.cardimg {
  width: 100%;
  margin-left: 50%;
  overflow: hidden;
  padding: 0.6250rem;
  background-color: var(--background-rgba);
  box-shadow: 0 0.0625rem 0.0625rem rgba(0, 0, 0, 0.03); 
  margin-bottom: 0.9375rem; 
  transform: translate(-50%);
}
.cardimg img {
  object-fit: contain;
  width: 100%;
  height: auto;
  max-height: 31.2500rem;
  filter: drop-shadow(0 0 0.0625rem rgba(0,0,0,.3));
}
.clicked-color-card-box {
  position: relative;
  width: 100%;
  height: 3.1250rem;
  display: flex; 
  justify-content: center;
  align-items: center;
  padding: 0 1.2500rem;
  margin-bottom: 1.866rem; 
}
.clicked-color-card {
  flex: 1; 
  height: 2.5000rem;
  cursor: pointer; 
  border-radius: 0.6250rem;
  border: 0.1875rem solid var(--border-color); 
}
.clicked-color-card .color-display {
  width: 100%;
  height: 100%;
  color: #ccc;
  font-size: 0.8rem;
  text-align: center;
  display: flex;
  border-radius: 0.4688rem; 
  justify-content: center; 
  align-items: center;
  background-color: #AFC1FF;
}
.clicked-color-card .color-display p {
  color: #ccc;
  font-size: 0.8rem;
  padding: 0.0938rem 0.6250rem 0.0625rem 0.6250rem; 
  border-radius: 0.0625rem; 
}
.clicked-color-card-box button {
  width: 1.8750rem;
  height: 1.8750rem; 
  border: none;
  color: #666;
  opacity: 0.8;
  font-size: 1rem;
  margin: 0 0.3125rem 0 0.6250rem;
  background-color: Transparent;
  filter: brightness(120%) saturate(70%) invert(31%) sepia(99%) saturate(2500%) hue-rotate(194deg) brightness(100%) contrast(90%);
}
.clicked-color-card-box button:nth-of-type(2) { 
  margin: -0.0938rem 0 0 0;
}
.clicked-color-card-box button img { 
  width: 100%; 
  height: 100%; 
}
.extracted-colors {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6250rem; 
  overflow: auto;
  padding: 0 1.8750rem 150% 1.8750rem; 
  height: calc(100% - 12.5000rem); 
}
.color-swatch {
  position: relative;
  flex: 1 1 calc(3.1250rem);
  height: 2.5000rem;
  margin: 0;
  overflow: hidden;
  border-radius: 0.3125rem; 
  border: 0 solid transparent; 
  box-shadow: 0 0.0625rem 0.0625rem rgba(0, 0, 0, 0.03); 
  transition: border 0.5s ease;
}

#picker { 
  overflow: hidden;  
  padding: 0.6250rem;
}
.color-swatch:hover {
  border: 0.3125rem solid rgba(0,255,0,0.5);
}
.color-swatch p {
  position: absolute;
  bottom: 0;
  color: #f5f5f5;
  font-size: 0.4rem; 
  font-weight: bold;
  width: 100%;
  padding: 0.125rem 0;
  text-align: center;
  background-color: rgba(255,255,255,0.5);
}

/* ================== 分界线 ================== */

/* 更多推荐色卡样式 */
#more .recommended-cards {
  display: flex;
  flex-wrap: wrap;
  width: 103.90625%; 
  gap: 0.625rem;
}
.recommended-card {
  position: relative;
  width: 100%;
  height: 11.5rem; 
  border-radius: 0.625rem; 
  background-color: var(--background-tjian);
  padding: 1.875rem 1.25rem; 
  margin: 0.5rem 0;
  box-shadow: 0 0.0625rem 0.0625rem rgba(0,0,0,0.03); 
  transform: scale(0.5);
  opacity: 0;
  transition: transform 0.3s ease, opacity 0.3s ease, box-shadow 0.5s ease;
}
.recommended-card::before {
  content: '';
  position: absolute;
  top: 0.5rem; 
  right: 1.25rem; 
  width: 2.5rem; 
  height: 0.9375rem; 
  opacity: 0.5;
  background-image: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI0MCIgaGVpZ2h0PSIxNSI+PGNpcmNsZSBjeD0iNSIgY3k9IjcuNSIgcj0iNSIgZmlsbD0icmVkIi8+PGNpcmNsZSBjeD0iMjAiIGN5PSI3LjUiIHI9IjUiIGZpbGw9ImdyZWVuIi8+PGNpcmNsZSBjeD0iMzUiIGN5PSI3LjUiIHI9IjUiIGZpbGw9ImJsdWUiLz48L3N2Zz4=');
}
.recommended-card:hover {
  box-shadow: rgba(0, 0, 0, 0.02) 0px 0.0625rem 0.1875rem 0px, rgba(0,204,255,0.15) 0px 0px 0px 0.125rem; 
}
.recommended-card:last-of-type {
  margin-bottom: 3.125rem; 
}
.recommended-card.visible {
  transform: scale(1);
  opacity: 1;
}
.recommended-card .swatches {
  display: flex;
  gap: 0.3125rem; 
  margin-bottom: 0.625rem; 
  padding: 0.625rem 0; 
  border-top: 0.125rem solid var(--border-top); 
  border-bottom: 0.125rem solid var(--border-top);
}
.recommended-card .swatches .swatch {
  flex: 1;
  height: 5.25rem; 
  border-radius: 0.625rem; 
  box-shadow: inset 0 0 0.3125rem rgba(255,255,255,0.5); 
  transition: flex 0.5s ease, border 0.5s ease;
}
.recommended-card .swatches .swatch:hover {
  flex: 5;
}
.recommended-card p {
  color: #666;
  width: 3rem;
  font-size: 1rem;
  font-weight: bold;
  border-bottom: 0.1875rem solid;
}
.recommended-card button {
  position: absolute;
  right: 1.25rem;
  bottom: 0.9375rem; 
  width: 1.125rem;
  height: 1.125rem; 
  border: none;
  background-color: transparent;
  background-size: 100% 100%;
  background-image: url("f1.svg");
  transition: transform 0.5s ease;
}
.recommended-card button:active {
  transform: scale(0.5);
}

/* 响应式处理 */
@media (max-width: 37.5rem) { 
  .recommended-card {
    width: calc(100% - 0.625rem); 
  }
}
@media (prefers-reduced-motion: no-preference) {
  .recommended-card {
    will-change: transform, opacity;
  }
}

/* ================== 分界线 ================== */

/* 侧边页样式 */
.sidebar {
  position: fixed;
  top: 0;
  right: -100%;
  width: 100%;
  height: 100%;
  opacity: 0;
  background-color: var(--background-color);
  background-image: linear-gradient(90deg,rgba(0,0,0,.05)  2%,transparent 0),linear-gradient(rgba(0,0,0,.05)     2%,transparent 0);
  background-size: 1rem 1rem;
  box-shadow: -0.125rem 0 0.3rem rgba(0, 0, 0, 0.1);
  transition: right 0.2s ease, opacity 0.2s ease;
  z-index: 1000;
  padding: 7rem 1.25rem 1.25rem 1.25rem; 
}
.sidebar.active {
  right: 0;
  opacity: 1;
}
.iconcard {
  position: relative;
  width: 100%;
  height: auto;
  margin-bottom: 10rem;
}
.exclamation {
  cursor: pointer;
  width: 100%;
  height: 100%;
  animation: pulse 3s infinite;
}
@keyframes pulse {
  0% { transform: rotate(0deg); }
  25% { transform: rotate(5deg); }
  50% { transform: rotate(0deg); }
  75% { transform: rotate(-5deg); }
  100% { transform: rotate(0deg); }
}
.exclamation img {
  width: 4.566rem;
  margin-left: 50%;
  margin-bottom: 1.5rem;
  transform: translate(-50%);
}
.iconcard h1 {
  color: var(--font-color);
  font-size: 2rem;
  font-weight: bold;
  text-align: center;
}

.sidebar .btnbox {
  position: relative;
  margin: 1rem auto;
  color: var(--font-color);
  width: 85%;
  height: 3.125rem; 
  font-size: 1rem; 
  display: flex;
  padding-left: 1.25rem; 
  align-items: center;
  border-radius: 0.625rem; 
  background-color: var(--background-tjian);
}
.btnbox .btn-ym {
  position: absolute;
  width: 1.2rem;
  height: 1.2rem;
  border: none;
  color: white;
  cursor: pointer;
  background-color: transparent;
  transition: filter 0.3s ease;
  right: calc(5rem - (var(--index, 0) * 2.1rem));
}
.btnbox .btn-ym.active {
  filter: var(--filter-style);
}
.btnbox .btn-ym:nth-child(1) {
  --index: 0;
}
.btnbox .btn-ym:nth-child(2) {
  --index: 2;
}
.btnbox .btn-ym:nth-child(3) {
  --index: 1;
}
.btnbox img {
  position:absolute;
  top: 0;
  left: 0;
  width: 100%; 
  height: 100%;
}

/* ================== 分界线 ================== */

/* 底部导航栏 */
.navbar {
  position: fixed;
  bottom: 1.25rem; 
  left: 50%;
  width: 80%;
  height: 3.125rem; 
  border-radius: 3.125rem; 
  transform: translateX(-50%);
  background-color: var(--background-dh);
  box-shadow: 0 0.0625rem 0.0625rem rgba(0, 0, 0, 0.03); 
  border-top: 0.0625rem solid var(--border-dh); 
  display: flex;
  justify-content: space-around;
  align-items: center;
}
.navbar button {
  background: none;
  border: none;
  font-size: 1rem;
  color: #666;
  cursor: pointer;
  font-weight: 300;
  width: 1.875rem; 
  height: 1.875rem; 
  background-color: transparent;
  background-size: 100% 100%;
  transition: transform 0.5s ease, filter 0.05s ease;
}
.navbar button.active {
  transform: scale(1.2);
  filter: brightness(120%) saturate(70%) invert(31%) sepia(99%) saturate(2500%) hue-rotate(194deg) brightness(100%) contrast(90%);
}
.navbar button:nth-of-type(1) {
  background-image: url("a1.svg");
}
.navbar button:nth-of-type(2) {
  background-image: url("a2.svg");
}
.navbar button:nth-of-type(3) {
  background-image: url("a3.svg");
}

/* 提示卡片样式 */
.popup {
  position: fixed;
  top: 5%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.8);
  background-color: var(--background-tjian);
  color: var(--font-color);
  width: auto;
  padding: 0.6025rem 1.1rem; 
  text-align: center;
  border-radius: 0.5rem;
  z-index: 1000;
  opacity: 0;
  animation-duration: 1s;box-shadow: 0 0 0.1rem rgba(0, 0, 0, 0.1);
}
.popup-show {
  animation-name: popup-fade-in;
  animation-fill-mode: forwards;
}
.popup-hide {
  animation-name: popup-fade-out;
  animation-fill-mode: forwards;
}
@keyframes popup-fade-in {
  from { opacity: 0; transform: translate(-50%, -50%) scale(0.8); }
  to { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}
@keyframes popup-fade-out {
  from { opacity: 1; transform: translate(-50%, -50%) scale(1); }
  to { opacity: 0; transform: translate(-50%, -50%) scale(0.8); }
}

/* ================== 分界线 ================== */

/* 模态弹窗提醒样式 */
#custom-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

#custom-modal .modal-container {
  position: relative;
  top: -10%;
  background-color: #fff;
  padding: 45px 20px 10px 20px;
  border-radius: 8px;
  text-align: center;
  width: 90%;
  height: 150px;
  box-shadow: 0 0px 5px rgba(0,0,0,0.1);
}
#custom-modal .modal-container::before {
  position: absolute;
  top: 10px;
  left: 15px;
  content: '检测异常 ! ! !'; 
  color: #555;
  font-size: 1rem;  
  font-weight: bold;
}
#custom-modal .modal-container p {
  margin: 15px 0;
  color: #F15654;
}
#custom-modal .modal-container button {
  position: absolute;
  right: 10px;
  bottom: 10px;
  width: 75px;
  height: 25px;
  padding: 1px 10px;
  background-color: Transparent;
  font-size: 0.8rem;
  color: #555;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  display: flex; 
  align-items: center;
  justify-content: left;
}
.modal-container p#countdown-text {
  position: absolute;
  right: 20px;
  bottom: -1px;
  color: #555;
  font-size: 0.8rem;
  z-index: 1;
}

/* ================== 分界线 ================== */

/* 弹窗提示 */
.modal {
  display: none;
  position:fixed;
  left: 50%;
  bottom: 20px;
  transform: translate(-50%) scale(0);
  background-color: var(--background-modal);
  border-radius: 20px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  padding: 20px;
  width: 90%;
  text-align: center;
  opacity: 0; 
  color: var(--font-color);
  transition: opacity 0.3s ease, transform 0.3s cubic-bezier(0.68, -0.55, 0.27, 1.55);
  z-index: 1001;
}
.modal.active {
  display: block;
  opacity: 1;
  transform: translate(-50%) scale(1);
}
.modal img {
  width: 80%;
  border-radius: 10px;
}
.modal h3 { margin:0px; }
.modal p {
  font-family: Arial, sans-serif; 
  font-size: 0.8rem;
  line-height: 1.5;
  margin: 0 0 10px 20px;
  text-align:center;
}
.modal span {
  display: block;
  width: 60px;
  height: 5px;
  margin: 0 50% 30px 50%;
  border-radius: 10px;
  background-color: rgba(0,0,0,.2);
  transform: translate(-50%, 0%);
}


i {
  position:fixed;
  left: 50%;
  bottom: 0.6250rem;
  font-size: 0.5rem;
  text-align:center;
  color: var(--font-color);
  transform: translate(-50%);
}



/* ========================== */
/* ====  =====  =====  ====== */
/* ====  =====  =====  ====== */
/* ====  =====  ============= */
/* ====  =====  =====  ====== */
/* ====         =====  ====== */
/* ====  =====  =====  ====== */
/* ====  =====  =====  ====== */
/* ====  =====  =====  ====== */
/* ====  =====  =====  ====== */
/* ========================== */







