/**
 * ubiera.io
 */

:root {
  --color-bg: #0f1214;
  --color-bg-light: #16213e;
  --color-text: #fff;
  --color-text-muted: #999;
  --color-grid: #666;
  --font-primary: 'BenderBold', -apple-system, blinkmacsystemfont, 'Segoe UI', sans-serif;
}

html,
body {
  height: 100%;
}

html {
  background-color: var(--color-bg);
  box-sizing: border-box;
  font-size: 16px;
}

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

*:focus {
  outline: 0;
}

input,
textarea,
button,
select,
a {
  -webkit-tap-highlight-color: rgb(0, 0, 0, 0);
}

@font-face {
  font-family: BenderBold;
  src: url('/assets/fonts/Bender-Bold.otf');
  font-display: swap;
}

.intro-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: #101214;
  z-index: 9999;
  pointer-events: none;
}

.intro-stripes {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.intro-logo-container {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  transform-origin: 50% 50%;
  transform: scale(0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  visibility: hidden;
  pointer-events: none;
}

.intro-logo-svg {
  width: auto;
  height: 57vh;
  max-height: 429px;
  aspect-ratio: 189.35 / 252.47;
}

.distortion-container {
  position: relative;
  display: inline-block;
}

.distortion-layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.distortion-layer-content {
  position: absolute;
  top: 0;
  left: 0;
  white-space: nowrap;
}

#brandingContainer.distortion-active {
  position: relative;
  overflow: visible;
}

#brandingContainer.distortion-active .brandLink {
  position: relative;
}

#brandingContainer .distortion-layer {
  pointer-events: none;
}

#brandingContainer .distortion-layer-content {
  font-family: var(--font-primary);
  font-size: 1.2rem;
}

.intro-text .distortion-layer-content {
  font-family: var(--font-primary);
  font-size: 2.5rem;
  text-transform: uppercase;
  letter-spacing: 0.3em;
}

@keyframes distortionSlide {
  0% {
    transform: translateX(-5px);
    opacity: 1;
  }

  50% {
    transform: translateX(5px);
    opacity: 1;
  }

  100% {
    transform: translateX(0);
    opacity: 0;
  }
}

#fullScreenContainer {
  position: relative;
  background-color: var(--color-bg);
  overflow: hidden;
  min-height: 100dvh;
  min-height: -webkit-fill-available;
}

#map {
  user-select: none;
  background: var(--color-bg);
  position: absolute !important;
  width: 100%;
  height: 110%;
  top: 0;
  right: 0;
  z-index: 0;
}

.leaflet-tile-pane {
  filter: brightness(0.7) saturate(0.4);
}

#gridOverlayContainer {
  position: absolute;
  width: 100%;
  height: 100%;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(20, 1fr);
  pointer-events: none;
}

.gridCell {
  background-color: var(--color-bg);
  font-size: 1rem;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  color: var(--color-grid);
}

.plusSymbol {
  user-select: none;
  opacity: 0;
}

#ipAddressOverlayContainer {
  position: absolute;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 100%;
  background-color: rgb(0, 0, 0, 0.1);
  z-index: 2;
  pointer-events: none;
}

#mainContent {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 3rem;
  pointer-events: auto;
  opacity: 0;
}

#brandingPanel {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.5rem;
}

#brandingContainer {
  display: block;
  text-decoration: none;
  overflow: visible;
}

.logo-container {
  position: relative;
  display: inline-block;
  width: 54px;
  height: 72px;
  overflow: visible;
}

.logo-svg {
  display: block;
  width: 100%;
  height: 100%;
  color: var(--color-text);
}

.author-name {
  font-family: var(--font-primary);
  font-size: 1.4rem;
  color: var(--color-text);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-top: 0.5rem;
}

.author-location {
  font-family: var(--font-primary);
  font-size: 0.9rem;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.15em;
}

.social-links {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
}

.social-icon {
  color: var(--color-text);
  opacity: 0.7;
  transition:
    opacity 0.2s ease,
    color 0.2s ease;
}

.social-icon:hover {
  opacity: 1;
}

.social-icon--twitter:hover {
  color: #1da1f2;
}

.social-icon--email:hover {
  color: #ea4335;
}

.social-icon--linkedin:hover {
  color: #0a66c2;
}

.vertical-divider {
  width: 1px;
  height: 200px;
  background-color: rgb(255, 255, 255, 0.3);
}

#ipPanel {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  font-family: var(--font-primary);
  color: var(--color-text);
}

#ipAddress {
  font-size: 3rem;
  letter-spacing: 0.05em;
}

#ipVersionToggle {
  display: flex;
  flex-direction: row;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.version-toggle {
  font-family: var(--font-primary);
  font-size: 0.9rem;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  cursor: pointer;
  transition: color 0.2s ease;
}

.version-toggle:hover {
  color: var(--color-text);
}

.version-toggle.active {
  color: #00d9c0;
}

.version-toggle.active:hover {
  color: #00d9c0;
}

.version-toggle.disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.version-toggle.disabled:hover {
  color: var(--color-text-muted);
}

#geoDetails {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  margin-top: 1rem;
}

#coordinates {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  letter-spacing: 0.1em;
}

#locationContainer {
  font-size: 1rem;
  color: var(--color-text);
  text-transform: uppercase;
  letter-spacing: 0.15em;
}

#networkInfo {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  letter-spacing: 0.03em;
}

#ipAddress::selection,
#locationContainer::selection,
#coordinates::selection {
  background: var(--color-text);
  color: var(--color-bg);
}

.captionError {
  font-size: 3rem !important;
  color: #ff6b6b;
}

#copyButton {
  user-select: none;
  outline: none;
  margin-top: 1rem;
  font-family: var(--font-primary);
  font-size: 1rem;
  background-color: rgb(0, 0, 0, 0.2);
  border: 2px solid var(--color-text);
  color: var(--color-text);
  padding: 0.3rem 1.5rem;
  cursor: pointer;
  transition:
    background-color 0.15s ease,
    color 0.15s ease;
}

#copyButton:hover {
  background-color: var(--color-text);
  color: var(--color-bg);
}

.brandLink {
  color: white;
  cursor: pointer;
  text-decoration: none;
  transition: opacity 0.2s ease;
}

.brandLink:hover {
  opacity: 0.7;
}

@media only screen and (width <= 600px) {
  #mainContent {
    flex-direction: column;
    gap: 2rem;
  }

  .vertical-divider {
    width: 150px;
    height: 1px;
  }

  .logo-container {
    width: 45px;
    height: 60px;
  }

  .author-name {
    font-size: 1.1rem;
  }

  .author-location {
    font-size: 0.8rem;
  }

  #ipAddress {
    font-size: 2rem;
  }

  #ipVersionToggle {
    gap: 0.5rem;
  }

  .version-toggle {
    font-size: 0.75rem;
  }

  #coordinates {
    font-size: 0.8rem;
  }

  #locationContainer {
    font-size: 0.9rem;
  }

  #networkInfo {
    font-size: 0.7rem;
  }

  #copyButton {
    font-size: 0.9rem;
    padding: 0.25rem 1rem;
  }

  .gridCell {
    padding: 2rem;
  }
}

@media only screen and (width >= 601px) and (width <= 1000px) {
  #mainContent {
    gap: 2.5rem;
  }

  .vertical-divider {
    height: 180px;
  }

  .logo-container {
    width: 50px;
    height: 66px;
  }

  #ipAddress {
    font-size: 2.5rem;
  }

  .gridCell {
    padding: 2.8rem;
  }
}

@media only screen and (width >= 1001px) {
  #mainContent {
    gap: 4rem;
  }

  .vertical-divider {
    height: 220px;
  }

  .logo-container {
    width: 63px;
    height: 84px;
  }

  .author-name {
    font-size: 1.6rem;
  }

  #ipAddress {
    font-size: 3.5rem;
  }

  #copyButton {
    font-size: 1.1rem;
    padding: 0.4rem 1.8rem;
  }

  .gridCell {
    padding: 3.5rem;
  }
}

@keyframes black2Transparent {
  0% {
    background-color: var(--color-bg);
  }

  50% {
    background-color: #777;
  }

  100% {
    background-color: transparent;
  }
}

@keyframes flicker {
  0% {
    opacity: 1;
  }

  30% {
    opacity: 0;
  }

  60% {
    opacity: 1;
  }

  90% {
    opacity: 0;
  }

  100% {
    opacity: 1;
  }
}

@keyframes flash {
  0% {
    background: transparent;
    color: var(--color-text);
  }

  30% {
    opacity: 1;
  }

  40% {
    opacity: 0;
  }

  50% {
    background: var(--color-text);
    color: var(--color-bg);
    opacity: 1;
  }

  60% {
    opacity: 0;
  }

  70% {
    background: var(--color-text);
    color: var(--color-bg);
    opacity: 1;
  }

  80% {
    opacity: 0;
  }

  90% {
    opacity: 1;
  }

  95% {
    opacity: 0;
  }

  100% {
    background: transparent;
    color: var(--color-text);
    opacity: 1;
  }
}

.leaflet-pane {
  z-index: 3 !important;
}

.leaflet-marker-pane {
  z-index: 4 !important;
}

.pulsing-marker {
  background: transparent !important;
  border: none !important;
}

.pulse-dot {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 14px;
  height: 14px;
  background-color: #00d9c0;
  border-radius: 50%;
  box-shadow:
    0 0 15px rgb(0, 217, 192, 1),
    0 0 30px rgb(0, 217, 192, 0.6);
}

.pulse-ring {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 14px;
  height: 14px;
  border: 3px solid rgb(0, 217, 192, 0.9);
  border-radius: 50%;
  background: transparent;
  animation: pulse-ring 2s ease-out infinite;
}

@keyframes pulse-ring {
  0% {
    width: 14px;
    height: 14px;
    opacity: 1;
  }

  100% {
    width: 80px;
    height: 80px;
    opacity: 0;
  }
}

#siteFooter {
  position: fixed;
  bottom: calc(1rem + env(safe-area-inset-bottom, 0px));
  right: calc(1.5rem + env(safe-area-inset-right, 0px));
  z-index: 10;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  font-size: 0.75rem;
  color: var(--color-text-muted);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  letter-spacing: 0.05em;
}

.footer-divider {
  opacity: 0.5;
}

.footer-link {
  color: var(--color-text-muted);
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-link:hover {
  color: var(--color-text);
}

@media only screen and (width <= 600px) {
  #siteFooter {
    bottom: calc(0.5rem + env(safe-area-inset-bottom, 0px));
    right: calc(0.5rem + env(safe-area-inset-right, 0px));
    left: calc(0.5rem + env(safe-area-inset-left, 0px));
    justify-content: center;
    font-size: 0.65rem;
  }
}
