/* Website IP Finder - Cyber Glassmorphism Theme
   Designed & Developed by Rahul Murmu
   © 2026 Website IP Finder */

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600&display=swap');

:root {
  --bg-dark: #070a13;
  --bg-card: rgba(13, 20, 36, 0.65);
  --bg-card-hover: rgba(18, 28, 51, 0.85);
  --bg-input: rgba(10, 16, 30, 0.8);
  
  --primary-cyan: #00f0ff;
  --primary-blue: #3b82f6;
  --primary-purple: #a855f7;
  --accent-pink: #ec4899;
  --accent-green: #10b981;
  --accent-amber: #f59e0b;
  --accent-red: #ef4444;

  --border-cyan: rgba(0, 240, 255, 0.25);
  --border-glow: rgba(0, 240, 255, 0.5);
  --border-subtle: rgba(255, 255, 255, 0.08);

  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;

  --glow-cyan: 0 0 15px rgba(0, 240, 255, 0.4);
  --glow-purple: 0 0 15px rgba(168, 85, 247, 0.4);
  --glow-box: 0 8px 32px 0 rgba(0, 0, 0, 0.5);

  --font-main: 'Poppins', sans-serif;
  --font-code: 'JetBrains Mono', monospace;
  --radius-lg: 16px;
  --radius-md: 12px;
  --radius-sm: 8px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  color-scheme: dark;
}

body {
  font-family: var(--font-main);
  background-color: var(--bg-dark);
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  position: relative;
}

/* Animated Cyber Grid Background */
.cyber-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -2;
  background: 
    radial-gradient(circle at 15% 20%, rgba(0, 240, 255, 0.08) 0%, transparent 40%),
    radial-gradient(circle at 85% 75%, rgba(168, 85, 247, 0.08) 0%, transparent 40%),
    radial-gradient(circle at 50% 50%, rgba(59, 130, 246, 0.05) 0%, transparent 60%),
    var(--bg-dark);
}

.grid-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -1;
  background-image: 
    linear-gradient(rgba(0, 240, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 240, 255, 0.03) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: rgba(7, 10, 19, 0.8);
}
::-webkit-scrollbar-thumb {
  background: rgba(0, 240, 255, 0.3);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--primary-cyan);
}

/* App Container */
.app-container {
  max-width: 1320px;
  width: 100%;
  margin: 0 auto;
  padding: 2rem 1.5rem 6rem 1.5rem;
  flex: 1;
}

/* Glassmorphism Common Card */
.glass-card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-cyan);
  border-radius: var(--radius-lg);
  box-shadow: var(--glow-box);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.glass-card:hover {
  border-color: rgba(0, 240, 255, 0.45);
  box-shadow: 0 10px 40px -10px rgba(0, 240, 255, 0.15), var(--glow-box);
}

/* Header Section */
.app-header {
  text-align: center;
  margin-bottom: 2.5rem;
  position: relative;
}

.header-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 1rem;
  border-radius: 9999px;
  background: rgba(0, 240, 255, 0.1);
  border: 1px solid var(--border-cyan);
  color: var(--primary-cyan);
  font-size: 0.825rem;
  font-weight: 500;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 1rem;
  box-shadow: 0 0 10px rgba(0, 240, 255, 0.2);
}

.header-badge i {
  animation: pulse 2s infinite;
}

.app-title {
  font-size: 2.75rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  background: linear-gradient(135deg, #ffffff 0%, var(--primary-cyan) 50%, var(--primary-purple) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  text-shadow: 0 0 30px rgba(0, 240, 255, 0.3);
}

.title-icon {
  font-size: 2.5rem;
  color: var(--primary-cyan);
  filter: drop-shadow(0 0 10px var(--primary-cyan));
}

.app-subtitle {
  color: var(--primary-cyan);
  font-size: 1.1rem;
  font-weight: 500;
  letter-spacing: 3px;
  text-transform: uppercase;
  text-shadow: 0 0 12px rgba(0, 240, 255, 0.6);
}

/* Search Box Container */
.search-card {
  padding: 2rem;
  margin-bottom: 2.5rem;
  position: relative;
}

.search-form-group {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.input-icon {
  position: absolute;
  left: 1.25rem;
  color: var(--primary-cyan);
  font-size: 1.25rem;
  pointer-events: none;
  filter: drop-shadow(0 0 5px var(--primary-cyan));
}

.domain-input {
  width: 100%;
  padding: 1.1rem 1.25rem 1.1rem 3.25rem;
  background: var(--bg-input);
  border: 1px solid var(--border-cyan);
  border-radius: var(--radius-md);
  color: var(--text-main);
  font-family: var(--font-code);
  font-size: 1.05rem;
  outline: none;
  transition: all 0.3s ease;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.5);
}

.domain-input:focus {
  border-color: var(--primary-cyan);
  box-shadow: 0 0 20px rgba(0, 240, 255, 0.3), inset 0 2px 4px rgba(0, 0, 0, 0.5);
}

.domain-input::placeholder {
  color: var(--text-dim);
}

.quick-suggestions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.suggestion-tag {
  padding: 0.25rem 0.65rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--primary-cyan);
  font-family: var(--font-code);
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.suggestion-tag:hover {
  background: rgba(0, 240, 255, 0.15);
  border-color: var(--primary-cyan);
}

/* Button Group */
.button-group {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.85rem 1.75rem;
  border-radius: var(--radius-md);
  font-family: var(--font-main);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid transparent;
  outline: none;
  user-select: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary-cyan) 0%, var(--primary-blue) 100%);
  color: #050b14;
  box-shadow: 0 4px 15px rgba(0, 240, 255, 0.3);
  flex: 2;
  min-width: 180px;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(0, 240, 255, 0.5);
}

.btn-secondary {
  background: rgba(168, 85, 247, 0.15);
  border-color: rgba(168, 85, 247, 0.4);
  color: #d8b4fe;
  flex: 1;
  min-width: 140px;
}

.btn-secondary:hover {
  background: rgba(168, 85, 247, 0.25);
  border-color: var(--primary-purple);
  box-shadow: var(--glow-purple);
  transform: translateY(-2px);
}

.btn-clear {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--border-subtle);
  color: var(--text-muted);
}

.btn-clear:hover {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.4);
  color: var(--accent-red);
}

/* Quick Action Toolbar Above Results */
.toolbar-card {
  padding: 1rem 1.5rem;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.target-badge {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.target-host {
  font-family: var(--font-code);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary-cyan);
}

.target-ip-chip {
  padding: 0.25rem 0.75rem;
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: var(--accent-green);
  border-radius: var(--radius-sm);
  font-family: var(--font-code);
  font-size: 0.85rem;
}

.toolbar-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.btn-icon-label {
  padding: 0.5rem 0.9rem;
  font-size: 0.85rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: all 0.2s ease;
}

.btn-icon-label:hover {
  background: rgba(0, 240, 255, 0.15);
  border-color: var(--primary-cyan);
  color: var(--primary-cyan);
}

/* Tab Navigation */
.tabs-container {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.75rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border-subtle);
}

.tab-btn {
  padding: 0.75rem 1.25rem;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-muted);
  font-family: var(--font-main);
  font-weight: 500;
  font-size: 0.95rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  white-space: nowrap;
  transition: all 0.25s ease;
}

.tab-btn:hover {
  color: var(--text-main);
}

.tab-btn.active {
  color: var(--primary-cyan);
  border-bottom-color: var(--primary-cyan);
  text-shadow: 0 0 10px rgba(0, 240, 255, 0.5);
}

/* Grid Layouts for Results */
.tab-content {
  display: none;
  animation: fadeIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.tab-content.active {
  display: block;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}

/* Info Card Item */
.info-card {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 0.5rem;
  border-left: 3px solid var(--primary-cyan);
}

.info-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.info-card-header i {
  color: var(--primary-cyan);
  font-size: 1rem;
}

.info-card-value {
  font-family: var(--font-code);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text-main);
  word-break: break-all;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.country-flag {
  width: 24px;
  height: 18px;
  object-fit: cover;
  border-radius: 2px;
  box-shadow: 0 0 4px rgba(0,0,0,0.5);
}

.copy-mini-btn {
  background: transparent;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  padding: 0.2rem 0.4rem;
  font-size: 0.85rem;
  transition: color 0.2s;
  margin-left: auto;
}

.copy-mini-btn:hover {
  color: var(--primary-cyan);
}

/* Leaflet Map Styling */
.map-container-card {
  padding: 1.25rem;
  margin-bottom: 1.5rem;
}

.map-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.map-title {
  font-size: 1.1rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--primary-cyan);
}

#map {
  width: 100%;
  height: 420px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-cyan);
  z-index: 1;
}

/* Custom Pulsing Radar Marker for Leaflet */
.radar-marker {
  width: 24px;
  height: 24px;
  background: var(--primary-cyan);
  border: 2px solid #ffffff;
  border-radius: 50%;
  position: relative;
  box-shadow: 0 0 15px var(--primary-cyan);
}

.radar-marker::after {
  content: '';
  position: absolute;
  top: -10px;
  left: -10px;
  width: 40px;
  height: 40px;
  border: 2px solid var(--primary-cyan);
  border-radius: 50%;
  animation: radarPulse 1.8s infinite ease-out;
  pointer-events: none;
}

@keyframes radarPulse {
  0% {
    transform: scale(0.5);
    opacity: 1;
  }
  100% {
    transform: scale(1.8);
    opacity: 0;
  }
}

/* DNS Records Cards */
.dns-section {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.dns-type-block {
  padding: 1.25rem;
}

.dns-type-title {
  font-family: var(--font-code);
  font-size: 1rem;
  font-weight: 700;
  color: var(--primary-cyan);
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.dns-record-item {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
  margin-bottom: 0.5rem;
  font-family: var(--font-code);
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  word-break: break-all;
}

.dns-record-item:last-child {
  margin-bottom: 0;
}

.dns-ttl {
  font-size: 0.75rem;
  color: var(--text-dim);
  background: rgba(255, 255, 255, 0.05);
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
}

/* WHOIS Section */
.whois-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.25rem;
}

.whois-block {
  padding: 1.25rem;
}

.whois-field-label {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-bottom: 0.25rem;
}

.whois-field-value {
  font-family: var(--font-code);
  font-size: 1.05rem;
  color: var(--text-main);
  font-weight: 600;
}

.status-badge {
  display: inline-block;
  padding: 0.25rem 0.6rem;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  background: rgba(16, 185, 129, 0.15);
  color: var(--accent-green);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

/* Ping Diagnostics & Latency Tool */
.ping-panel {
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.ping-metrics-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.metric-box {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1rem;
  text-align: center;
}

.metric-label {
  color: var(--text-muted);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.35rem;
}

.metric-value {
  font-family: var(--font-code);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-cyan);
}

.ping-chart-wrapper {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border-cyan);
  border-radius: var(--radius-md);
  padding: 1rem;
  position: relative;
  height: 200px;
}

#pingCanvas {
  width: 100%;
  height: 100%;
}

/* History and Favorites */
.history-list, .favorites-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.history-item {
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.history-host {
  font-family: var(--font-code);
  font-weight: 600;
  color: var(--primary-cyan);
  font-size: 1.05rem;
}

.history-ip {
  font-family: var(--font-code);
  color: var(--text-muted);
  font-size: 0.9rem;
}

.history-time {
  font-size: 0.75rem;
  color: var(--text-dim);
}

/* Loading & Empty States */
.loading-overlay {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4rem 2rem;
  text-align: center;
  gap: 1.5rem;
}

.cyber-spinner {
  width: 60px;
  height: 60px;
  border: 4px solid rgba(0, 240, 255, 0.1);
  border-left-color: var(--primary-cyan);
  border-right-color: var(--primary-purple);
  border-radius: 50%;
  animation: cyberSpin 1s linear infinite;
  box-shadow: 0 0 20px rgba(0, 240, 255, 0.4);
}

@keyframes cyberSpin {
  100% {
    transform: rotate(360deg);
  }
}

.loading-text {
  font-family: var(--font-code);
  color: var(--primary-cyan);
  font-size: 1.1rem;
  letter-spacing: 1px;
}

.empty-state {
  text-align: center;
  padding: 3rem 1.5rem;
  color: var(--text-muted);
}

.empty-state i {
  font-size: 3rem;
  color: var(--primary-cyan);
  margin-bottom: 1rem;
  opacity: 0.6;
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  bottom: 80px;
  right: 20px;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  z-index: 9999;
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  padding: 0.9rem 1.4rem;
  background: rgba(13, 20, 36, 0.95);
  backdrop-filter: blur(12px);
  border: 1px solid var(--primary-cyan);
  border-radius: var(--radius-md);
  color: var(--text-main);
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5), var(--glow-cyan);
  animation: toastIn 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.toast-success i { color: var(--accent-green); }
.toast-error i { color: var(--accent-red); }
.toast-info i { color: var(--primary-cyan); }

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.9);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* About Section Card */
.about-card {
  padding: 1.75rem;
  margin-top: 3rem;
}

.about-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary-cyan);
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.about-text {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.7;
}

/* Footer (STRICT SPECIFICATIONS) */
.app-footer {
  width: 100%;
  margin-top: auto;
  padding: 1.5rem 1rem;
  text-align: center;
  background: rgba(10, 15, 29, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid rgba(0, 240, 255, 0.3);
  box-shadow: 0 -5px 25px rgba(0, 240, 255, 0.1);
  position: relative;
  z-index: 100;
  animation: fadeIn 0.8s ease-in-out;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
}

.footer-copyright {
  font-size: 0.875rem;
  color: var(--text-muted);
  font-weight: 400;
}

.footer-developer {
  font-size: 0.925rem;
  font-weight: 600;
  color: var(--primary-cyan);
  text-shadow: 0 0 10px rgba(0, 240, 255, 0.6);
  letter-spacing: 0.5px;
}

.footer-developer span {
  color: #ffffff;
}

.footer-rights {
  font-size: 0.775rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* Responsive Rules */
@media (max-width: 768px) {
  .app-container {
    padding: 1.25rem 1rem 5rem 1rem;
  }

  .app-title {
    font-size: 2rem;
  }

  .app-subtitle {
    font-size: 0.95rem;
    letter-spacing: 2px;
  }

  .search-card {
    padding: 1.25rem;
  }

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

  .btn-primary, .btn-secondary, .btn-clear {
    width: 100%;
  }

  .toolbar-card {
    flex-direction: column;
    align-items: flex-start;
  }

  .info-grid, .whois-card-grid {
    grid-template-columns: 1fr;
  }

  #map {
    height: 300px;
  }
}
