* {
  box-sizing: border-box;
}
body, html {
  margin: 0; padding: 0;
  height: 100%;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background: linear-gradient(135deg, #efefef 0%, #717171 100%);
  color: #1a202c;
  overflow-x: hidden;
}

body.sidebar-open {
  overflow: hidden;
}

.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 70px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(226, 232, 240, 0.6);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 3%;
  z-index: 1000;
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.08);
}
.navbar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: #1a202c;
}
.navbar-brand i {
  font-size: 28px;
  color: #667eea;
}
.navbar-title {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.5px;
}
.navbar-subtitle {
  font-size: 12px;
  color: #64748b;
  font-weight: 400;
  margin-left: 4px;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 2vw;
}
.nav-link {
  color: #64748b;
  text-decoration: none;
  font-weight: 500;
  font-size: 15px;
  transition: all 0.2s ease;
  position: relative;
}
.nav-link:hover {
  color: #667eea;
}
.nav-link.active {
  color: #667eea;
}
.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 0;
  right: 0;
  height: 2px;
  background: #667eea;
  border-radius: 1px;
}

.mobile-menu-btn {
  display: none;
  width: 44px;
  height: 44px;
  border: none;
  background: #667eea;
  color: #fff;
  border-radius: 8px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  transition: all 0.2s ease;
}
.mobile-menu-btn:hover {
  background: #5a67d8;
  transform: scale(1.05);
}

.mobile-sidebar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2000;
  visibility: hidden;
  opacity: 0;
  transition: all 0.3s ease;
}
.mobile-sidebar.active {
  visibility: visible;
  opacity: 1;
}
.mobile-sidebar-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
}
.mobile-sidebar-content {
  position: absolute;
  top: 0;
  left: 0;
  width: 280px;
  height: 100%;
  background: #fff;
  box-shadow: 4px 0 20px rgba(0, 0, 0, 0.15);
  transform: translateX(-100%);
  transition: transform 0.3s ease;
  display: flex;
  flex-direction: column;
}
.mobile-sidebar.active .mobile-sidebar-content {
  transform: translateX(0);
}
.mobile-sidebar-header {
  padding: 20px 24px;
  border-bottom: 1px solid #e5e7eb;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #f8fafc;
}
.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 18px;
  font-weight: 700;
  color: #1a202c;
}
.sidebar-brand i {
  color: #667eea;
  font-size: 20px;
}
.sidebar-close {
  width: 36px;
  height: 36px;
  border: none;
  background: #e5e7eb;
  color: #64748b;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  transition: all 0.2s ease;
}
.sidebar-close:hover {
  background: #d1d5db;
  color: #374151;
}
.mobile-sidebar-nav {
  flex: 1;
  padding: 24px 0;
}
.mobile-nav-link {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 24px;
  color: #64748b;
  text-decoration: none;
  font-weight: 500;
  font-size: 16px;
  transition: all 0.2s ease;
  border-left: 3px solid transparent;
}
.mobile-nav-link:hover {
  background: #f8fafc;
  color: #667eea;
  border-left-color: #667eea;
}
.mobile-nav-link.active {
  background: #f0f4ff;
  color: #667eea;
  border-left-color: #667eea;
}
.mobile-nav-link i {
  font-size: 18px;
  width: 20px;
  text-align: center;
}

.container {
  width: 90%;
  max-width: none;
  margin: 0 auto;
  padding: 100px 2% 60px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.hero-section {
  text-align: center;
  margin-bottom: 4vh;
  padding: 3vh 0;
}
.hero-title {
  font-size: clamp(32px, 4vw, 56px);
  font-weight: 800;
  color: #fff;
  margin-bottom: 16px;
  letter-spacing: -1px;
  text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
.hero-subtitle {
  font-size: clamp(16px, 1.5vw, 22px);
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 40px;
  font-weight: 300;
  line-height: 1.6;
}
.hero-features {
  display: flex;
  justify-content: center;
  gap: 3vw;
  margin-top: 32px;
  flex-wrap: wrap;
}
.feature-item {
  display: flex;
  align-items: center;
  gap: 8px;
  color: rgba(255, 255, 255, 0.8);
  font-size: clamp(12px, 1vw, 16px);
}
.feature-item i {
  color: #a7f3d0;
}

.search-card {
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(20px);
  border-radius: 24px;
  padding: clamp(24px, 3vw, 56px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.2);
  margin-bottom: 3vh;
  width: 100%;
}
.search-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-width: 70%;
  margin: 0 auto;
}
.input-group {
  width: 100%;
}
.input-label {
  display: block;
  font-size: clamp(12px, 1vw, 16px);
  font-weight: 600;
  color: #374151;
  margin-bottom: 12px;
  text-align: center;
}
.search-input {
  width: 100%;
  height: clamp(48px, 4vw, 60px);
  padding: 0 20px;
  border: 2px solid #e5e7eb;
  border-radius: 16px;
  font-size: clamp(14px, 1.2vw, 18px);
  background: #fff;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  text-align: center;
}
.search-input:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1), 0 4px 12px rgba(0, 0, 0, 0.08);
}
.search-btn {
  width: 100%;
  height: clamp(48px, 4vw, 60px);
  padding: 0 32px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border: none;
  border-radius: 16px;
  color: #fff;
  font-size: clamp(14px, 1.2vw, 18px);
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 16px rgba(102, 126, 234, 0.3);
}
.search-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(102, 126, 234, 0.4);
}
.search-btn:active {
  transform: translateY(0);
}

.result-card {
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(20px);
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  width: 100%;
}
.result-header {
  padding: clamp(20px, 2.5vw, 40px);
  border-bottom: 1px solid #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.result-title {
  font-size: clamp(16px, 1.5vw, 22px);
  font-weight: 700;
  color: #1a202c;
  display: flex;
  align-items: center;
  gap: 12px;
}
.result-title i {
  color: #667eea;
}
.result-actions {
  display: flex;
  gap: 12px;
}
.action-btn {
  height: clamp(32px, 2.5vw, 40px);
  padding: 0 clamp(12px, 1vw, 20px);
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #fff;
  color: #64748b;
  font-size: clamp(11px, 1vw, 14px);
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
  text-decoration: none;
}
.action-btn:hover {
  border-color: #667eea;
  color: #667eea;
  background: #f8faff;
}
.action-btn.export {
  background: #10b981;
  border-color: #10b981;
  color: #fff;
}
.action-btn.export:hover {
  background: #059669;
  border-color: #059669;
  color: #fff;
}
.result-stats {
  background: #f8fafc;
  padding: clamp(12px, 1.5vw, 20px) clamp(20px, 2.5vw, 40px);
  border-bottom: 1px solid #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  font-size: clamp(12px, 1vw, 16px);
  color: #64748b;
  flex-wrap: wrap;
}
.stats-badge {
  background: #667eea;
  color: #fff;
  padding: 4px 12px;
  border-radius: 12px;
  font-weight: 600;
  font-size: clamp(11px, 1vw, 14px);
}

.table-container {
  flex: 1;
  overflow-x: auto;
  overflow-y: auto;
  padding: 0 clamp(16px, 2.5vw, 40px) clamp(20px, 2.5vw, 40px);
  -webkit-overflow-scrolling: touch;
}
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: clamp(12px, 1vw, 16px);
  min-width: 80vw;
}
.data-table thead th {
  background: #f8fafc;
  color: #374151;
  padding: clamp(16px, 1.5vw, 24px) clamp(12px, 1vw, 20px);
  text-align: left;
  font-weight: 600;
  font-size: clamp(10px, 0.8vw, 14px);
  text-transform: uppercase;
  letter-spacing: 1px;
  border-bottom: 2px solid #e5e7eb;
  position: sticky;
  top: 0;
  z-index: 10;
  white-space: nowrap;
}
.data-table tbody tr {
  transition: all 0.2s ease;
  border-bottom: 1px solid #f1f5f9;
}
.data-table tbody tr:hover {
  background: linear-gradient(90deg, #f8faff 0%, #faf5ff 100%);
}
.data-table tbody tr:last-child {
  border-bottom: none;
}
.data-table td {
  padding: clamp(16px, 1.5vw, 24px) clamp(12px, 1vw, 20px);
  color: #374151;
  vertical-align: middle;
  white-space: nowrap;
}

.domain-cell {
  font-weight: 700;
  color: #667eea;
  font-size: clamp(13px, 1.1vw, 17px);
}
.icp-code {
  font-family: 'SF Mono', 'Monaco', 'Cascadia Code', monospace;
  background: #f1f5f9;
  color: #1e293b;
  padding: clamp(6px, 0.6vw, 10px) clamp(8px, 0.8vw, 14px);
  border-radius: 8px;
  font-size: clamp(11px, 0.9vw, 15px);
  font-weight: 600;
  letter-spacing: 0.5px;
  border: 1px solid #e2e8f0;
}
.type-tag {
  display: inline-flex;
  align-items: center;
  padding: clamp(4px, 0.4vw, 8px) clamp(10px, 1vw, 16px);
  border-radius: 20px;
  font-size: clamp(10px, 0.8vw, 14px);
  font-weight: 600;
}
.type-personal {
  background: #dcfce7;
  color: #166534;
  border: 1px solid #bbf7d0;
}
.type-enterprise {
  background: #dbeafe;
  color: #1e40af;
  border: 1px solid #bfdbfe;
}
.status-normal {
  color: #059669;
  font-weight: 600;
}
.status-limited {
  color: #dc2626;
  font-weight: 600;
}
.date-text {
  font-family: 'SF Mono', 'Monaco', 'Cascadia Code', monospace;
  color: #64748b;
  font-size: clamp(11px, 0.9vw, 15px);
}

.copyable {
  cursor: pointer;
  transition: all 0.2s ease;
  border-radius: 6px;
  padding: 4px 6px;
  margin: -4px -6px;
  position: relative;
}
.copyable:hover {
  background: rgba(102, 126, 234, 0.08);
  color: #667eea;
}
.copyable:active {
  transform: scale(0.98);
}
.copy-success {
  background: rgba(16, 185, 129, 0.1) !important;
  color: #059669 !important;
}

.empty-state {
  text-align: center;
  padding: clamp(40px, 5vw, 80px) 20px;
  color: #64748b;
}
.empty-icon {
  font-size: clamp(48px, 4vw, 72px);
  color: #cbd5e1;
  margin-bottom: 24px;
}
.empty-title {
  font-size: clamp(16px, 1.5vw, 24px);
  font-weight: 600;
  color: #374151;
  margin-bottom: 8px;
}
.empty-desc {
  font-size: clamp(13px, 1.1vw, 17px);
  color: #64748b;
  line-height: 1.6;
}

.footer {
  text-align: center;
  padding: clamp(24px, 3vw, 40px) 20px;
  color: rgba(255, 255, 255, 0.7);
  font-size: clamp(12px, 1vw, 16px);
}
.footer-links {
  display: flex;
  justify-content: center;
  gap: clamp(16px, 2vw, 32px);
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.footer-link {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  transition: color 0.2s ease;
}
.footer-link:hover {
  color: #fff;
}

.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(102, 126, 234, 0.9);
  backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}
.loading-content {
  text-align: center;
  color: #fff;
}
.loading-spinner {
  width: clamp(40px, 3vw, 56px);
  height: clamp(40px, 3vw, 56px);
  border: 4px solid rgba(255, 255, 255, 0.3);
  border-top: 4px solid #fff;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 16px;
}
.loading-text {
  font-size: clamp(14px, 1.2vw, 18px);
  font-weight: 500;
}
@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@media (max-width: 1024px) {
  .container {
    width: 95%;
    padding: 90px 2% 50px;
  }
  .search-form {
    max-width: 85%;
  }
  .desktop-nav {
    gap: 24px;
  }
}

@media (max-width: 768px) {
  .navbar {
    padding: 0 4%;
    height: 60px;
  }
  .navbar-brand i {
    font-size: 24px;
  }
  .navbar-title {
    font-size: 18px;
  }
  .navbar-subtitle {
    font-size: 10px;
  }
  .desktop-nav {
    display: none;
  }
  .mobile-menu-btn {
    display: flex;
  }

  .container {
    width: 95%;
    padding: 80px 2% 30px;
  }

  .hero-section {
    margin-bottom: 32px;
    padding: 20px 0;
  }
  .hero-features {
    gap: 16px;
    margin-top: 20px;
  }

  .search-card {
    padding: 24px 4%;
    margin: 0 0 24px 0;
    border-radius: 16px;
  }
  .search-form {
    gap: 16px;
    max-width: 100%;
  }
  .search-input {
    border-radius: 12px;
  }
  .search-btn {
    border-radius: 12px;
  }

  .result-card {
    margin: 0;
    border-radius: 16px;
  }
  .result-header {
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }
  .result-title {
    justify-content: center;
  }
  .result-actions {
    justify-content: center;
  }

  .table-container {
    padding: 0 4% 20px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .data-table {
    min-width: 600px;
  }

  .empty-state {
    padding: 40px 4%;
  }

  .footer {
    padding: 24px 4%;
  }
  .footer-links {
    gap: 16px;
    margin-bottom: 12px;
  }

  .mobile-sidebar-content {
    width: 260px;
  }
}

@media (max-width: 480px) {
  .container {
    width: 98%;
    padding: 70px 1% 20px;
  }
  .search-card {
    padding: 20px 3%;
    margin: 0 0 20px 0;
  }
  .table-container {
    padding: 0 2% 16px;
  }
  .data-table {
    min-width: 500px;
  }
  .mobile-sidebar-content {
    width: calc(100vw - 40px);
    max-width: 280px;
  }
}

@media (min-width: 1440px) {
  .container {
    width: 85%;
  }
  .search-form {
    max-width: 60%;
  }
  .data-table {
    min-width: 70vw;
  }
}

@media (min-width: 1920px) {
  .container {
    width: 80%;
  }
  .search-form {
    max-width: 50%;
  }
  .data-table {
    min-width: 65vw;
  }
}
