/* ==========================================================================
   SpeedCore.ir - Ultra-Precision Responsive Cyberpunk Dark Stylesheet
   Zero-Footer Minimalist Architecture | 100% Fluid Mobile/Tablet/Desktop/4K
   ========================================================================== */

:root {
  --bg-deep: #030407;
  --bg-surface: #080a10;
  --bg-card: rgba(12, 16, 24, 0.82);
  --bg-card-hover: rgba(18, 24, 36, 0.95);
  
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-active: rgba(0, 242, 254, 0.5);
  --border-focus: #00f2fe;
  
  --neon-cyan: #00f2fe;
  --neon-blue: #4facfe;
  --neon-purple: #8b5cf6;
  --neon-magenta: #d946ef;
  --neon-amber: #f59e0b;
  --neon-green: #10b981;
  
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --text-dim: #475569;
  
  --font-persian: 'Vazirmatn', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-numbers: 'Space Grotesk', 'Vazirmatn', monospace;
  
  --glow-cyan: 0 0 25px rgba(0, 242, 254, 0.3);
  --glow-master: 0 0 45px rgba(0, 242, 254, 0.45), inset 0 0 20px rgba(0, 242, 254, 0.25);
}

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

html {
  font-size: 16px;
  width: 100%;
  overflow-x: hidden;
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg-deep);
  color: var(--text-primary);
  font-family: var(--font-persian);
  min-height: 100vh;
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  position: relative;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  padding-bottom: 40px;
}

.ltr-num {
  font-family: var(--font-numbers);
  direction: ltr;
  display: inline-block;
  font-feature-settings: "tnum";
  font-variant-numeric: tabular-nums;
}

/* Cyberpunk Grid Background */
.cyber-grid {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: 
    linear-gradient(rgba(255, 255, 255, 0.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.018) 1px, transparent 1px);
  background-size: 32px 32px;
  pointer-events: none;
  z-index: 0;
}

/* Ambient Glowing Accents */
.ambient-glow {
  position: fixed;
  border-radius: 50%;
  filter: blur(140px);
  pointer-events: none;
  z-index: 0;
  opacity: 0.15;
}

.glow-cyan {
  width: min(500px, 80vw);
  height: min(500px, 80vw);
  background: radial-gradient(circle, #00f2fe 0%, transparent 70%);
  top: -150px;
  right: -80px;
}

.glow-magenta {
  width: min(550px, 80vw);
  height: min(550px, 80vw);
  background: radial-gradient(circle, #8b5cf6 0%, transparent 70%);
  bottom: 5%;
  left: -150px;
}

.container {
  width: 100%;
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 18px;
  position: relative;
  z-index: 1;
}

/* --------------------------------------------------------------------------
   Toast Notifications
   -------------------------------------------------------------------------- */
.toast-container {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
  max-width: calc(100vw - 40px);
}

.toast {
  background: rgba(15, 22, 35, 0.95);
  border: 1px solid var(--neon-cyan);
  color: #fff;
  padding: 10px 16px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 500;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.8), 0 0 15px rgba(0, 242, 254, 0.3);
  display: flex;
  align-items: center;
  gap: 8px;
  backdrop-filter: blur(12px);
  animation: slideToast 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  pointer-events: auto;
}

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

/* --------------------------------------------------------------------------
   Header / Navbar
   -------------------------------------------------------------------------- */
.navbar {
  border-bottom: 1px solid var(--border-subtle);
  background: rgba(3, 4, 7, 0.88);
  backdrop-filter: blur(20px);
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 12px 0;
  width: 100%;
}

.nav-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text-primary);
  flex-shrink: 0;
}

.logo-mark {
  width: 36px;
  height: 36px;
  filter: drop-shadow(0 0 10px rgba(0, 242, 254, 0.5));
  transition: transform 0.3s ease;
}

.brand-logo:hover .logo-mark {
  transform: scale(1.08) rotate(6deg);
}

.brand-name-wrap {
  display: flex;
  flex-direction: column;
}

.brand-name {
  font-family: var(--font-numbers);
  font-size: 19px;
  font-weight: 800;
  letter-spacing: 1.2px;
  line-height: 1.1;
}

.brand-core {
  background: linear-gradient(135deg, var(--neon-cyan), var(--neon-blue));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-tag {
  font-size: 10px;
  color: var(--text-muted);
  letter-spacing: 1px;
  direction: ltr;
  text-align: right;
}

/* Center Nav Tabs */
.nav-tabs {
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  padding: 4px;
  border-radius: 50px;
  gap: 4px;
}

.nav-tab {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-family: var(--font-persian);
  font-size: 13px;
  font-weight: 600;
  padding: 7px 16px;
  border-radius: 40px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.25s ease;
  white-space: nowrap;
}

.nav-tab:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.05);
}

.nav-tab.active {
  background: linear-gradient(135deg, rgba(0, 242, 254, 0.16), rgba(79, 172, 254, 0.16));
  color: var(--neon-cyan);
  border: 1px solid rgba(0, 242, 254, 0.4);
  box-shadow: 0 0 15px rgba(0, 242, 254, 0.2);
}

.nav-badge {
  font-size: 10px;
  background: var(--neon-magenta);
  color: #fff;
  padding: 1px 6px;
  border-radius: 10px;
  font-weight: 700;
}

.nav-actions {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.server-status-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.3);
  padding: 5px 12px;
  border-radius: 50px;
  font-size: 12px;
  color: var(--neon-green);
  white-space: nowrap;
}

.status-dot {
  width: 7px;
  height: 7px;
  background-color: var(--neon-green);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--neon-green);
  animation: pulseDot 2s infinite ease-in-out;
}

@keyframes pulseDot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.35; transform: scale(0.7); }
}

/* --------------------------------------------------------------------------
   Main Content Wrappers
   -------------------------------------------------------------------------- */
.main-wrapper {
  flex: 1;
  padding: 22px 0 30px;
  width: 100%;
}

.view-panel {
  display: none;
  animation: fadeInPanel 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  width: 100%;
}

.view-panel.active {
  display: block;
}

@keyframes fadeInPanel {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* --------------------------------------------------------------------------
   VIEW 1: SPEEDTEST STAGE
   -------------------------------------------------------------------------- */
.metrics-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 22px;
  width: 100%;
}

.metric-box {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  padding: 16px;
  backdrop-filter: blur(16px);
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
  min-width: 0;
}

.metric-box::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 2px;
  background: transparent;
  transition: background 0.3s ease;
}

.metric-box.active-running {
  border-color: var(--border-active);
  box-shadow: var(--glow-cyan);
}

.metric-box.active-running::before {
  background: linear-gradient(90deg, var(--neon-cyan), var(--neon-blue));
}

.metric-top {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.metric-icon-wrap {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.icon-ping { color: var(--neon-amber); background: rgba(245, 158, 11, 0.12); }
.icon-jitter { color: var(--neon-purple); background: rgba(139, 92, 246, 0.12); }
.icon-download { color: var(--neon-cyan); background: rgba(0, 242, 254, 0.12); }
.icon-upload { color: var(--neon-magenta); background: rgba(217, 70, 239, 0.12); }

.metric-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  white-space: nowrap;
}

.metric-digits {
  display: flex;
  align-items: baseline;
  gap: 4px;
  margin-bottom: 2px;
}

.metric-num {
  font-size: clamp(22px, 3.2vw, 34px);
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.5px;
  line-height: 1.1;
}

.metric-dim {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 600;
}

.metric-sub {
  font-size: 11px;
  color: var(--text-dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Speedometer Stage */
.stage-section {
  display: flex;
  justify-content: center;
  margin-bottom: 22px;
  width: 100%;
}

.gauge-card {
  width: 100%;
  max-width: 780px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 22px;
  padding: 22px 14px;
  backdrop-filter: blur(20px);
  display: flex;
  flex-direction: column;
  align-items: center;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
}

.gauge-viewport {
  position: relative;
  width: min(440px, 88vw);
  height: min(400px, 80vw);
  display: flex;
  align-items: center;
  justify-content: center;
}

#gaugeCanvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.gauge-center-content {
  position: absolute;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

/* Master GO Button */
.master-go-btn {
  width: clamp(130px, 36vw, 170px);
  height: clamp(130px, 36vw, 170px);
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #182030, #090c14);
  border: 2px solid rgba(0, 242, 254, 0.45);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  outline: none;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-shadow: var(--glow-master);
}

.master-go-btn:hover {
  transform: scale(1.05);
  border-color: var(--neon-cyan);
  box-shadow: 0 0 50px rgba(0, 242, 254, 0.6), inset 0 0 25px rgba(0, 242, 254, 0.35);
}

.master-go-btn:active {
  transform: scale(0.97);
}

.go-label {
  font-family: var(--font-numbers);
  font-size: clamp(34px, 8vw, 46px);
  font-weight: 800;
  letter-spacing: 2px;
  background: linear-gradient(135deg, #ffffff, var(--neon-cyan));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1;
}

.go-hint {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 4px;
  font-weight: 600;
}

.ring-pulse, .ring-pulse-outer {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(0, 242, 254, 0.35);
  top: -12px;
  left: -12px;
  right: -12px;
  bottom: -12px;
  pointer-events: none;
  animation: pulseRing 3s infinite ease-out;
}

.ring-pulse-outer {
  top: -24px;
  left: -24px;
  right: -24px;
  bottom: -24px;
  border-color: rgba(79, 172, 254, 0.2);
  animation-delay: 1.5s;
}

@keyframes pulseRing {
  0% { transform: scale(0.95); opacity: 0.8; }
  100% { transform: scale(1.22); opacity: 0; }
}

/* Live Readout during test */
.live-readout {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.readout-phase {
  font-size: 13px;
  color: var(--neon-cyan);
  margin-bottom: 4px;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.readout-speed {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 6px;
}

.speed-val {
  font-size: clamp(36px, 10vw, 60px);
  font-weight: 800;
  color: #fff;
  line-height: 1;
  text-shadow: 0 0 25px rgba(0, 242, 254, 0.6);
}

.speed-unit {
  font-size: 15px;
  color: var(--text-secondary);
  font-weight: 700;
}

.readout-progress {
  width: 120px;
  height: 4px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  margin-top: 10px;
  overflow: hidden;
}

.readout-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--neon-cyan), var(--neon-blue));
  transition: width 0.15s ease-out;
}

/* Real-Time Wave Chart */
.wave-chart-box {
  width: 100%;
  max-width: 720px;
  background: rgba(8, 11, 18, 0.7);
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  padding: 12px 16px;
  margin-top: 8px;
}

.wave-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.wave-title {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  color: var(--text-secondary);
}

.wave-led {
  width: 6px;
  height: 6px;
  background-color: var(--neon-cyan);
  border-radius: 50%;
  box-shadow: 0 0 6px var(--neon-cyan);
}

.wave-status {
  font-size: 11px;
  color: var(--text-dim);
}

.wave-canvas-wrap {
  width: 100%;
  height: 95px;
}

#liveChartCanvas {
  width: 100% !important;
  height: 100% !important;
  display: block;
}

/* Quick Glance Bar */
.network-glance-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 22px;
  width: 100%;
}

.glance-item {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: border-color 0.2s ease;
  min-width: 0;
}

.glance-item:hover {
  border-color: rgba(255, 255, 255, 0.15);
}

.glance-label {
  font-size: 11px;
  color: var(--text-dim);
  margin-bottom: 2px;
}

.glance-val {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}

.glance-val-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.mini-copy-btn {
  background: rgba(255, 255, 255, 0.08);
  border: none;
  border-radius: 6px;
  padding: 2px 8px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--text-secondary);
  font-family: var(--font-persian);
  font-size: 11px;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  flex-shrink: 0;
}

.mini-copy-btn:hover {
  background: rgba(0, 242, 254, 0.2);
  color: var(--neon-cyan);
}

/* Results Card */
.results-modal-card {
  background: linear-gradient(135deg, rgba(0, 242, 254, 0.12), rgba(139, 92, 246, 0.12));
  border: 1px solid rgba(0, 242, 254, 0.35);
  border-radius: 18px;
  padding: 20px;
  margin-bottom: 26px;
  animation: fadeInPanel 0.4s ease-out;
  width: 100%;
}

.results-modal-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.results-badge {
  display: inline-block;
  background: rgba(16, 185, 129, 0.15);
  color: var(--neon-green);
  border: 1px solid rgba(16, 185, 129, 0.3);
  font-size: 12px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 30px;
  margin-bottom: 6px;
}

.results-text-group h3 {
  font-size: 17px;
  color: #fff;
  margin-bottom: 4px;
}

.results-text-group p {
  font-size: 13px;
  color: var(--text-secondary);
}

.results-btns {
  display: flex;
  gap: 10px;
  flex-shrink: 0;
}

.btn-neon-primary, .btn-dark-secondary {
  border: none;
  border-radius: 12px;
  padding: 10px 18px;
  font-family: var(--font-persian);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-neon-primary {
  background: linear-gradient(135deg, var(--neon-cyan), var(--neon-blue));
  color: #030407;
}

.btn-neon-primary:hover {
  filter: brightness(1.15);
  box-shadow: 0 0 25px rgba(0, 242, 254, 0.5);
}

.btn-dark-secondary {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
  border: 1px solid var(--border-subtle);
}

.btn-dark-secondary:hover {
  background: rgba(255, 255, 255, 0.16);
}

/* --------------------------------------------------------------------------
   VIEW 2: MY IP & NETWORK INTELLIGENCE
   -------------------------------------------------------------------------- */
.ip-search-section {
  margin-bottom: 20px;
  width: 100%;
}

.search-box-wrap {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  padding: 14px 18px;
  backdrop-filter: blur(16px);
  width: 100%;
}

.search-input-group {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(5, 7, 12, 0.85);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 6px 12px;
  transition: border-color 0.2s ease;
  width: 100%;
}

.search-input-group:focus-within {
  border-color: var(--border-focus);
  box-shadow: 0 0 15px rgba(0, 242, 254, 0.2);
}

.search-icon {
  color: var(--text-muted);
  display: flex;
  flex-shrink: 0;
}

.search-input-group input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: #fff;
  font-family: var(--font-numbers);
  font-size: 14px;
  padding: 6px 0;
  min-width: 0;
}

.search-input-group input::placeholder {
  font-family: var(--font-persian);
  color: var(--text-dim);
  font-size: 12px;
  direction: rtl;
}

.search-submit-btn {
  background: linear-gradient(135deg, var(--neon-cyan), var(--neon-blue));
  border: none;
  color: #030407;
  font-family: var(--font-persian);
  font-size: 13px;
  font-weight: 700;
  padding: 8px 16px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  flex-shrink: 0;
}

.search-submit-btn:hover {
  filter: brightness(1.15);
}

.search-hint {
  font-size: 11px;
  color: var(--text-dim);
  margin-top: 8px;
}

/* Hero IP Card */
.hero-ip-card {
  background: radial-gradient(circle at 50% 0%, rgba(0, 242, 254, 0.1), rgba(12, 16, 24, 0.85) 70%);
  border: 1px solid rgba(0, 242, 254, 0.3);
  border-radius: 20px;
  padding: 22px 18px;
  backdrop-filter: blur(20px);
  margin-bottom: 22px;
  position: relative;
  overflow: hidden;
  width: 100%;
}

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

.hero-ip-badges {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.ip-type-pill {
  background: rgba(0, 242, 254, 0.15);
  color: var(--neon-cyan);
  border: 1px solid rgba(0, 242, 254, 0.35);
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 30px;
  font-family: var(--font-numbers);
}

.ip-conn-pill {
  background: rgba(139, 92, 246, 0.15);
  color: var(--neon-purple);
  border: 1px solid rgba(139, 92, 246, 0.35);
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 30px;
}

.hero-quick-tools {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.tool-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  font-family: var(--font-persian);
  font-size: 11px;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.tool-btn:hover {
  background: rgba(0, 242, 254, 0.15);
  border-color: var(--neon-cyan);
  color: var(--neon-cyan);
}

.hero-ip-main {
  text-align: center;
  padding: 10px 0;
  width: 100%;
}

.hero-ip-label {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 500;
}

.hero-ip-display {
  font-size: clamp(22px, 6vw, 48px);
  font-weight: 800;
  color: #fff;
  letter-spacing: 1px;
  text-shadow: 0 0 30px rgba(0, 242, 254, 0.5);
  margin: 6px 0;
  word-break: break-all;
  overflow-wrap: anywhere;
  line-height: 1.25;
}

.hero-ip-sub {
  font-size: 12px;
  color: var(--text-dim);
}

/* Network Intelligence Grid */
.intel-grid-section {
  margin-bottom: 25px;
  width: 100%;
}

.section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  color: #fff;
  font-weight: 700;
  margin-bottom: 14px;
}

.intel-cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 14px;
  width: 100%;
}

.intel-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  padding: 14px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  transition: border-color 0.2s ease;
  min-width: 0;
}

.intel-card:hover {
  border-color: rgba(255, 255, 255, 0.15);
}

.intel-card-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.icon-geo { color: #00f2fe; background: rgba(0, 242, 254, 0.12); }
.icon-isp { color: #10b981; background: rgba(16, 185, 129, 0.12); }
.icon-asn { color: #f59e0b; background: rgba(245, 158, 11, 0.12); }
.icon-time { color: #8b5cf6; background: rgba(139, 92, 246, 0.12); }
.icon-dns { color: #ec4899; background: rgba(236, 72, 153, 0.12); }
.icon-client { color: #38bdf8; background: rgba(56, 189, 248, 0.12); }

.intel-card-content {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  width: 100%;
  min-width: 0;
}

.intel-label {
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 2px;
}

.intel-val {
  font-size: 13.5px;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}

.intel-extra {
  font-size: 11px;
  color: var(--text-dim);
  margin-top: 2px;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}

.ua-display-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  padding: 14px 16px;
  width: 100%;
}

.ua-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  gap: 10px;
  flex-wrap: wrap;
}

.ua-title {
  font-size: 12px;
  color: var(--text-muted);
}

.ua-code {
  font-size: 11px;
  color: var(--text-secondary);
  background: rgba(5, 7, 12, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.05);
  padding: 8px 12px;
  border-radius: 8px;
  word-break: break-all;
  overflow-wrap: anywhere;
  line-height: 1.5;
}

/* --------------------------------------------------------------------------
   SEO KNOWLEDGE BASE
   -------------------------------------------------------------------------- */
.seo-knowledge-base {
  border-top: 1px solid var(--border-subtle);
  padding-top: 35px;
  margin-top: 22px;
  width: 100%;
}

.knowledge-header {
  text-align: center;
  margin-bottom: 25px;
}

.knowledge-header h2 {
  font-size: clamp(18px, 4vw, 24px);
  font-weight: 800;
  margin-bottom: 6px;
  background: linear-gradient(135deg, #ffffff, #cbd5e1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.knowledge-header p {
  color: var(--text-muted);
  font-size: 13px;
}

.knowledge-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin-bottom: 25px;
  width: 100%;
}

.knowledge-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  padding: 18px;
  transition: transform 0.2s ease;
  min-width: 0;
}

.knowledge-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.14);
}

.card-badge-top {
  display: inline-block;
  background: rgba(0, 242, 254, 0.1);
  color: var(--neon-cyan);
  padding: 3px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  margin-bottom: 8px;
}

.knowledge-card h3 {
  font-size: 15px;
  margin-bottom: 6px;
  color: #fff;
}

.knowledge-card p {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* FAQ Accordion */
.faq-container {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  padding: 20px 16px;
  width: 100%;
}

.faq-main-title {
  font-size: 15px;
  color: #fff;
  margin-bottom: 14px;
}

.faq-item {
  border-bottom: 1px solid var(--border-subtle);
  padding: 10px 0;
}

.faq-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.faq-item summary {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-primary);
  cursor: pointer;
  outline: none;
  user-select: none;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.faq-item summary::after {
  content: '+';
  font-size: 20px;
  color: var(--neon-cyan);
  flex-shrink: 0;
}

.faq-item[open] summary::after {
  content: '−';
}

.faq-item p {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 8px;
  line-height: 1.7;
}

/* --------------------------------------------------------------------------
   RESPONSIVE DESIGN (MEDIA QUERIES)
   -------------------------------------------------------------------------- */
@media (max-width: 900px) {
  .intel-cards-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .metrics-row {
    grid-template-columns: repeat(2, 1fr);
  }

  .network-glance-bar {
    grid-template-columns: repeat(2, 1fr);
  }

  .knowledge-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 580px) {
  .container {
    padding: 0 12px;
  }

  .navbar {
    padding: 10px 0;
  }

  .nav-content {
    flex-wrap: wrap;
    gap: 10px;
  }

  .nav-tabs {
    order: 3;
    width: 100%;
    justify-content: center;
  }

  .nav-tab {
    flex: 1;
    justify-content: center;
    padding: 7px 10px;
    font-size: 12px;
  }

  .metrics-row {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }

  .metric-box {
    padding: 12px 10px;
    border-radius: 12px;
  }

  .metric-num {
    font-size: 20px;
  }

  .metric-title {
    font-size: 11px;
  }

  .metric-dim {
    font-size: 11px;
  }

  .metric-sub {
    font-size: 10px;
  }

  .gauge-viewport {
    width: min(310px, 92vw);
    height: min(290px, 86vw);
  }

  .master-go-btn {
    width: min(130px, 38vw);
    height: min(130px, 38vw);
  }

  .go-label {
    font-size: 32px;
  }

  .speed-val {
    font-size: 38px;
  }

  .network-glance-bar {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .intel-cards-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .search-input-group {
    flex-direction: column;
    align-items: stretch;
    padding: 8px;
  }

  .search-input-group input {
    width: 100%;
    padding: 4px;
    text-align: center;
  }

  .search-submit-btn {
    width: 100%;
    text-align: center;
  }

  .hero-ip-header {
    flex-direction: column;
    align-items: center;
  }

  .hero-ip-badges, .hero-quick-tools {
    justify-content: center;
    width: 100%;
  }

  .results-modal-inner {
    flex-direction: column;
    text-align: center;
  }

  .results-btns {
    width: 100%;
    flex-direction: column;
  }

  .results-btns button {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 360px) {
  .metric-sub {
    display: none;
  }
  
  .hero-ip-display {
    font-size: 20px;
  }
}
