/* ==========================================
   DNS DOMAIN VERIFIER STYLES
   Import modern Kodachi design system
   ========================================== */

@import url('kodachi-modern.css');

/* Domain Checker Specific Styles */

/* Global box-sizing */
* {
  box-sizing: border-box;
}

/* Base styling */
body {
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  overflow: auto;
}

body.styles-loading .container {
  opacity: 0.8;
}

body.styles-loaded .container {
  opacity: 1;
}

/* Loading Overlay */
.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.95);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity 0.3s ease;
}

.loading-overlay.hidden {
  display: none;
}

.loading-overlay .loading-spinner {
  width: 60px;
  height: 60px;
  border: 4px solid rgba(0, 255, 255, 0.2);
  border-top-color: #00ffff;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 20px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.loading-overlay .loading-text {
  color: #00ffff;
  font-size: 1.3rem;
  font-family: 'Orbitron', sans-serif;
  text-shadow: 0 0 10px rgba(0, 255, 255, 0.5);
  margin-bottom: 20px;
}

.loading-overlay .loading-progress {
  width: 300px;
  height: 8px;
  background: rgba(0, 255, 255, 0.1);
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid rgba(0, 255, 255, 0.3);
  margin-bottom: 15px;
}

.loading-overlay .loading-progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #00ffff, #00ff00);
  border-radius: 4px;
  transition: width 0.3s ease;
  animation: pulse-glow 1.5s ease-in-out infinite;
}

@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 5px rgba(0, 255, 255, 0.5); }
  50% { box-shadow: 0 0 15px rgba(0, 255, 255, 0.8); }
}

.loading-overlay .loading-count {
  color: rgba(0, 255, 255, 0.7);
  font-size: 0.9rem;
}

/* Container styling */
.container {
  position: relative !important;
  text-align: center;
  padding: 2.5rem 2.5rem 1rem 2.5rem;
  max-width: 1100px;
  width: 95%;
  margin: 2.5rem 1.5rem 1.5rem 1.5rem;
  transition: opacity 0.3s;
}

/* Logo positioning */
.kodachi-logo {
  position: absolute;
  top: -40px;
  left: 50%;
  transform: translateX(-50%);
  width: 70px;
  height: 70px;
  border-radius: 50%;
  padding: 5px;
  z-index: 10;
}

.kodachi-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Back button styling */
.back-btn {
  position: absolute !important;
  top: 10px !important;
  left: 10px !important;
  width: 40px;
  height: 40px;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  z-index: 100 !important;
  padding: 0 !important;
  line-height: 1 !important;
}

.back-btn .back-arrow {
  font-size: 1.2rem;
  line-height: 0;
  margin: 0;
  padding: 0;
  height: auto;
}

/* Title styling */
h1 {
  font-size: 2.2rem;
  margin-bottom: 0.5rem;
  color: #00ffff;
  text-shadow: 0 0 15px rgba(0, 255, 255, 0.6);
  letter-spacing: 1px;
  position: relative;
  display: inline-block;
}

h1:after {
  content: "";
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 50%;
  height: 2px;
  background: linear-gradient(
    to right,
    rgba(0, 255, 255, 0),
    rgba(0, 255, 255, 0.8),
    rgba(0, 255, 255, 0)
  );
}

.subtitle {
  font-size: 1rem;
  margin: 1rem 0 1.5rem;
  color: rgba(240, 240, 240, 0.8);
}

/* Input Section */
.input-section {
  margin: 1.5rem 0;
}

.domain-input-wrapper {
  margin-bottom: 1rem;
}

.domain-input {
  width: 100%;
  max-width: 500px;
  padding: 0.8rem 1rem;
  font-size: 1.1rem;
  font-family: 'Orbitron', monospace;
  background: rgba(0, 20, 20, 0.8);
  border: 2px solid rgba(0, 255, 255, 0.4);
  border-radius: 8px;
  color: #00ffff;
  text-align: center;
  transition: all 0.3s;
}

.domain-input:focus {
  outline: none;
  border-color: #00ffff;
  box-shadow: 0 0 15px rgba(0, 255, 255, 0.4);
}

.domain-input::placeholder {
  color: rgba(0, 255, 255, 0.4);
}

/* Record Type Toggle */
.record-type-toggle {
  margin: 1rem 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.toggle-label,
.selection-label {
  color: rgba(240, 240, 240, 0.8);
  font-size: 0.95rem;
}

.toggle-group {
  display: flex;
  gap: 0;
  border: 1px solid rgba(0, 255, 255, 0.3);
  border-radius: 8px;
  overflow: hidden;
}

.toggle-group input[type="radio"] {
  display: none;
}

.toggle-option {
  padding: 0.5rem 1rem;
  cursor: pointer;
  background: rgba(0, 20, 20, 0.5);
  color: rgba(0, 255, 255, 0.6);
  transition: all 0.3s;
  font-size: 0.9rem;
}

.toggle-group input[type="radio"]:checked + .toggle-option {
  background: rgba(0, 255, 255, 0.2);
  color: #00ffff;
  text-shadow: 0 0 5px rgba(0, 255, 255, 0.5);
}

.toggle-option:hover {
  background: rgba(0, 255, 255, 0.1);
}

/* Source Selection */
.source-selection,
.count-selection {
  margin: 1.2rem 0;
}

.selection-label {
  display: block;
  margin-bottom: 0.6rem;
}

.source-options,
.count-options {
  display: flex;
  justify-content: center;
  gap: 0.8rem;
  flex-wrap: wrap;
}

.source-option,
.count-option {
  position: relative;
}

.source-option input[type="radio"],
.count-option input[type="radio"] {
  display: none;
}

.source-option label,
.count-option label {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0.6rem 1.2rem;
  background: rgba(0, 20, 20, 0.6);
  border: 2px solid rgba(0, 255, 255, 0.2);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s;
  min-width: 90px;
}

.source-option label:hover,
.count-option label:hover {
  border-color: rgba(0, 255, 255, 0.5);
  background: rgba(0, 40, 40, 0.6);
}

.source-option input[type="radio"]:checked + label,
.count-option input[type="radio"]:checked + label {
  border-color: #00ffff;
  background: rgba(0, 255, 255, 0.15);
  box-shadow: 0 0 12px rgba(0, 255, 255, 0.3);
}

.option-name {
  font-size: 0.95rem;
  color: #00ffff;
  font-weight: 500;
}

.option-count {
  font-size: 0.75rem;
  color: rgba(0, 255, 255, 0.6);
  margin-top: 2px;
}

.count-option label {
  min-width: 60px;
  padding: 0.5rem 1rem;
  font-size: 1rem;
  color: #00ffff;
}

/* Fresh Locations Checkbox */
.fresh-locations-option {
  margin: 1.2rem 0;
}

.checkbox-label {
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  gap: 0.6rem;
  user-select: none;
}

.checkbox-label input[type="checkbox"] {
  /* Hide default checkbox */
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

/* Custom checkbox appearance */
.checkbox-label .checkbox-box {
  width: 20px;
  height: 20px;
  background: rgba(0, 20, 20, 0.8);
  border: 2px solid rgba(0, 255, 255, 0.5);
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.checkbox-label:hover .checkbox-box {
  border-color: #00ffff;
  box-shadow: 0 0 8px rgba(0, 255, 255, 0.3);
}

/* Checkmark icon */
.checkbox-label .checkbox-box::after {
  content: '';
  width: 6px;
  height: 10px;
  border: solid #00ffff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg) scale(0);
  transition: transform 0.15s ease;
  margin-bottom: 2px;
}

/* Checked state */
.checkbox-label input[type="checkbox"]:checked + .checkbox-box {
  background: rgba(0, 255, 255, 0.2);
  border-color: #00ffff;
  box-shadow: 0 0 10px rgba(0, 255, 255, 0.4);
}

.checkbox-label input[type="checkbox"]:checked + .checkbox-box::after {
  transform: rotate(45deg) scale(1);
}

/* Focus state for accessibility */
.checkbox-label input[type="checkbox"]:focus + .checkbox-box {
  outline: 2px solid rgba(0, 255, 255, 0.5);
  outline-offset: 2px;
}

.checkbox-text {
  color: rgba(240, 240, 240, 0.8);
  font-size: 0.9rem;
}

/* Verify Button */
.verify-btn {
  margin-top: 1.5rem;
  padding: 0.8rem 2.5rem;
  font-size: 1.1rem;
  background: rgba(0, 255, 255, 0.15);
  color: #00ffff;
  border: 2px solid #00ffff;
  border-radius: 8px;
  cursor: pointer;
  font-family: 'Orbitron', sans-serif;
  transition: all 0.3s;
  text-shadow: 0 0 5px rgba(0, 255, 255, 0.5);
}

.verify-btn:hover {
  background: rgba(0, 255, 0, 0.15);
  color: #00ff00;
  border-color: #00ff00;
  box-shadow: 0 0 20px rgba(0, 255, 0, 0.4);
  transform: translateY(-2px);
}

.verify-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* Results Section */
.results-section {
  margin-top: 2rem;
  text-align: left;
}

.results-section.hidden {
  display: none;
}

.results-header {
  margin-bottom: 1.5rem;
}

.results-header h2 {
  color: #00ffff;
  font-size: 1.3rem;
  margin: 0 0 1rem 0;
  text-align: center;
}

/* Consensus Info */
.consensus-info {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2rem;
  padding: 1rem;
  background: rgba(0, 40, 40, 0.3);
  border-radius: 10px;
  border: 1px solid rgba(0, 255, 255, 0.2);
}

.consensus-ip {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.consensus-ip .label,
.propagation-bar .label {
  color: rgba(240, 240, 240, 0.7);
  font-size: 0.9rem;
}

.consensus-ip .value {
  color: #00ff00;
  font-family: 'Courier New', monospace;
  font-size: 1.1rem;
  font-weight: bold;
  text-shadow: 0 0 10px rgba(0, 255, 0, 0.5);
}

.consensus-ip .count {
  color: rgba(0, 255, 255, 0.7);
  font-size: 0.85rem;
}

.consensus-ip .consensus-location {
  color: rgba(255, 200, 100, 0.9);
  font-size: 0.9rem;
  margin-left: 0.5rem;
  padding-left: 0.5rem;
  border-left: 1px solid rgba(0, 255, 255, 0.3);
}

.consensus-ip .consensus-location .flag-emoji {
  font-size: 1.1rem;
  margin-right: 0.3rem;
}

/* Ping Results */
.ping-results {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  margin-top: 0.8rem;
  padding-top: 0.8rem;
  border-top: 1px solid rgba(0, 255, 255, 0.2);
}

.ping-results .label {
  color: rgba(240, 240, 240, 0.7);
  font-size: 0.9rem;
}

.ping-results .ping-item {
  font-family: 'Courier New', monospace;
  font-size: 0.9rem;
  color: rgba(200, 200, 200, 0.9);
}

.ping-results .ping-success {
  color: #00ff00;
  font-weight: bold;
  text-shadow: 0 0 5px rgba(0, 255, 0, 0.3);
}

.ping-results .ping-failed {
  color: #ff6b6b;
  font-weight: bold;
}

.propagation-bar {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.progress-container {
  position: relative;
  width: 150px;
  height: 24px;
  background: rgba(0, 20, 20, 0.8);
  border-radius: 12px;
  border: 1px solid rgba(0, 255, 255, 0.3);
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #00ffff, #00ff00);
  border-radius: 12px;
  transition: width 0.5s ease;
  width: 0%;
}

.progress-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #001a1a;
  font-size: 0.85rem;
  font-weight: bold;
  text-shadow:
    -1px -1px 0 rgba(255, 255, 255, 0.8),
    1px -1px 0 rgba(255, 255, 255, 0.8),
    -1px 1px 0 rgba(255, 255, 255, 0.8),
    1px 1px 0 rgba(255, 255, 255, 0.8),
    0 0 4px rgba(255, 255, 255, 0.6);
}

/* Results Summary */
.results-summary {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin: 1.5rem 0;
}

.summary-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0.8rem 1.2rem;
  background: rgba(0, 20, 20, 0.5);
  border: 1px solid rgba(0, 255, 255, 0.2);
  border-radius: 8px;
  min-width: 100px;
}

.summary-label {
  font-size: 0.75rem;
  color: rgba(240, 240, 240, 0.6);
  margin-bottom: 0.3rem;
}

.summary-value {
  font-size: 1.3rem;
  color: #00ffff;
  font-weight: bold;
}

.summary-value.success {
  color: #00ff00;
}

.summary-value.error {
  color: #ff4444;
}

/* Sort Controls */
.sort-controls {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem;
  margin-bottom: 1rem;
  font-size: 0.9rem;
  color: rgba(240, 240, 240, 0.7);
}

.sort-select {
  padding: 0.4rem 0.8rem;
  background: rgba(0, 20, 20, 0.8);
  border: 1px solid rgba(0, 255, 255, 0.3);
  border-radius: 5px;
  color: #00ffff;
  font-family: inherit;
  cursor: pointer;
}

.sort-select:focus {
  outline: none;
  border-color: #00ffff;
}

/* Results Table */
.table-container {
  margin: 1rem 0;
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  background: rgba(0, 10, 10, 0.3);
  border-radius: 10px;
  padding: 15px;
  border: 1px solid rgba(0, 255, 255, 0.2);
}

.results-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
  min-width: 650px;
}

.results-table th,
.results-table td {
  padding: 10px 8px;
  text-align: left;
  border-bottom: 1px solid rgba(0, 255, 255, 0.15);
  vertical-align: middle;
}

.results-table th {
  background: rgba(26, 188, 156, 0.1);
  color: #00ffff;
  font-weight: 600;
  text-shadow: 0 0 5px rgba(0, 255, 255, 0.3);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Column widths */
.col-name { width: 32%; }
.col-ip { width: 22%; }
.col-time { width: 10%; }
.col-country { width: 18%; }
.col-status { width: 18%; }

.results-table tbody tr:hover {
  background: rgba(0, 70, 70, 0.3);
}

/* Status indicators */
.status-match {
  color: #00ff00;
  font-weight: 600;
}

.status-different {
  color: #ffaa00;
  font-weight: 600;
}

.status-error,
.status-timeout {
  color: #ff4444;
}

.status-no-record {
  color: #888;
}

/* Flag styling */
.flag-emoji {
  font-size: 1.2rem;
  margin-right: 5px;
  vertical-align: middle;
}

/* IP cell styling */
.ip-cell {
  font-family: 'Courier New', monospace;
  font-size: 0.85rem;
}

.ip-cell.matches-consensus {
  color: #00ff00;
}

.ip-cell.different {
  color: #ffaa00;
}

/* Response time styling */
.time-fast {
  color: #00ff00;
}

.time-medium {
  color: #ffaa00;
}

.time-slow {
  color: #ff6600;
}

.time-timeout {
  color: #ff4444;
}

/* Result Actions */
.result-actions {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 1.5rem;
}

.btn {
  background: rgba(0, 255, 255, 0.1);
  color: #0ff;
  border: 1px solid #0ff;
  padding: 0.5rem 1rem;
  border-radius: 5px;
  cursor: pointer;
  font-family: "Orbitron", sans-serif;
  transition: all 0.3s;
  text-shadow: 0 0 5px rgba(0, 255, 255, 0.5);
}

.btn:hover {
  background: rgba(0, 255, 0, 0.1);
  color: #00ff00;
  border-color: #00ff00;
  box-shadow: 0 0 10px rgba(0, 255, 0, 0.3);
  transform: translateY(-2px);
}

.btn-secondary {
  background: rgba(26, 188, 156, 0.1);
  border-color: #1abc9c;
  color: #1abc9c;
}

.btn-secondary:hover {
  background: rgba(26, 188, 156, 0.2);
  border-color: #1abc9c;
  color: #1abc9c;
  box-shadow: 0 0 10px rgba(26, 188, 156, 0.3);
}

/* Footer */
.footer-links {
  margin-top: 2rem;
  font-size: 0.85rem;
  color: rgba(240, 240, 240, 0.8);
}

.footer-links a {
  color: #00ffff;
  text-decoration: none;
  transition: all 0.3s;
}

.footer-links a:hover {
  color: #1abc9c;
  text-shadow: 0 0 5px rgba(26, 188, 156, 0.5);
}

.tagline {
  color: rgba(240, 240, 240, 0.6);
  font-size: 0.8rem;
  margin-top: 0.5rem;
}

.footer {
  font-size: 0.8rem;
  opacity: 0.8;
  margin-top: 1rem;
  text-align: center;
  color: #cccccc;
}

/* Top button */
.top-btn {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 40px;
  height: 40px;
  background: rgba(26, 188, 156, 0.1);
  color: #1abc9c;
  border: 1px solid #1abc9c;
  border-radius: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s;
  z-index: 1000;
  font-size: 1.2rem;
}

.top-btn:hover {
  background: rgba(0, 255, 255, 0.1);
  color: #00ffff;
  border-color: #00ffff;
  box-shadow: 0 0 10px rgba(0, 255, 255, 0.3);
  transform: translateY(-2px);
}

/* Error message */
.error-message {
  color: #ff1a4b;
  background: rgba(255, 26, 75, 0.1);
  border: 1px solid #ff1a4b;
  padding: 0.8rem;
  border-radius: 5px;
  margin-top: 1rem;
  text-shadow: 0 0 5px rgba(255, 26, 75, 0.3);
}

/* Responsive Design */
@media (max-width: 768px) {
  .container {
    width: 98%;
    padding: 1.5rem 1rem 1rem 1rem;
    margin-top: 3.5rem;
  }

  .kodachi-logo {
    top: -35px;
    width: 60px;
    height: 60px;
  }

  h1 {
    font-size: 1.6rem;
    margin-top: 0.5rem;
  }

  .subtitle {
    font-size: 0.9rem;
  }

  .domain-input {
    font-size: 1rem;
    padding: 0.7rem;
  }

  .source-options,
  .count-options {
    gap: 0.5rem;
  }

  .source-option label,
  .count-option label {
    padding: 0.5rem 0.8rem;
    min-width: 75px;
  }

  .option-name {
    font-size: 0.85rem;
  }

  .consensus-info {
    flex-direction: column;
    gap: 1rem;
  }

  .results-summary {
    gap: 0.5rem;
  }

  .summary-item {
    padding: 0.6rem 0.8rem;
    min-width: 80px;
  }

  .summary-value {
    font-size: 1.1rem;
  }

  .results-table {
    font-size: 0.75rem;
  }

  .results-table th,
  .results-table td {
    padding: 8px 5px;
  }

  .loading-overlay .loading-progress {
    width: 250px;
  }
}

@media (max-width: 480px) {
  .source-options {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.4rem;
  }

  .count-options {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.4rem;
  }

  .source-option label,
  .count-option label {
    min-width: auto;
    padding: 0.5rem 0.6rem;
  }

  .record-type-toggle {
    flex-direction: column;
    gap: 0.5rem;
  }

  .verify-btn {
    width: 100%;
    max-width: 300px;
  }

  .result-actions {
    flex-direction: column;
    align-items: center;
  }

  .result-actions .btn {
    width: 100%;
    max-width: 200px;
  }
}

/* Animation for results appearing */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.results-section:not(.hidden) {
  animation: fadeInUp 0.3s ease;
}

/* Table row animation */
.results-table tbody tr {
  animation: fadeInUp 0.2s ease;
  animation-fill-mode: both;
}

.results-table tbody tr:nth-child(1) { animation-delay: 0.05s; }
.results-table tbody tr:nth-child(2) { animation-delay: 0.1s; }
.results-table tbody tr:nth-child(3) { animation-delay: 0.15s; }
.results-table tbody tr:nth-child(4) { animation-delay: 0.2s; }
.results-table tbody tr:nth-child(5) { animation-delay: 0.25s; }
.results-table tbody tr:nth-child(n+6) { animation-delay: 0.3s; }

/* ==========================================
   IP DISTRIBUTION PANEL (Multi-IP Domains)
   ========================================== */

.ip-distribution {
  margin: 20px 0;
  padding: 20px;
  background: rgba(0, 50, 50, 0.3);
  border: 1px solid rgba(0, 255, 255, 0.25);
  border-radius: 12px;
  animation: fadeInUp 0.3s ease;
}

.ip-distribution.hidden {
  display: none;
}

.ip-distribution-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.ip-distribution h3 {
  color: #00ffff;
  font-size: 1.1rem;
  margin: 0;
  text-shadow: 0 0 10px rgba(0, 255, 255, 0.3);
}

.multi-ip-badge {
  background: rgba(255, 170, 0, 0.2);
  color: #ffaa00;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
  border: 1px solid rgba(255, 170, 0, 0.4);
}

.distribution-note {
  color: rgba(200, 200, 200, 0.7);
  font-size: 0.85rem;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(0, 255, 255, 0.1);
}

.ip-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ip-item {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 12px 15px;
  background: rgba(0, 20, 20, 0.5);
  border: 1px solid rgba(0, 255, 255, 0.15);
  border-radius: 8px;
  transition: all 0.2s ease;
}

.ip-item:hover {
  background: rgba(0, 40, 40, 0.6);
  border-color: rgba(0, 255, 255, 0.3);
}

.ip-item.primary {
  background: rgba(0, 80, 80, 0.3);
  border-color: rgba(0, 255, 255, 0.4);
}

.ip-info {
  flex: 0 0 200px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.ip-address {
  font-family: 'Courier New', monospace;
  font-size: 0.95rem;
  color: #00ff00;
  font-weight: 600;
}

.primary-badge {
  background: rgba(0, 255, 0, 0.2);
  color: #00ff00;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 0.7rem;
  font-weight: 600;
}

.ip-stats {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 12px;
}

.ip-bar-container {
  flex: 1;
  height: 8px;
  background: rgba(0, 20, 20, 0.8);
  border-radius: 4px;
  overflow: hidden;
  max-width: 200px;
}

.ip-bar {
  height: 100%;
  background: linear-gradient(90deg, #00ffff, #00ff00);
  border-radius: 4px;
  transition: width 0.5s ease;
}

.ip-percent {
  font-size: 0.95rem;
  font-weight: 600;
  color: #00ffff;
  min-width: 45px;
  text-align: right;
}

.ip-count {
  font-size: 0.8rem;
  color: rgba(180, 180, 180, 0.8);
  min-width: 90px;
}

.ip-countries {
  flex: 0 0 auto;
  font-size: 1.2rem;
  letter-spacing: 2px;
}

/* Responsive IP Distribution */
@media (max-width: 768px) {
  .ip-item {
    flex-wrap: wrap;
    gap: 10px;
  }

  .ip-info {
    flex: 1 1 100%;
  }

  .ip-stats {
    flex: 1 1 100%;
  }

  .ip-bar-container {
    max-width: none;
  }

  .ip-countries {
    flex: 1 1 100%;
    text-align: left;
  }
}

/* ==========================================
   DNS SERVER WORLD MAP
   ========================================== */

.dns-map-section {
  margin: 30px 0;
  padding: 20px;
  background: rgba(0, 5, 5, 0.95);
  border: 1px solid rgba(0, 255, 255, 0.2);
  border-radius: 12px;
  animation: fadeInUp 0.4s ease;
}

.dns-map-section.hidden {
  display: none;
}

.dns-map-section h3 {
  color: #00ffff;
  font-size: 1.2rem;
  margin: 0 0 15px 0;
  display: flex;
  align-items: center;
  text-shadow: 0 0 10px rgba(0, 255, 255, 0.3);
}

.dns-map-container {
  height: 400px;
  width: 100%;
  background: #0a1520;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid rgba(0, 255, 255, 0.1);
}

.dns-map-container svg {
  width: 100%;
  height: 100%;
  display: block;
}

/* Map country styling */
.map-country {
  transition: fill 0.2s ease;
}

.map-country:hover {
  fill: #2a3543 !important;
}

/* DNS Markers */
.dns-marker {
  cursor: pointer;
  transition: transform 0.2s ease, r 0.2s ease;
}

.dns-marker:hover {
  transform: scale(1.3);
}

.dns-marker.online {
  fill: #00ff00;
}

.dns-marker.offline {
  fill: #ff3333;
}

.dns-marker.timeout {
  fill: #ffaa00;
}

/* Map Legend */
.map-legend {
  display: flex;
  justify-content: center;
  gap: 25px;
  margin-top: 15px;
  padding-top: 15px;
  border-top: 1px solid rgba(0, 255, 255, 0.1);
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  color: rgba(200, 200, 200, 0.9);
  font-size: 0.85rem;
}

.legend-item::before {
  content: '';
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  box-shadow: 0 0 6px rgba(0, 0, 0, 0.3);
}

.legend-item.online::before {
  background: #00ff00;
  box-shadow: 0 0 8px rgba(0, 255, 0, 0.5);
}

.legend-item.offline::before {
  background: #ff3333;
  box-shadow: 0 0 8px rgba(255, 51, 51, 0.5);
}

.legend-item.timeout::before {
  background: #ffaa00;
  box-shadow: 0 0 8px rgba(255, 170, 0, 0.5);
}

/* DNS Map Tooltip (added via JS, but base styles here) */
.dns-map-tooltip {
  font-family: 'Segoe UI', system-ui, sans-serif;
  line-height: 1.5;
}

/* Responsive Map */
@media (max-width: 768px) {
  .dns-map-container {
    height: 280px; /* Reduce height for mobile */
  }

  .dns-map-section {
    padding: 15px;
    margin: 20px 0;
  }

  .map-legend {
    gap: 15px;
    flex-wrap: wrap;
  }
}

@media (min-width: 769px) and (max-width: 1024px) {
  .dns-map-container {
    height: 350px;
  }
}

@media (min-width: 1440px) {
  .dns-map-container {
    height: 450px;
  }
}
