body {
  font-family: 'Fira Mono', 'Consolas', monospace;
  background: linear-gradient(135deg, #111 60%, #003322 100%);
  background-attachment: fixed; /* Keep background fixed on scroll */
  color: #00ff00;
  margin: 0;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start; /* was center – prevents overlap, lets footer sit below */
  min-height: 100vh;
  box-sizing: border-box;
  overflow-x: hidden;
}

html {
  height: 100%;
  box-sizing: border-box;
}

*, *:before, *:after {
  box-sizing: inherit;
}

h1 {
  text-align: center;
  font-size: 2rem;
  margin-bottom: 1.5rem;
  color: #00ff00;
}

h2 {
  font-size: 1.5rem;
  margin: 1rem 0;
  color: #00ff00;
}

img[alt="Varonis Threat Labs Logo"] {
  background: #111;
  border-radius: 12px;
  display: block;
  margin: 0 auto 2rem auto;
  width: auto;            /* was 100% */
  max-width: 240px;       /* was 340px */
  box-shadow: 0 0 0 4px #111;
  outline: 2px solid #00ff00;
  outline-offset: 4px;
}

/* Full URL display */
#full-url-container, #url-parts-container {
  width: 100%;
  max-width: 800px;
  margin: 1rem 0;
  padding: 1rem;
  border: 1px solid #00ff0044;
  border-radius: 8px;
  background-color: rgba(0, 255, 0, 0.05);
}

#browser-url {
  font-size: 1.3rem;
  padding: 0.75rem;
  background: rgba(0,255,0,0.04);
  border: 1px solid #00ff0044;
  border-radius: 6px;
  overflow-x: auto;
  overflow-y: hidden;
  word-break: break-all;
  white-space: pre-wrap;
  min-height: 3rem;
  line-height: 1.6;
  text-align: left;
  width: 100%;
  max-width: 100vw;
  box-sizing: border-box;
}

/* URL parts breakdown */
#url-parts-breakdown {
  display: grid;
  grid-template-columns: minmax(120px, auto) 1fr;
  gap: 0.5rem;
  font-size: 1.2rem;
}

.url-part-label {
  font-weight: bold;
  color: #00ff00;
  padding: 0.5rem;
  text-align: right;
  border-right: 1px solid #00ff0033;
}

.url-part-value {
  padding: 0.5rem;
  overflow-wrap: break-word;
  word-break: break-all;
  background: none !important;
}

/* Cyber dark green for all URL components */
.custom-green-value {
  color: #00ff00 !important;
  font-weight: 600;
}

/* Punycode in parentheses: slightly dimmer green, italic */
.custom-green-value .punycode {
  color: #00ff00;
  font-style: italic;
  font-size: 0.95em;
  margin-left: 0.5em;
}

/* Color coding for URL parts */
.protocol-value { color: #39ff14; }
.subdomain-value { color: #00e676; }
.domain-value { color: #00bcd4; }
.tld-value { color: #ffea00; }
.path-value { color: #ff3d00; }
.query-value { color: #ff9800; }
.fragment-value { color: #e040fb; }

/* Non-ASCII highlighting */
.non-ascii-char {
  color: #00ff00;
  background: none;
  display: inline-block;
  margin: 0 1px;
  font-weight: bold;

}

/* Make the breakdown grid more cyber */
#url-parts-breakdown {
  border: 1.5px solid #00ff00;
  border-radius: 12px;
  padding: 1rem 1.5rem;
}

/* Cyber label style */
.url-part-label {
  color: #00ff00;
  font-weight: 700;
}

/* Center main containers and limit their width for a nice look */
.cyber-url-container,
.cyber-components-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 800px;
  margin: 1.5rem auto;
  box-sizing: border-box;
}

/* Center the logo and titles */
.cyber-logo,
.cyber-title,
.cyber-url-title,
.cyber-components-title {
  display: block;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

/* Mobile responsiveness */
@media screen and (max-width: 768px) {
  body {
    padding: 1rem;
    justify-content: flex-start; /* Top align on mobile for better UX */
  }
  
  h1 {
    font-size: 1.5rem;
  }
  
  h2 {
    font-size: 1.2rem;
  }
  
  #browser-url {
    font-size: 1rem;
    width: 100%;
    max-width: 100vw;
    box-sizing: border-box;
  }
  
  #url-parts-breakdown {
    font-size: 1rem;
    grid-template-columns: 1fr;
  }
  
  .url-part-label {
    text-align: left;
    border-right: none;
    border-bottom: 1px solid #00ff0033;
    padding-bottom: 0.25rem;
    margin-bottom: 0.25rem;
  }
  
  img[alt="Varonis Threat Labs Logo"] {
    max-width: 180px; /* was 280px */
  }
  
  .cyber-url-container,
  .cyber-components-container {
    max-width: 98vw;
    margin: 1rem auto;
    padding: 0;
  }
}

/* Disclaimer style */
.disclaimer {
  width: 100%;
  max-width: 800px;
  margin: 2rem 0 0 1.5rem;
  margin-right: auto;
  padding: 0.75rem;
  border-left: 3px solid #00ff00;
  border-radius: 8px;
  background: rgba(0,255,0,0.05);
  color: #00ff00;
  font-size: 0.8rem; /* was 0.85rem */
  text-align: left;
  box-sizing: border-box;
}

/* Ensure footer always in normal flow & below content */
#static-footer {
  position: static !important;
  margin-top: 2.5rem;
  width: 100%;
  max-width: 800px;
  margin: 2rem auto 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  box-sizing: border-box;
  align-self: stretch;
  padding-left: 0;
  padding-right: 0;
}

/* New styles for links */
.cyber-link {
  color: #00ff00;
  background: none;
  border: none;
  outline: none;
  text-decoration: underline;
  transition: color 0.2s;
  width: 100%;
  max-width: 800px;
  margin: 1.5rem auto 0 auto;
  text-align: center;
  font-weight: 700;
  font-size: 1.1rem;
  display: block;
  text-decoration: none;
}
.cyber-link:hover, .cyber-link:focus {
  color: #39ff14;
  text-decoration: underline wavy;
}

/* Top back link placed under logo */
.top-back-link {
  margin: 1rem auto 0.5rem auto;
  display: block;
  text-align: center;
  font-size: 1.3rem; /* was 1rem */
  max-width: 800px;
}

/* Optional: tighten spacing on large screens so content moves up a bit */
@media (min-width: 900px) {
  .top-back-link { margin-top: 0.75rem; }
}

/* Slightly reduce left margin on small screens */
@media (max-width: 600px) {
  .disclaimer {
    margin-left: 1rem;
  }
}
