/* 基础样式 */
body {
  padding: 10px;
  margin: 0;
  font-family: Arial, sans-serif;
  background-color: #f5f5f5;
}

p {
  padding: 0;
  margin: 0;
}

/* 表格样式 */
.beautiful-table {
  width: 100%;
  border-collapse: collapse;
  font-family: Arial, sans-serif;
  background-color: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  margin-bottom: 20px;
}

.beautiful-table thead th {
  background-color: #4CAF50;
  color: white;
  font-weight: 600;
}

.beautiful-table th,
.beautiful-table td {
  padding: 8px;
  text-align: left;
  border: 1px solid #ddd;
  text-align: center;
  vertical-align: middle;
}

.beautiful-table tr:nth-child(even) {
  background-color: #f9f9f9;
}

.beautiful-table tr:hover {
  background-color: #f0f8ff;
}

.beautiful-table th {
  height: 40px;
  font-size: 14px;
}

.beautiful-table td {
  height: 40px;
  font-size: 14px;
}

/* 表单元素样式 */
input,
select {
  width: 100%;
  padding: 8px;
  border: 1px solid #ccc;
  border-radius: 5px;
  box-sizing: border-box;
  font-size: 14px;
  transition: border-color 0.3s, box-shadow 0.3s;
}

input:focus,
select:focus {
  outline: none;
  border-color: #4CAF50;
  box-shadow: 0 0 8px rgba(76, 175, 80, 0.2);
}

/* 按钮样式 */
button {
  padding: 10px 18px;
  font-size: 15px;
  font-weight: bold;
  color: white;
  background-color: #4CAF50;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  transition: background-color 0.3s, transform 0.2s;
  margin: 0 5px;
  min-height: 40px;
}

button:hover {
  background-color: #45a049;
  transform: translateY(-1px);
}

button:active {
  transform: scale(0.98);
}

button:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.5);
}

/* 按钮组样式 */
.buttons {
  padding: 20px 0;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 10px;
}

/* 结果区域样式 */
.result {
  background-color: white;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  margin-top: 20px;
}

.result h3 {
  margin-top: 0;
  color: #333;
  font-size: 18px;
}

.result p {
  line-height: 24px;
  margin: 5px 0;
  word-break: break-all;
}

.copy-btn {
  margin-bottom: 15px;
  background: #2196F3;
  font-size: 14px;
  padding: 8px 20px;
  border-radius: 4px;
  border: none;
  color: #fff;
  cursor: pointer;
  transition: background 0.2s;
}

.copy-btn:hover {
  background: #1976d2;
}

/* 移动端隐藏复制按钮 */
@media (max-width: 768px) {
  .desktop-only {
    display: none !important;
  }
}

/* 查询按钮特殊样式 */
.check-btn {
  background: #ff5722 !important;
  border: 2px solid #d84315 !important;
  box-shadow: 0 2px 8px rgba(255, 87, 34, 0.3);
}

.check-btn:hover {
  background: #e64a19 !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(255, 87, 34, 0.4);
}

  .check-btn:disabled {
    background: #ccc !important;
    border-color: #999 !important;
    box-shadow: none;
    cursor: not-allowed;
  }
  
  /* 取消查询按钮样式 */
  .cancel-btn {
    background: #f44336 !important;
    border: 2px solid #d32f2f !important;
    box-shadow: 0 2px 8px rgba(244, 67, 54, 0.3);
  }
  
  .cancel-btn:hover {
    background: #d32f2f !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(244, 67, 54, 0.4);
  }
  
  .cancel-btn:disabled {
    background: #ccc !important;
    border-color: #999 !important;
    box-shadow: none;
    cursor: not-allowed;
  }

/* 拖动图标样式 */
.drag-handle {
  cursor: move;
  font-size: 18px;
  color: #666;
  user-select: none;
}

.drag-handle:hover {
  color: #4CAF50;
}

/* 查询结果样式 */
.check-result {
  background-color: white;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  margin-top: 20px;
}

.check-result h3 {
  margin-top: 0;
  color: #333;
  font-size: 18px;
}

.check-status {
  background-color: #e3f2fd;
  padding: 10px;
  border-radius: 5px;
  margin-bottom: 15px;
}

.check-status p {
  margin: 0;
  color: #1976d2;
  font-weight: 500;
}

.available-domains,
.unavailable-domains,
.error-domains {
  margin-bottom: 20px;
}

.available-domains h4,
.unavailable-domains h4,
.error-domains h4 {
  margin: 0 0 10px 0;
  font-size: 16px;
  font-weight: 600;
}

.available-domains h4 {
  color: #4CAF50;
}

.unavailable-domains h4 {
  color: #f44336;
}

.error-domains h4 {
  color: #ff9800;
}

.unsupported-domains h4 {
  color: #9c27b0;
}

.domain-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  margin: 5px 0;
  border-radius: 5px;
  border-left: 4px solid;
}

.domain-item.available {
  background-color: #f1f8e9;
  border-left-color: #4CAF50;
}

.domain-item.unavailable {
  background-color: #ffebee;
  border-left-color: #f44336;
}

.domain-item.error {
  background-color: #fff3e0;
  border-left-color: #ff9800;
}

.domain-item.unsupported {
  background-color: #f3e5f5;
  border-left-color: #9c27b0;
}

.domain-name {
  font-family: monospace;
  font-size: 14px;
  font-weight: 500;
}

.status {
  font-size: 12px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 3px;
}

.status.available {
  background-color: #4CAF50;
  color: white;
}

.status.unavailable {
  background-color: #f44336;
  color: white;
}

.status.error {
  background-color: #ff9800;
  color: white;
}

.status.unsupported {
  background-color: #9c27b0;
  color: white;
}

/* 移动端响应式设计 */
@media (max-width: 768px) {
  body {
    padding: 5px;
  }

  .beautiful-table {
    font-size: 12px;
  }

  .beautiful-table th,
  .beautiful-table td {
    padding: 6px 4px;
    font-size: 12px;
  }

  .beautiful-table th {
    height: 35px;
  }

  .beautiful-table td {
    height: 35px;
  }

  input,
  select {
    padding: 6px;
    font-size: 14px;
    /* 移动端下拉框优化 */
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 8px center;
    background-size: 16px;
    padding-right: 30px;
  }

  /* 移动端下拉选项优化 */
  select option {
    font-size: 14px;
    padding: 8px;
  }

  button {
    padding: 8px 12px;
    font-size: 13px;
    margin: 2px;
    min-height: 35px;
  }

  .check-btn {
    background: #ff5722 !important;
    border: 2px solid #d84315 !important;
    box-shadow: 0 2px 6px rgba(255, 87, 34, 0.3);
  }
  
  .cancel-btn {
    background: #f44336 !important;
    border: 2px solid #d32f2f !important;
    box-shadow: 0 2px 6px rgba(244, 67, 54, 0.3);
  }

  .buttons {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }

  .buttons input {
    margin: 0;
  }

  .result {
    padding: 15px;
  }

  .result h3 {
    font-size: 16px;
  }

  .result p {
    font-size: 12px;
    line-height: 20px;
  }

  .check-result {
    padding: 15px;
  }

  .check-result h3 {
    font-size: 16px;
  }

  .domain-item {
    padding: 6px 8px;
  }

  .domain-name {
    font-size: 12px;
  }

  .status {
    font-size: 10px;
    padding: 1px 6px;
  }
}

@media (max-width: 480px) {
  .beautiful-table {
    font-size: 11px;
  }

  .beautiful-table th,
  .beautiful-table td {
    padding: 4px 2px;
    font-size: 11px;
  }

  .beautiful-table th {
    height: 30px;
  }

  .beautiful-table td {
    height: 30px;
  }

  input,
  select {
    padding: 4px;
    font-size: 14px;
    /* 小屏设备下拉框优化 */
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 6px center;
    background-size: 14px;
    padding-right: 25px;
  }

  /* 小屏设备下拉选项优化 */
  select option {
    font-size: 14px;
    padding: 6px;
  }

  button {
    padding: 6px 10px;
    font-size: 12px;
    min-height: 30px;
  }

  .check-btn {
    background: #ff5722 !important;
    border: 1px solid #d84315 !important;
    box-shadow: 0 1px 4px rgba(255, 87, 34, 0.3);
  }
  
  .cancel-btn {
    background: #f44336 !important;
    border: 1px solid #d32f2f !important;
    box-shadow: 0 1px 4px rgba(244, 67, 54, 0.3);
  }

  .result {
    padding: 10px;
  }

  .result h3 {
    font-size: 14px;
  }

  .result p {
    font-size: 11px;
    line-height: 18px;
  }

  .check-result {
    padding: 10px;
  }

  .check-result h3 {
    font-size: 14px;
  }

  .domain-item {
    padding: 4px 6px;
  }

  .domain-name {
    font-size: 11px;
  }

  .status {
    font-size: 9px;
    padding: 1px 4px;
  }
}

/* 容器样式 */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 5px;
}

/* 标题样式 */
.page-title {
  text-align: center;
  color: #333;
  margin: 20px 0;
  font-size: 24px;
  font-weight: bold;
}

@media (max-width: 768px) {
  .page-title {
    font-size: 20px;
    margin: 15px 0;
  }
}

@media (max-width: 480px) {
  .page-title {
    font-size: 18px;
    margin: 10px 0;
  }
}