/* 响应式设计改进 */
@media (max-width: 768px) {
  .card {
    padding: 1rem;
    margin: 0.5rem;
  }
  
  .form-input {
    font-size: 16px; /* 防止iOS缩放 */
  }
  
  /* 移动端标题和语言按钮布局优化 */
  .title-glow {
    margin-top: 3rem; /* 为语言按钮留出空间 */
  }
  
  /* 语言按钮在移动端调整位置 */
  .absolute.top-4.right-4 {
    top: 1rem;
    right: 1rem;
  }
  
  /* 移动端GitHub按钮调整 */
  .github-btn {
    width: 40px;
    height: 40px;
    padding: 0.5rem;
  }
  
  .github-btn svg {
    width: 18px;
    height: 18px;
  }
  
  table {
    font-size: 0.75rem;
    min-width: 1000px; /* 增加最小宽度，确保有足够空间 */
  }
  
  .hash-mono {
    font-size: 0.625rem;
    word-break: break-all;
  }
  
  /* 移动端地址显示优化 */
  .table-cell-address {
    white-space: nowrap;
    display: inline-block;
    width: 100%;
  }
  
  /* 移动端表格列宽优化 - 给地址和金额更多空间 */
  th:nth-child(1), td:nth-child(1) { width: 5%; }   /* 序号 */
  th:nth-child(2), td:nth-child(2) { width: 8%; }   /* 方向 */
  th:nth-child(3), td:nth-child(3) { width: 12%; }  /* 时间 */
  th:nth-child(4), td:nth-child(4) { width: 30%; }  /* 发送方 - 增加宽度 */
  th:nth-child(5), td:nth-child(5) { width: 30%; }  /* 接收方 - 增加宽度 */
  th:nth-child(6), td:nth-child(6) { width: 15%; }  /* 金额 - 增加宽度 */
  
  /* 移动端结果信息布局优化 */
  .flex.justify-between.items-center {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }
  
  /* 移动端标签选择器居中 */
  .flex.items-center.gap-1.bg-gray-800\/30 {
    align-self: center;
    width: 100%;
    justify-content: center;
  }
  
  /* 移动端表格容器优化 */
  .table-container {
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    margin: 0 -0.5rem; /* 扩展到卡片边缘 */
  }
  
  /* 移动端表格头部固定 */
  .table-container {
    position: relative;
  }
  
  thead {
    position: sticky;
    top: 0;
    z-index: 10;
  }
  
  
  .btn {
    padding: 0.625rem 1.25rem;
    font-size: 0.8125rem;
  }
  
  .title-glow {
    font-size: 2rem;
  }
}

@media (max-width: 480px) {
  .card {
    padding: 0.75rem;
    margin: 0.25rem;
  }
  
  /* 超小屏幕标题和语言按钮进一步优化 */
  .title-glow {
    margin-top: 3.5rem; /* 为语言按钮留出更多空间 */
    font-size: 1.5rem; /* 稍微减小标题大小 */
  }
  
  /* 语言按钮在超小屏幕调整 */
  .absolute.top-4.right-4 {
    top: 0.75rem;
    right: 0.75rem;
  }
  
  /* 超小屏幕GitHub按钮调整 */
  .github-btn {
    width: 36px;
    height: 36px;
    padding: 0.375rem;
  }
  
  .github-btn svg {
    width: 16px;
    height: 16px;
  }
  
  /* 语言按钮在超小屏幕变小 */
  .lang-btn {
    padding: 0.375rem 0.75rem;
    font-size: 0.75rem;
  }
  
  table {
    font-size: 0.6875rem;
    min-width: 500px; /* 进一步减少最小宽度 */
  }
  
  .hash-mono {
    font-size: 0.5625rem;
  }
  
  /* 超小屏幕地址显示优化 */
  .table-cell-address {
    white-space: nowrap;
    width: 100%;
  }
  
  /* 超小屏幕表格列宽优化 - 进一步优化空间分配 */
  th:nth-child(1), td:nth-child(1) { width: 4%; }   /* 序号 */
  th:nth-child(2), td:nth-child(2) { width: 7%; }   /* 方向 */
  th:nth-child(3), td:nth-child(3) { width: 11%; }  /* 时间 */
  th:nth-child(4), td:nth-child(4) { width: 32%; }  /* 发送方 - 更多空间 */
  th:nth-child(5), td:nth-child(5) { width: 32%; }  /* 接收方 - 更多空间 */
  th:nth-child(6), td:nth-child(6) { width: 14%; }  /* 金额 - 更多空间 */
  
  /* 超小屏幕结果信息进一步优化 */
  .flex.justify-between.items-center {
    gap: 0.5rem;
  }
  
  /* 超小屏幕文字大小调整 */
  #countText {
    font-size: 0.75rem;
  }
  
  #cacheStatus {
    font-size: 0.625rem;
  }
  
  /* 超小屏幕表格进一步优化 */
  .table-container {
    margin: 0 -0.75rem; /* 进一步扩展到边缘 */
  }
  
  
  /* 超小屏幕表格行高优化 */
  tbody tr {
    min-height: 2.5rem;
  }
  
  /* 超小屏幕地址点击区域优化 */
  .hash-mono {
    padding: 0.25rem;
    border-radius: 0.25rem;
    transition: background-color 0.2s;
  }
  
  .hash-mono:active {
    background-color: rgba(255, 255, 255, 0.1);
  }
  
  .btn {
    padding: 0.5rem 1rem;
    font-size: 0.75rem;
  }
  
  .title-glow {
    font-size: 1.75rem;
  }
}

/* 触摸设备优化 */
@media (hover: none) and (pointer: coarse) {
  .btn:hover {
    transform: none;
  }
  
  .card:hover {
    transform: none;
  }
  
  .form-input:focus {
    transform: none;
  }
  
  /* 增加触摸目标大小 */
  .btn {
    min-height: 44px;
    min-width: 44px;
  }
  
  /* 优化触摸滚动 */
  .table-container {
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
  }
  
  /* 移动端表格触摸优化 */
  tbody tr {
    transition: background-color 0.2s ease;
  }
  
  tbody tr:active {
    background-color: rgba(255, 255, 255, 0.1) !important;
  }
  
  /* 移动端表格滚动条样式 */
  .table-container::-webkit-scrollbar {
    height: 4px;
  }
  
  .table-container::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
  }
  
  .table-container::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
  }
  
  .table-container::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
  }
}

/* 高对比度模式支持 */
@media (prefers-contrast: high) {
  .card {
    border: 2px solid rgba(255,255,255,0.3);
  }
  
  .btn {
    border: 2px solid rgba(255,255,255,0.3);
  }
}
