/* ===== 全局基础样式 ===== */
:root {
/*  --primary-bg: linear-gradient(to right, #1fddff, #ff4b1f);*/
  --primary-bg:#fff9f5;/*#ffedde;#f4f6f8*/
  --app-bg: #eee;
  --text-color: #222;
  --border-radius: 20px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: "PingFang SC", "Helvetica Neue", sans-serif;
  background: var(--primary-bg);
  color: var(--text-color);
  line-height: 1.5;
  margin: 10px;
}

/* ===== 链接样式优化 ===== */
a {
  color: inherit; /* 继承父元素文字颜色 */
  text-decoration: none; /* 移除下划线 */
  transition: color 0.2s ease, opacity 0.2s ease;
}


/* ===== 主应用容器 ===== */
#app {
  max-width: 768px;
  margin: 30px auto;
  background: var(--app-bg); 
  /*background: url("/assets/backgroundsvg.svg") no-repeat center / contain;*/
  /*box-shadow: 0 10px 20px rgba(236, 236, 236, 0.86);*/
  border-radius: var(--border-radius);

  font-size: 16px;
}



/* ===== 头部区域 ===== */
#site-header {
  padding: 20px;
  height: 158px;
  background: url("/photos/whale.webp") no-repeat 90% / contain;
  border-radius: 16px;

}

#site-footer {
  font-size: 14px;
  padding: 20px;
}

#site-name {
  font-size: 25px;
  font-weight: 500;
  margin-top: 13px;
  display: flex;
  align-items: center;
}

#site-desc {
  font-size: 14px;
  color: #aaa;
  margin-top: 4px;
  padding: 0;
}

/* ===== 标签导航 ===== */
/* 新增/修改的样式 */
.tab-list {
    position: relative; /* 为绝对定位的子元素提供参照 */
    display: flex;
    flex-direction: column;
    background: #f4f6f8;
    padding: 16px 16px;
    gap: 12px;
    /*box-shadow: 0 2px 0 rgba(255,255,255,0.2) inset,0 -1px 0 rgba(0,0,0,.2) inset;*/
}


/* 每行容器 */
.tab-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

/* 每个tab的style*/
.tab-item {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 35px;
    background: #fff;
    border-radius: 16px;
    font-size: 14px;
    gap: 2px;

}

.tab-item:hover {
    transform: scale(1.05); /* 悬停效果 */
    cursor: pointer;
}

/*新增按钮特别设置为绿色*/
.tab-item.add {
    padding: 0;
    background: #4299e1 !important; /* 使用原加号按钮的颜色 */
    color: white;
}

.tab-item::before {
  content: "";
  display: inline-block;
  width: 20px;
  height: 20px;
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
}

.add::before { background-image: url(../assets/add.svg); }
.zy::before { background-image: url(../assets/zy.svg); }
.gj::before { background-image: url(../assets/gj.svg); }
.ck::before { background-image: url(../assets/ck.svg); }
.lc::before { background-image: url(../assets/lc.svg); }
.sh::before { background-image: url(../assets/sh.svg); }
.gz::before { background-image: url(../assets/gz.svg); }
.xx::before { background-image: url(../assets/xx.svg); }

/* ===== 链接列表 ===== */
.app-list {
  display: flex;
  flex-wrap: wrap;
  background: #f4f6f8;
  padding: 12px;
  border-radius: 1px;
  margin-top: 30px;
  gap: 8px;
}

.item {
  width: calc(50% - 4px);
  display: flex;
  flex-direction: column;
  padding: 8px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.item:hover {
  transform: scale(1.05);
  opacity: 0.9;
}


/* 内容区域的链接样式 */
.item a {
  display: block; /* 使整个区域可点击 */
  width: 100%;
  color: var(--text-color);
    
}

.content-wrap {
  display: flex;
  align-items: center;
  background: #fff;
  padding: 14px 10px;
  border-radius: 17px;
  width: 100%;
}

.content-wrap:hover {
  background-color: #fff9f5;
}

.img-wrap {
  width: 24px;
  height: 24px;
  margin-right: 10px;
  flex-shrink: 0;
}

.img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 10px;
}

.app-name {
  font-size: 15px;
  font-weight: 500;
  word-break: break-word;
}

/* 添加分类控制相关样式 */
.app-list {
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.app-list.hidden {
    display: none;
    opacity: 0;
    transform: translateY(10px);
    height: 0;
    overflow: hidden;
    padding: 0;
    margin: 0;
}

/* ===== 模态框基础样式 ===== */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(3px);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.modal.show {
  display: flex; /* 添加这行 */
  opacity: 1;
}

.modal-content {
  background: #fff;
  width: 90%;
  max-width: 400px;
  padding: 20px 10px;
  border-radius: 12px;
  position: relative;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
  transform: translateY(20px);
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.modal.show .modal-content {
  transform: translateY(0);
}

.close {
  position: absolute;
  top: 15px;
  right: 20px;
  font-size: 28px;
  cursor: pointer;
  color: #aaa;
  transition: color 0.2s ease, transform 0.2s ease;
  line-height: 1;
  z-index: 10;
}

.close:hover {
  color: #e74c3c;
  transform: scale(1.1);
}

/* ===== 表单整体样式 ===== */
#myForm {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  color: #333;
  margin-top: 30px;
}

/* ===== 字段组样式 ===== */
#myForm fieldset {
  border: none;
  margin: 10px 0;
  padding: 10px;
  background-color: #f6f6f6;
  border-radius: 10px;
}

/* ===== 分类选择区域 ===== */
.set1 {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
  margin-bottom: 0;
}

.set1 legend {
  width: 100%;
  text-align: left;
  font-size: 1.1em;
  font-weight: 600;
  color: #2d3748;
  margin-bottom: 15px;
  position: relative;
}


.set1 label {
  position: relative;
  cursor: pointer;
  margin: 0;
}

.set1 input[type="radio"] {
  position: absolute;
  opacity: 0;
}

.set1 .radio-container {
  display: inline-block;
  padding: 8px 18px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 20px;
  color: #4a5568;
  transition: all 0.2s ease;
  font-size: 0.95em;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.set1 input[type="radio"]:checked + .radio-container {
  background: #4299e1;
  color: white;
  border-color: #4299e1;
  box-shadow: 0 2px 6px rgba(66, 153, 225, 0.3);
}

.set1 input[type="radio"]:focus + .radio-container {
  box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.3);
}

/* ===== 输入字段区域 ===== */
.set2 {
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 15px;
  align-items: center;
  background-color: #f6f6f6;
}

.set2 legend {
  grid-column: 1 / -1;
  font-size: 1.1em;
  font-weight: 600;
  color: #2d3748;
  margin-bottom: 10px;
  text-align: left;
  position: relative;
}


.set2 label {
  color: #4a5568;
  font-size: 0.95em;
  font-weight: 500;
}

.set2 input[type="text"],
.set2 textarea {
  padding: 12px 15px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  font-size: 0.95em;
  transition: all 0.2s ease;
  background: #f8fafc;
  width: 100%;
}

.set2 input[type="text"]:focus,
.set2 textarea:focus {
  outline: none;
  border-color: #4299e1;
  box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.2);
  background: white;
}

.set2 textarea {
  min-height: 40px;

}

/* ===== 提交按钮 ===== */
#myForm button[type="submit"] {
  display: block;
  width: 100%;
  padding: 14px;
  background: #4299e1;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 1em;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-top: 10px;
  box-shadow: 0 2px 4px rgba(66, 153, 225, 0.2);
}

#myForm button[type="submit"]:hover {
  background: #3182ce;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(66, 153, 225, 0.3);
}

#myForm button[type="submit"]:active {
  transform: translateY(0);
  box-shadow: 0 2px 4px rgba(66, 153, 225, 0.2);
}

/* ===== 响应式调整 ===== */
@media (max-width: 400px) {
  .modal-content {
    padding: 20px 15px;
    width: 90%;
  }
  
  .set2 {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  
  .set2 label {
    margin-top: 5px;
    margin-bottom: -5px;
  }
  
  .set1 {
    gap: 8px;
    padding: 10px;
  }
  
  .set1 .radio-container {
    padding: 6px 12px;
    font-size: 0.85em;
  }
  
  #myForm button[type="submit"] {
    padding: 12px;
  }
}