/* 随机工具页面特定样式 */

/* 工具面板样式 */
.tool-panel {
  background: white;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  margin-bottom: 20px;
}

.tool-panel h3 {
  color: #2c3e50;
  margin-bottom: 20px;
  font-size: 1.4em;
  border-bottom: 2px solid #e74c3c;
  padding-bottom: 8px;
}

/* 表单元素样式 */
.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: #34495e;
}

.form-input,
.form-textarea,
.form-select {
  width: 100%;
  padding: 12px;
  border: 2px solid #e0e6ed;
  border-radius: 8px;
  font-size: 14px;
  transition: border-color 0.3s ease;
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
  outline: none;
  border-color: #e74c3c;
  box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.1);
}

.form-textarea {
  resize: vertical;
  min-height: 120px;
  font-family: monospace;
}

/* 滑块样式 */
.form-range {
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: #e0e6ed;
  outline: none;
  margin: 10px 0;
}

.form-range::-webkit-slider-thumb {
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #e74c3c;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.form-range::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #e74c3c;
  cursor: pointer;
  border: none;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.range-labels {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: #7f8c8d;
  margin-top: 5px;
}

/* 复选框组样式 */
.checkbox-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 20px 0;
}

.checkbox-item {
  display: flex;
  align-items: center;
  cursor: pointer;
  font-size: 14px;
  color: #34495e;
  position: relative;
  padding-left: 30px;
}

.checkbox-item input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  cursor: pointer;
}

.checkmark {
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  height: 18px;
  width: 18px;
  background-color: #fff;
  border: 2px solid #e0e6ed;
  border-radius: 4px;
  transition: all 0.3s ease;
}

.checkbox-item:hover .checkmark {
  border-color: #e74c3c;
}

.checkbox-item input:checked ~ .checkmark {
  background-color: #e74c3c;
  border-color: #e74c3c;
}

.checkmark:after {
  content: "";
  position: absolute;
  display: none;
  left: 5px;
  top: 2px;
  width: 4px;
  height: 8px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.checkbox-item input:checked ~ .checkmark:after {
  display: block;
}

/* 按钮组样式 */
.button-group {
  display: flex;
  gap: 12px;
  margin: 20px 0;
  flex-wrap: wrap;
}

.btn {
  padding: 12px 24px;
  background: linear-gradient(135deg, #e74c3c, #c0392b);
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-block;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(231, 76, 60, 0.3);
}

.btn:disabled {
  background: #bdc3c7;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-secondary {
  background: linear-gradient(135deg, #95a5a6, #7f8c8d);
}

.btn-secondary:hover {
  box-shadow: 0 4px 12px rgba(149, 165, 166, 0.3);
}

.btn-small {
  padding: 8px 16px;
  font-size: 12px;
}

.btn-copy {
  padding: 6px 12px;
  background: #3498db;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
  transition: background 0.3s ease;
}

.btn-copy:hover {
  background: #2980b9;
}

/* 结果显示区域 */
.result-area {
  background: #f8f9fa;
  border-radius: 8px;
  padding: 20px;
  margin-top: 20px;
  border-left: 4px solid #e74c3c;
}

.result-title {
  font-weight: 600;
  color: #2c3e50;
  margin-bottom: 12px;
  font-size: 16px;
}

/* 密码显示样式 */
.password-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: white;
  padding: 12px;
  border-radius: 6px;
  margin-bottom: 8px;
  border: 1px solid #e0e6ed;
}

.password-text {
  font-family: "Courier New", monospace;
  font-size: 16px;
  color: #2c3e50;
  flex: 1;
  margin-right: 12px;
  word-break: break-all;
}

.password-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.password-strength {
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
}

.password-strength.weak {
  background: #e74c3c;
  color: white;
}

.password-strength.medium {
  background: #f39c12;
  color: white;
}

.password-strength.strong {
  background: #27ae60;
  color: white;
}

/* 数字显示样式 */
.numbers-display {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.number-item {
  background: white;
  padding: 8px 12px;
  border-radius: 6px;
  border: 1px solid #e0e6ed;
  font-family: "Courier New", monospace;
  font-size: 16px;
  color: #2c3e50;
  font-weight: 600;
}

.numbers-stats {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 14px;
  color: #7f8c8d;
  flex-wrap: wrap;
}

/* 选择结果样式 */
.picked-results {
  margin-bottom: 12px;
}

.picked-item {
  display: flex;
  align-items: center;
  background: white;
  padding: 12px;
  border-radius: 6px;
  margin-bottom: 8px;
  border: 1px solid #e0e6ed;
}

.picked-number {
  background: #e74c3c;
  color: white;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  margin-right: 12px;
  flex-shrink: 0;
}

.picked-text {
  color: #2c3e50;
  font-size: 16px;
}

/* 预设选项样式 */
.preset-options {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid #e0e6ed;
}

.preset-options h4 {
  color: #34495e;
  margin-bottom: 12px;
  font-size: 14px;
}

.preset-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* 输入帮助文本 */
.input-help {
  font-size: 12px;
  color: #7f8c8d;
  margin-top: 4px;
}

/* 侧边栏特定样式 */
.security-tips ul {
  list-style: none;
  padding: 0;
}

.security-tips li {
  padding: 8px 0;
  border-bottom: 1px solid #ecf0f1;
  color: #34495e;
  font-size: 14px;
}

.security-tips li:before {
  content: "🔒";
  margin-right: 8px;
}

.security-tips li:last-child {
  border-bottom: none;
}

.quick-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.quick-actions .btn {
  padding: 10px 16px;
  font-size: 13px;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .checkbox-group {
    gap: 16px;
  }

  .button-group {
    flex-direction: column;
  }

  .btn {
    width: 100%;
    text-align: center;
  }

  .password-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .password-actions {
    width: 100%;
    justify-content: space-between;
  }

  .numbers-display {
    justify-content: center;
  }

  .numbers-stats {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .preset-buttons {
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .tool-panel {
    padding: 16px;
  }

  .form-input,
  .form-textarea {
    font-size: 16px; /* 防止iOS缩放 */
  }

  .password-text {
    font-size: 14px;
  }

  .number-item {
    font-size: 14px;
    padding: 6px 10px;
  }
}
