/* 联系我们页面布局 */
.appicon {
  padding-top: 100px;
  padding-bottom: 80px;
}

.appicon_header {
  text-align: center;
  margin-bottom: 60px;
}

.appicon_header h1 {
  font-size: 2.5em;
  color: var(--dark-color);
  margin-bottom: 20px;
}

.appicon_header p {
  font-size: 1.2em;
  color: #636e72;
  max-width: 800px;
  margin: 5px auto;
}

/* 全局 */
/* Add your CSS styles here */
#rotation {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.modal_check {
  --slider-size: 42px;
  width: 330px;
  background: white;
  border-radius: 16px;
  padding: 20px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.modal_check .title {
  color: #464b52;
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 16px;
}

.modal_check .img-con {
  position: relative;
  overflow: hidden;
  pointer-events: none;
  user-select: none;
  width: 256px;
  height: 256px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  /* 垂直居中 */
  justify-content: center;
  /* 水平居中 */
}

.modal_check .img-con img {
  max-width: 100%;
  max-height: 100%;
  user-select: none;
}

.modal_check .slider-con {
  width: 80%;
  height: var(--slider-size);
  border-radius: 42px;
  margin-top: 1rem;
  position: relative;
  background: linear-gradient(to right, #8c9eff 0%, #8c9eff 50%, #8c9eff 100%);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  background-size: 0% 100%;
  background-repeat: no-repeat;
}

.slider-con .slider {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  box-shadow: 0 0 5px rgba(0, 0, 0, 0.2);
  cursor: move;
  --move: 0px;
  transform: translateX(var(--move));
  background: url("/statics/images/code.svg") no-repeat;
  background-size: cover;
}

.check-state {
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  color: white;
  position: absolute;
  top: 0;
  left: 0;
  display: flex;
  justify-content: center;
  align-items: center;
}

.slider-con.err-anim {
  animation: jitter 0.5s;
}

.slider-con.err-anim .slider {
  background: #ff4e4e;
}

@keyframes jitter {
  20% {
    transform: translateX(-5px);
  }

  40% {
    transform: translateX(10px);
  }

  60% {
    transform: translateX(-5px);
  }

  80% {
    transform: translateX(10px);
  }

  100% {
    transform: translateX(0);
  }
}

/* 模态框 */
/* 模态框背景 */
.modal_overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  user-select: none;
  transition: opacity 0.3s ease;
}

/* 显示时的模态框背景 */
.modal_overlay.show {
  opacity: 1;
  pointer-events: auto;
}

/* 模态框容器 */
.modal_container {
  background-color: white;
  border-radius: 20px;
  width: 90%;
  max-width: 500px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  transform: translateY(-20px);
  opacity: 0;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

/* 显示时的模态框容器 */
.modal_overlay.show .modal_container {
  transform: translateY(0);
  opacity: 1;
}

/* 模态框头部 */
.modal_header {
  padding: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: none;
}

.modal_title {
  margin: 0;
  font-size: 1.25rem;
  font-weight: bold;
}

.modal_close-btn {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: #6c757d;
}

/* 模态框内容 */
.modal_body {
  padding: 0 20px 20px;
}

.appicon_content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background: white;
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  padding: 20px;
}

.icon_upload {
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  justify-content: center;
  gap: 20px;
}

.upload-section {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 10px;
  flex: 1;
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2), 0 4px 8px rgba(0, 0, 0, 0.1);
}

.upload-box {
  border: 3px dashed #4b6cb7;
  border-radius: 10px;
  padding: 5px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s;
  position: relative;
  width: 100%; /* 占满父容器的宽度 */
  aspect-ratio: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  box-sizing: border-box; /* 包括内边距 */
}

.upload-box:hover {
  background: rgba(75, 108, 183, 0.05);
}

.upload-box p {
  color: gray;
}

.upload-icon {
  font-size: 3rem;
  color: #4b6cb7;
  margin-bottom: 15px;
}

.file-input {
  display: none;
}

.btn {
  flex: 1; /* 平分宽度 */
  min-width: 120px; /* 防止太小 */
  padding: 12px 25px;
  background: var(--primary-color);
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  transition: all 0.3s;
  text-align: center;
  display: flex; /* 让文字居中 */
  align-items: center;
  justify-content: center;
}

.btn:hover {
  background: #3a5999;
  transform: translateY(-2px);
}

.btn:disabled {
  background: #cccccc;
  cursor: not-allowed;
  transform: none;
}

.btn-download-all {
  background: #28a745;
}

.btn-download-all:hover {
  background: #218838;
}

.preview-section {
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2), 0 4px 8px rgba(0, 0, 0, 0.1);
  margin: 20px 0;
  padding: 20px;
  width: 100%;
}

.category-tabs {
  display: flex;
  margin-bottom: 20px;
  border-bottom: 2px solid #eee;
  flex-wrap: wrap;
}

.category-tab {
  padding: 12px 20px;
  cursor: pointer;
  font-weight: 500;
  border-bottom: 3px solid transparent;
  transition: all 0.3s;
}

.category-tab.active {
  border-bottom: 3px solid #007aff;
  color: #007aff;
}

.icons-container {
  display: none;
}

.icons-container.active {
  display: block;
}

.icons-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.icon-item {
  text-align: center;
  padding: 15px 10px;
  background: #f8f9fa;
  border-radius: 10px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s;
}

.icon-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1);
}

.icon-size {
  font-weight: 600;
  color: #007aff;
  margin-bottom: 5px;
}

.icon-download {
  color: #666;
  font-size: 0.9rem;
  cursor: pointer;
  text-decoration: none !important;
}

.icon-download:hover {
  color: #007aff;
}

.download-all-container {
  display: flex;
  justify-content: space-between;
  align-items: stretch; /* 按钮自动拉伸到相同高度 */
  gap: 10px;
  flex-wrap: wrap; /* 允许换行 */
}

.loading {
  display: none;
  text-align: center;
  margin: 10px 0;
}

.spinner {
  border: 4px solid rgba(0, 0, 0, 0.1);
  border-left: 4px solid #4b6cb7;
  border-radius: 50%;
  width: 30px;
  height: 30px;
  animation: spin 1s linear infinite;
  margin: 0 auto;
}

.android-loading .spinner {
  border-left: 4px solid #34a853;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.compact-container {
  flex: 2;
  width: 100%;
  gap: 5px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  border-radius: 10px;
  justify-content: space-between;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2), 0 4px 8px rgba(0, 0, 0, 0.1);
}

.compact-container h1 {
  text-align: center;
  color: #2c3e50;
  font-size: 1.5rem;
}

.icon-section {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.icon-preview {
  width: 100%;
  max-width: 150px; /* 默认最大宽度，PC端使用 */
  aspect-ratio: 1 / 1; /* 保持正方形 */
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  flex: 0 0 auto;
}

.icon-right {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
}

.icon-preview-list {
  width: 100%;
  border-radius: 0 !important;
}

.icon-text {
  color: white;
  font-weight: bold;
  text-align: center;
  word-break: break-word; /* 自动换行 */
  overflow: hidden; /* 超出隐藏 */
  text-overflow: ellipsis; /* 超出显示省略号 */
  -webkit-box-orient: vertical;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

.controls-section {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 50px;
}
/* 公共的横向布局容器 */
.control-row {
  display: flex;
  gap: 15px;
}

.control-row .control-group input,
.control-row .control-group textarea,
.control-row .control-group select {
  flex: 1;
  padding: 5px 10px;
  border: 1px solid #dfe6e9;
  border-radius: var(--border-radius);
  font-size: 0.95rem;
  transition: all 0.2s;
  width: 100%;
  box-sizing: border-box;
}

.control-row .control-group input:focus,
.control-row .control-group textarea:focus,
.control-row .control-group select:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(74, 107, 255, 0.1);
}

/* 优化 range 滑块 */
.control-row .control-group input[type="range"] {
  width: 100%;
  margin: 8px 0;
  -webkit-appearance: none;
  height: 6px;
  border-radius: 3px;
  background: #ddd;
  outline: none;
  transition: background 0.3s;
}

.control-row .control-group input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #3498db;
  cursor: pointer;
  transition: transform 0.2s, background 0.2s;
}

.control-row .control-group input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.2);
  background: #2c80d3;
}

.control-row .control-group input[type="range"]::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #3498db;
  cursor: pointer;
  transition: transform 0.2s, background 0.2s;
}

.control-row .control-group input[type="range"]::-moz-range-thumb:hover {
  transform: scale(1.2);
  background: #2c80d3;
}

/* 滑块数值显示 */
.slider-value {
  font-size: 0.8rem;
  font-weight: bold;
  color: #2c3e50;
  display: inline-block;
}

.control-group.full-width {
  flex: 1 1 100%;
}
.control-group {
  flex: 1;
}
.control-group h3 {
  font-size: 0.95rem;
  color: #2c3e50;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.color-picker {
  width: 100%;
  display: flex;

  justify-content: space-between; /* 居中对齐 */
}

.color-option {
  width: 30px;
  height: 30px;
  border-radius: 5px;
  cursor: pointer;
  transition: transform 0.2s;
  border: 2px solid transparent;
}

.color-option:hover {
  transform: scale(1.1);
}

.color-option.active {
  border: 2px solid #2c3e50;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.custom-color {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.custom-color label {
  font-weight: 500;
  margin: 0 5px;
  color: #5a6c7d;
}

.buttons {
  display: flex;
  gap: 10px;
}

.buttons button {
  flex: 1;
  background: #3498db;
  color: white;
  border: none;
  padding: 10px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 600;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.buttons button:hover {
  transform: translateY(-2px);
  box-shadow: 0 3px 5px rgba(0, 0, 0, 0.1);
}

.buttons .download-btn {
  background: #28a745;
}

.buttons .reset-btn {
  background: var(--primary-color);
  color: white;
  border-radius: var(--border-radius);
}
@media (max-width: 768px) {
  .appicon_content {
    padding: 10px;
  }

  .upload-section {
    padding: 10px;
  }

  .compact-container {
    padding: 10px;
  }

  .icon-section {
    gap: 5px;
  }

  .color-option {
    width: 18px;
    height: 18px;
  }

  .controls-section {
    gap: 10px;
  }
  .main-content {
    flex-direction: column;
  }

  .category-tabs {
    display: flex;
    flex-wrap: nowrap; /* 不换行 */
    overflow-x: auto; /* 横向滚动 */
    -webkit-overflow-scrolling: touch; /* iOS 惯性滑动 */
    gap: 8px; /* 标签之间间距 */
  }

  .category-tab {
    flex: 0 0 auto; /* 避免被压缩，保持内容宽度 */
    padding: 8px 12px;
    font-size: 0.9rem;
    white-space: nowrap; /* 防止文字换行 */
  }

  .icon-preview {
    width: 130px; /* 固定宽度 */
    height: 130px; /* 强制高度相等 */
    flex: 0 0 auto;
  }
  .btn {
    flex: 1 1 100%; /* 换行后占整行 */
  }
}
