@import url('https://fonts.googleapis.com/css2?family=HK+Grotesk:wght@400;600;700&family=Montserrat:wght@400;600;700&family=Roboto:wght@400;500;700&display=swap');
:root {
  --primary-color: #3a86ff;
  --secondary-color: #8338ec;
  --success-color: #06d6a0;
  --warning-color: #ffbe0b;
  --danger-color: #ef476f;
  --dark-color: #1e293b;
  --light-color: #f8f9fa;
  --gray-color: #6c757d;
  --border-radius: 8px;
  --box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

* {
  margin: 0;
  padding: 0;
  /* box-sizing: border-box; */
  font-family: 'Roboto', 'HK Grotesk', 'Montserrat', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}
body {
  background-color: #0a0e17;
  color: #fff;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  /* justify-content: center; */
}
.circuit-bg {
  position: fixed;
  top: 0; left: 0; width: 100vw; height: 100vh;
  background-image: 
    linear-gradient(0deg, rgba(0, 183, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 183, 255, 0.05) 1px, transparent 1px);
  background-size: 30px 30px;
  z-index: 1;
  pointer-events: none;
}
.circuit-overlay {
  position: fixed;
  top: 0; left: 0; width: 100vw; height: 100vh;
  background: 
    radial-gradient(circle at 20% 30%, rgba(0, 183, 255, 0.15) 0%, transparent 25%),
    radial-gradient(circle at 80% 70%, rgba(0, 183, 255, 0.1) 0%, transparent 25%);
  z-index: 2;
  pointer-events: none;
}
.circuit-lines {
  position: fixed;
  top: 0; left: 0; width: 100vw; height: 100vh;
  z-index: 1;
  pointer-events: none;
}
.circuit-lines::before {
  content: '';
  position: absolute;
  top: 15%; left: 0; height: 1px; width: 100%;
  background: linear-gradient(90deg, transparent, rgba(0,183,255,0.2), transparent);
}
.circuit-lines::after {
  content: '';
  position: absolute;
  bottom: 15%; left: 0; height: 1px; width: 100%;
  background: linear-gradient(90deg, transparent, rgba(0,183,255,0.2), transparent);
}
.node {
  position: fixed;
  width: 6px; height: 6px;
  background-color: rgba(0, 183, 255, 0.3);
  border-radius: 50%;
  z-index: 2;
  pointer-events: none;
}
.node-1 { top: 20%; left: 15%; box-shadow: 0 0 10px rgba(0, 183, 255, 0.5); }
.node-2 { top: 75%; left: 22%; box-shadow: 0 0 10px rgba(0, 183, 255, 0.5); }
.node-3 { top: 30%; right: 18%; box-shadow: 0 0 10px rgba(0, 183, 255, 0.5); }
.node-4 { top: 65%; right: 25%; box-shadow: 0 0 10px rgba(0, 183, 255, 0.5); }
.node-line {
  position: fixed;
  height: 1px;
  background: linear-gradient(90deg, rgba(0, 183, 255, 0.05), rgba(0, 183, 255, 0.2), rgba(0, 183, 255, 0.05));
  transform-origin: left center;
  z-index: 2;
  pointer-events: none;
}
.node-line-1 { top: calc(20% + 3px); left: calc(15% + 3px); width: 25vw; transform: rotate(15deg); }
.node-line-2 { top: calc(75% + 3px); left: calc(22% + 3px); width: 20vw; transform: rotate(-10deg); }
.node-line-3 { top: calc(30% + 3px); right: calc(18% + 3px); width: 20vw; transform: rotate(165deg); }
.node-line-4 { top: calc(65% + 3px); right: calc(25% + 3px); width: 15vw; transform: rotate(-160deg); }
.card, .error-card {
  background-color: rgba(20, 24, 36, 0.98);
  color: #fff;
  box-shadow: 0 4px 24px rgba(0,183,255,0.08);
  border: 1px solid rgba(0,183,255,0.08);
}
.header-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
  width: 100%;
  height: 5.5rem;
  position: relative;
  z-index: 20;
  gap: 2rem;
}
.header-container .logo {
  flex: 0 0 auto;
  justify-content: flex-start;
}
header {
  background: rgba(10, 14, 23, 0.98);
  box-shadow: 0 2px 24px #00b7ff22;
  position: sticky;
  top: 0;
  width: 100vw;
  z-index: 100;
  border-bottom: 1px solid #00b7ff22;
}
.logo {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  font-size: 1.7rem;
  font-weight: 700;
  color: #00b7ff;
  letter-spacing: 1px;
  height: 2.5rem;
  line-height: 2.5rem;
  white-space: nowrap;
}
.logo-img {
  height: 2.5rem;
  width: auto;
  filter: drop-shadow(0 0 8px #00b7ff80);
  display: block;
}
.logo-title {
  color: #00b7ff;
  font-weight: 700;
  font-size: 1.3rem;
  letter-spacing: 1px;
  text-shadow: 0 0 8px #00b7ff33;
  font-family: 'HK Grotesk', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  line-height: 2.5rem;
  white-space: nowrap;
  display: block;
}
.search-form {
  display: flex;
  align-items: center;
  background: #101624;
  border-radius: 8px;
  box-shadow: 0 2px 8px #00b7ff22;
  border: 1px solid #00b7ff33;
  overflow: hidden;
  width: 420px;
  max-width: 100%;
  margin-left: 2rem;
  height: 3.2rem;
  margin-right: 0;
}
.search-input {
  flex-grow: 1;
  padding: 0.9rem 1.2rem;
  background: transparent;
  color: #fff;
  border: none;
  font-size: 1.08rem;
  font-family: 'HK Grotesk', 'Montserrat', 'Roboto', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  height: 100%;
  direction: ltr;
  unicode-bidi: plaintext;
}
.search-input:focus {
  outline: none;
  background: #181e2a;
}
.search-button {
  background: #00b7ff;
  color: #fff;
  border: none;
  border-radius: 0 8px 8px 0;
  padding: 0 1.5rem;
  font-weight: 600;
  font-size: 1.08rem;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
  display: flex;
  align-items: center;
  height: 100%;
  min-height: 100%;
  min-width: 3.2rem;
}
.search-button svg {
  margin-right: 0.5rem;
  width: 1.2em;
  height: 1.2em;
}
.search-button:hover {
  background: #0099cc;
  color: #fff;
}
.classification-tag {
  background: #00b7ff22;
  color: #00b7ff;
  display: inline-block;
  padding: 0.4em 1em;
  border-radius: 6px;
  font-weight: 600;
  font-size: 1.05rem;
  margin-top: 1.1rem;
}
.threat-bar {
  background: #1a2233;
}
.threat-fill {
  background: #00b7ff;
}
.download-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(90deg, #00b7ff 60%, #0099cc 100%);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 1rem 1.7rem;
  font-size: 1.08rem;
  font-weight: 600;
  text-align: center;
  cursor: pointer;
  text-decoration: none;
  box-shadow: 0 0 12px #00b7ff55;
  margin-top: 1.2rem;
  transition: background 0.2s, box-shadow 0.2s, color 0.2s;
  gap: 0.6rem;
}
.download-button:hover {
  background: linear-gradient(90deg, #0099cc 60%, #00b7ff 100%);
  color: #fff;
  box-shadow: 0 0 18px #00b7ff99;
}
.download-button svg {
  margin-right: 0.5rem;
  width: 1.2em;
  height: 1.2em;
}
.ip-info-label {
  color: #00b7ffbb;
}
.port-date, .traffic-date {
  color: #b0b8c4;
}
.activity-viz {
  background: #181e2a;
  border: 1px solid #00b7ff22;
}
.activity-bar {
  background: #00b7ff;
}
.error-card {
  background: #2a0e17;
  border-left: 4px solid #ef476f;
  color: #fff;
}
.error-title {
  color: #ef476f;
}
.error-message {
  color: #fff;
}
main {
  width: 100%;
  max-width: 1200px;
  margin: 1rem auto;
  /* padding: 0 1.5rem; */
  z-index: 10;
  position: relative;
}
.grid-container {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 2.5rem;
  align-items: flex-start;
}
.left-column, .right-column {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}
.card {
  margin-bottom: 0;
  padding: 2rem 1.5rem;
  border-radius: 12px;
  box-shadow: 0 4px 24px #00b7ff22;
  border: 1px solid #00b7ff22;
  background: rgba(20, 24, 36, 0.98);
  position: relative;
  z-index: 10;
}
.card-title {
  font-size: 1.3rem;
  font-weight: 600;
  margin-bottom: 1.2rem;
  color: #00b7ff;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.card-content {
  margin-top: 0.5rem;
}
.ip-header {
  margin-bottom: 0.5rem;
  padding-bottom: 1.2rem;
  border-bottom: 1px solid #00b7ff22;
  text-align: left;
}
.ip-title {
  font-size: 1.2rem;
  font-weight: 600;
  color: #b0b8c4;
  margin-bottom: 0.3rem;
}
.ip-address {
  font-size: 2.2rem;
  font-weight: 800;
  color: #00b7ff;
  margin-bottom: 0.2rem;
  letter-spacing: 1px;
}
.traffic-block {
  background: #101624;
  border: 1px solid #00b7ff33;
  border-radius: 6px;
  font-family: 'Fira Mono', 'Consolas', 'Menlo', 'Monaco', monospace;
  font-size: 0.98rem;
  color: #b0eaff;
  padding: 1rem;
  margin-bottom: 1.2rem;
  white-space: pre-wrap;
  overflow-x: auto;
  box-shadow: 0 2px 8px #00b7ff11;
}
.activity-viz-canvas {
  width: 100% !important;
  height: 150px !important;
  display: block;
  background: transparent;
  margin-bottom: 0.5rem;
}
.card-content .ip-info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.4rem;
  gap: 1.2rem;
}
.card-content .ip-info-label {
  color: #b0b8c4;
  font-weight: 500;
  font-size: 1.05rem;
}

.card-content .ip-info-value {
    text-align: right;
}

#port-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.port-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.4rem 0;
  border-bottom: 1px solid #222a3a;
  font-size: 1.08rem;
  gap: 1.2rem;
}

.port-info {
    font-weight: bold;
}


/* Homepage-specific overrides for layout and spacing */
.container {
  width: 100%;
  max-width: 1200px;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 3;
  justify-content: center;
}
.logo {
  height: auto;
  filter: drop-shadow(0 0 15px rgba(0, 183, 255, 0.4));
}
h1 {
  font-size: 3rem;
  margin-bottom: 1rem;
  text-align: center;
  font-weight: 600;
  letter-spacing: 1px;
  text-shadow: 0 0 10px rgba(0, 183, 255, 0.3);
}
.subheadline {
  font-size: 1.2rem;
  text-align: center;
  margin-bottom: 3rem;
  color: #b0b8c4;
  max-width: 600px;
  line-height: 1.6;
}
.input-group {
  display: flex;
  width: 100%;
  max-width: 500px;
  margin: 0 auto 1.2rem auto;
  background: #101624;
  border-radius: 8px;
  box-shadow: 0 2px 8px #00b7ff22;
  border: 1px solid #00b7ff33;
  overflow: hidden;
  align-items: stretch;
}
.input-group input[type="email"] {
  flex: 1 1 0%;
  padding: 0.9rem 1.2rem;
  background: transparent;
  color: #fff;
  border: none;
  font-size: 1.08rem;
  font-family: inherit;
  height: 100%;
  min-width: 0;
}
.input-group button {
  flex: 0 0 auto;
  height: inherit;
  align-self: stretch;
  width: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #00b7ff;
  color: #fff;
  border: none;
  border-radius: 0 8px 8px 0;
  padding: 0 2.2rem;
  font-weight: 700;
  font-size: 1.18rem;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
  min-width: 6.5rem;
}
.pricing-row {
  display: flex;
  flex-direction: row;
  gap: 2rem;
  justify-content: center;
  align-items: stretch;
  flex-wrap: wrap;
  margin-top: 2.5rem;
  width: 100%;
}
.pricing-row .card {
  min-width: 200px;
  max-width: 220px;
  flex: 1 1 300px;
}
.pro-card {
  border: 2px solid #00b7ff;
  box-shadow: 0 0 24px #00b7ff33;
}
@media (max-width: 1000px) {
  .grid-container {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .left-column, .right-column {
    flex-direction: column;
    gap: 2rem;
  }
}
@media (max-width: 900px) {
  .header-container {
    flex-direction: column;
    align-items: stretch;
    height: auto;
    gap: 1rem;
    max-width: 100%;
    padding: 1rem 0.5rem;
  }
  .header-container .search-form {
    margin-left: 0;
    width: 100%;
    max-width: 100%;
  }
}
@media (max-width: 800px) {
  .header-container {
    flex-direction: column;
    align-items: stretch;
    height: auto;
    gap: 1rem;
  }
  .header-container .search-form {
    margin-left: 0;
    width: 100%;
    max-width: 100%;
  }
}
@media (max-width: 600px) {
  body {
    padding: 0;
  }
  main {
    padding: 0 0.5rem;
  }
  .card {
    padding: 1.2rem 0.7rem;
  }
  .ip-header {
    padding-bottom: 1rem;
  }
  .container {
    padding: 1rem 0.5rem;
  }
  .logo {
    width: 140px;
  }
  h1 {
    font-size: 2rem;
  }
  .subheadline {
    font-size: 1rem;
  }
  .input-group {
    flex-direction: column;
    max-width: 100%;
    align-items: stretch;
  }
  .input-group input[type="email"] {
    border-radius: 8px 8px 0 0;
  }
  .input-group button {
    border-radius: 0 0 8px 8px;
    width: 100%;
    min-width: unset;
    height: 3rem;
  }
  .login-container {
    min-width: unset;
    padding: 1.2rem 0.5rem 1rem 0.5rem;
  }
  .login-container .logo-img {
    height: 2.2rem;
  }
  .login-container h1 {
    font-size: 1.1rem;
  }
  .oauth-btn {
    font-size: 1rem;
    padding: 0.8rem 1.1rem;
  }
}
/* Login page specific overrides */
body.login-page {
  background: #0a0e17;
  color: #fff;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'HK Grotesk', 'Montserrat', 'Roboto', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  margin: 0;
}
.login-container {
  background: rgba(20, 24, 36, 0.98);
  border-radius: 16px;
  box-shadow: 0 4px 24px #00b7ff22;
  padding: 2.5rem 2rem 2rem 2rem;
  min-width: 340px;
  max-width: 95vw;
  text-align: center;
  position: relative;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.2rem;
}
.login-container .logo-img {
  height: 5rem;
  margin-bottom: 1.2rem;
  filter: drop-shadow(0 0 8px #00b7ff80);
}
.login-container h1 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  color: #00b7ff;
  letter-spacing: 1px;
  text-align: center;
}
.oauth-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.7rem;
  background: linear-gradient(90deg, #00b7ff 60%, #0099cc 100%);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 1rem 1.7rem;
  font-size: 1.08rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 0 12px #00b7ff55;
  margin-top: 1.2rem;
  transition: background 0.2s, box-shadow 0.2s, color 0.2s;
  text-decoration: none;
}
.oauth-btn:hover {
  background: linear-gradient(90deg, #0099cc 60%, #00b7ff 100%);
  color: #fff;
  box-shadow: 0 0 18px #00b7ff99;
}
.oauth-icon {
  width: 1.5em;
  height: 1.5em;
  vertical-align: middle;
}
.login-error {
  color: #ef476f;
  margin-top: 1rem;
  font-size: 1rem;
}

.traffic-header {
  padding-bottom: .5rem;
}

.traffic-title-group{
  font-weight: bold;
}

/* Sparkline styling for traffic activity (yellow, right-aligned, monospace) */
.traffic-header span:last-child {
  font-family: monospace;
  font-size: 1.1em;
  color: #ffe066;
  margin-left: 1em;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  letter-spacing: 0.05em;
}
.traffic-header .activity-label {
  font-size: 0.95em;
  font-weight: 600;
  margin-right: 0.5em;
  color: #ffe066;
}
