/* -----------------------------------------
   RESET + BASE
------------------------------------------*/
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background: #000;
  font-family: "Courier New", Courier, monospace;
}

/* Outline thickness variables */
:root {
  --outline: 15px;
}

@media (max-width: 600px) {
  :root { --outline: 10px; }
}

@media (max-width: 320px) {
  :root { --outline: 8px; }
}

/* -----------------------------------------
   OUTLINE
------------------------------------------*/
#viewport-outline {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  border: var(--outline) solid #ff7e00;
  z-index: 9999;
}

/* -----------------------------------------
   BOTTOM NAV + ICONS
------------------------------------------*/
#bottom-nav {
  position: fixed;
  bottom: calc(var(--outline) + 25px);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 45px;
  z-index: 5000;
  pointer-events: auto;
}

/* -----------------------------------------
   BOTTOM NAV BACKPLATE
------------------------------------------*/
#bottom-nav::before {
  content: "";
  position: absolute;
  inset: -18px -28px; /* controls padding around icons */
  background: #000;
  border-radius: 0px;
  z-index: -1;
}


.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 0.85rem;
  font-family: "Courier New", monospace;
}

.nav-icon {
  width: 48px;
  height: 48px;
  object-fit: contain;
  cursor: pointer;
  transition: transform 0.25s ease;
}

.nav-item:hover .nav-icon {
  transform: scale(1.15);
}

.nav-item span {
  margin-top: 6px;
  opacity: 0.8;
}

/* Active highlight */
.nav-item.active-nav {
  outline: 3px solid #ff7e00;
  outline-offset: 6px;
  width: 68px;
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* -----------------------------------------
   PORTRAIT SCALING
------------------------------------------*/
@media (max-width: 500px) and (orientation: portrait) {
  #bottom-nav {
    gap: 32px;
    bottom: calc(var(--outline) + 15px);
  }
  .nav-icon {
    width: 34px;
    height: 34px;
  }
  .nav-item span { font-size: 0.72rem; }
}

@media (max-width: 400px) and (orientation: portrait) {
  #cursor { margin-left: 3px; }
  #bottom-nav {
    bottom: calc(var(--outline) + 10px);
    gap: 20px;
  }
  .nav-icon {
    width: 28px;
    height: 28px;
  }
  .nav-item span { font-size: 0.65rem; }
}

@media (max-width: 340px) and (orientation: portrait) {
  #bottom-nav {
    gap: 24px;
    bottom: calc(var(--outline) + 12px);
  }
  .nav-icon {
    width: 24px;
    height: 24px;
  }
  .nav-item span { font-size: 0.6rem; }
  .nav-item.active-nav {
    width: 50px;
    height: 50px;
    outline-offset: 4px;
  }
}

/* -----------------------------------------
   LANDSCAPE SCALING
------------------------------------------*/
@media (orientation: landscape) {
  #bottom-nav {
    gap: 32px;
    bottom: calc(var(--outline) + 14px);
  }

  .nav-icon {
    width: 32px;
    height: 32px;
  }

  .nav-item span {
    font-size: 0.78rem;
    margin-top: 6px;
  }

  .nav-item.active-nav {
    width: 74px;
    height: 74px;
    outline-offset: 6px;
  }
}

@media (orientation: landscape) and (max-height: 550px) {
  .nav-icon { width: 28px; height: 28px; }
  .nav-item span { font-size: 0.72rem; }

  .nav-item.active-nav {
    width: 66px;
    height: 66px;
    outline-offset: 5px;
  }
}

@media (orientation: landscape) and (max-height: 420px) {
  #bottom-nav {
    bottom: calc(var(--outline) + 8px);
    gap: 24px;
  }

  .nav-icon { width: 24px; height: 24px; }
  .nav-item span { font-size: 0.65rem; }

  .nav-item.active-nav {
    width: 58px;
    height: 58px;
    outline-offset: 4px;
  }
}

@media (orientation: landscape) and (max-height: 330px) {
  #bottom-nav {
    bottom: calc(var(--outline) + 3px);
    gap: 18px;
  }

  .nav-icon { width: 20px; height: 20px; }
  .nav-item span { font-size: 0.58rem; }

  .nav-item.active-nav {
    width: 52px;
    height: 52px;
    outline-offset: 3px;
  }
}

/* ------------------------------------------------------
   GLOBAL IN-APP SCROLL SYSTEM
-------------------------------------------------------*/
html, body {
  height: 100%;
  overflow: hidden;
}

.app-scroll-container {
  position: fixed;
  top: var(--outline);
  left: var(--outline);
  width: calc(100vw - var(--outline) * 2);
  height: calc(100vh - var(--outline) * 2);

  overflow-y: auto;
  overflow-x: hidden;

  padding-bottom: 120px;
}

.app-scroll-container::-webkit-scrollbar {
  width: 10px;
}

.app-scroll-container::-webkit-scrollbar-thumb {
  background: #7cfc00;
  border-radius: 10px;
}

.app-scroll-container::-webkit-scrollbar-track {
  background: rgba(255,255,255,0.15);
}

/* Firefox */
.app-scroll-container {
  scrollbar-width: thin;
  scrollbar-color: #7cfc00 rgba(255,255,255,0.15);
}

.app-scroll-container {
  padding-top: 110px;
}

.app-scroll-container:focus {
  outline: none;
}


/* -----------------------------------------
   TOP RIGHT CONTACTS BUTTON
------------------------------------------*/
#top-right-contacts {
  position: fixed;
  top: calc(var(--outline) + 12px);
  right: calc(var(--outline) + 12px);
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 7000;
  pointer-events: auto;
}

#top-right-contacts img {
  width: 60px;
  height: 60px;
  object-fit: contain;
  cursor: pointer;
  transition: transform 0.25s ease;
}

#top-right-contacts img:hover {
  transform: scale(1.15);
}

#top-right-contacts span {
  color: white;
  margin-top: 6px;
  font-size: 0.9rem;
  opacity: 0.85;
  font-family: "Courier New", monospace;
  text-shadow: 1px 1px 2px black;
}

@media (max-width: 500px) {
  #top-right-contacts img {
    width: 50px;
    height: 50px;
  }
  #top-right-contacts span {
    font-size: 0.7rem;
  }
}

@media (max-width: 380px) {
  #top-right-contacts img {
    width: 35px;
    height: 35px;
  }
  #top-right-contacts span {
    font-size: 0.6rem;
  }
}

/* -----------------------------
   CONTACT POPUP OVERLAY
------------------------------*/
.contact-popup {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.75);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 90000;
}

.contact-popup.hidden {
  display: none;
}

/* -----------------------------
   CONTACT CARD STYLING
------------------------------*/
.contact-card-inner {
  width: 90%;
  max-width: 420px;
  background: #111;
  border-radius: 0px;
  padding: 22px;

  --card-color: #ff7e00;
  border: 4px solid var(--card-color);
  box-shadow: 0 0 18px var(--card-color);

  color: white;
  text-align: center;
  position: relative;
  font-family: "Courier New", monospace;
}

/* Close button */
#contact-close {
  position: absolute;
  top: 12px;
  right: 12px;
  background: none;
  border: none;
  font-size: 2rem;
  color: white;
  cursor: pointer;
}

/* Title */
#contact-title {
  font-size: 1.6rem;
  margin-bottom: 12px;
}

/* -----------------------------------------
   CONTACT LIST (NEON GREEN)
------------------------------------------*/
.contact-section {
  list-style: none;
  padding: 0;
  margin: 0;
}

.contact-section li {
  margin: 12px 0;
}

.contact-section a {
  color: #7CFC00;
  font-size: 1.15rem;
  text-decoration: none;
  transition: opacity 0.2s ease;
}

.contact-section a:hover {
  opacity: 0.6;
}

/* Toggle buttons */
#contact-toggle {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin: 15px 0 20px;
}

.toggle-btn {
  background: none;
  border: 2px solid #ff7e00;
  padding: 6px 16px;
  color: white;
  font-family: "Courier New", monospace;
  cursor: pointer;
  transition: 0.2s;
}

.toggle-btn.active {
  background: #ff7e00;
  color: black;
}

.contact-section.hidden {
  display: none;
}
