/* Aeonik Pro Font Faces */
@font-face {
  font-family: "Aeonik Pro";
  src: url("./assets/aeonik/aeonikpro-regular.woff2") format("woff2"),
    url("./assets/aeonik/aeonikpro-regular.woff") format("woff");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Aeonik Pro";
  src: url("./assets/aeonik/aeonikpro-medium.woff2") format("woff2"),
    url("./assets/aeonik/aeonikpro-medium.woff") format("woff");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Aeonik Pro";
  src: url("./assets/aeonik/aeonikpro-semibold.woff2") format("woff2"),
    url("./assets/aeonik/aeonikpro-semibold.woff") format("woff");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

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

html {
  /* Prevent text size adjustment on orientation change (Android) */
  -webkit-text-size-adjust: 100%;
  -moz-text-size-adjust: 100%;
  -ms-text-size-adjust: 100%;
  text-size-adjust: 100%;

  /* Improve tap response */
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

body {
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  font-family: "Aeonik Pro", -apple-system, BlinkMacSystemFont, sans-serif;
  position: relative;
  background-color: #000;

  /* Prevent text size adjustment on Android */
  -webkit-text-size-adjust: 100%;
  -moz-text-size-adjust: 100%;
  -ms-text-size-adjust: 100%;
  text-size-adjust: 100%;

  /* Improve rendering on Android */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
@media (max-width: 1024px) {
  body {
    justify-content: space-between;
    height: 100%;
    overflow: visible;
  }
}

#bg-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -1;
  opacity: 0;

  /* Fix for Android rendering */
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
}

#bg-canvas.animate {
  animation: fadeInBackground 3s ease-in 3s forwards;
}

@keyframes fadeInBackground {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

#video-container {
  position: relative;
  z-index: 2;

  /* GPU acceleration */
  will-change: transform;
  backface-visibility: hidden;
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
}

#ascii-container {
  background: transparent;
  position: relative;
  z-index: 2;
  transform: translateY(-5vh);

  /* GPU acceleration */
  will-change: transform;
  backface-visibility: hidden;
  -webkit-transform: translateY(-5vh) translateZ(0);
  transform: translateY(-5vh) translateZ(0);
}

#ascii-canvas {
  image-rendering: pixelated;
  opacity: 0;
  transition: opacity 1s ease-in;

  /* GPU acceleration hints for better performance on mobile */
  transform: translateZ(0);
  will-change: contents;
  backface-visibility: hidden;
  -webkit-transform: translateZ(0);
  -webkit-backface-visibility: hidden;
  /* Force hardware acceleration */
  -webkit-perspective: 1000px;
  perspective: 1000px;
}

#video-element {
  position: absolute;
  z-index: 1;
  opacity: 1;
  transition: opacity 1s ease-out;
  transform: translateY(-5vh);
}

#video-element.hidden {
  opacity: 0;
  pointer-events: none;
}

/* Menu Bar Styles */
#menu-bar {
  position: fixed;
  top: 30px;
  left: 30px;
  right: 30px;
  height: 60px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 12px 0 24px;
  z-index: 100;

  /* Glass effect */
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 132px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);

  /* Animation */
  opacity: 0;
  transform: translateY(-20px);

  /* Fix for Android fixed positioning */
  -webkit-transform: translateZ(0);
  backface-visibility: hidden;
}

@media (max-width: 768px) {
  #menu-bar {
    top: 15px;
    left: 15px;
    right: 15px;
    height: 50px;
    padding: 0 8px 0 16px;
  }

  #menu-bar .logo {
    height: 20px;
  }

  #menu-bar .logo-text {
    height: 20px;
  }
}

#menu-bar.animate {
  animation: slideInMenuBar 0.6s ease-out 6s forwards;
}

@keyframes slideInMenuBar {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

#menu-bar .logo-container {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: row;
  gap: 16px;
}

#menu-bar .logo {
  height: 26px;
  width: auto;
  filter: brightness(1.2);
}

#menu-bar img[src*="hyena-shape"] {
  filter: brightness(1.2) drop-shadow(0px 0px 10px #19c692);
}

#menu-bar .logo-text {
  height: 26px;
  width: auto;
  filter: brightness(1.2);
  margin-top: 6px;
}

#menu-bar .actions {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-right: 16px;
}
#menu-bar .actions a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  text-decoration: none;
  color: #ffffff;
  transition: opacity 0.3s ease;
}
#menu-bar .actions a:hover {
  opacity: 0.8;
}

#launch-app-btn {
  padding: 12px 28px;
  font-family: "Aeonik Pro", -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 14px;
  font-weight: 400;
  color: #ffffff;
  border: none;
  cursor: pointer;

  /* Glass effect */
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 100px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2), 0 0 20px rgba(151, 252, 228, 0.3),
    0 0 40px rgba(151, 252, 228, 0.15);

  transition: all 0.3s ease;
}

#launch-app-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(151, 252, 228, 0.3);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3), 0 0 30px rgba(151, 252, 228, 0.5),
    0 0 60px rgba(151, 252, 228, 0.25);
}

#launch-app-btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* Hero Section Styles */
#hero-section {
  text-align: center;
  padding: 0 20px;
  overflow: visible;
  position: relative;
  opacity: 0;
  margin-top: -100px;
  transform: translateY(0px);
}

#hero-section.animate {
  animation: fadeInHero 0.8s ease-out 5.5s forwards;
}

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

#hero-title {
  font-family: "Aeonik Pro", -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 52px;
  font-weight: 400;
  line-height: 1.2;
  margin-bottom: 8px;
  text-shadow: 0 0 20px rgba(151, 252, 228, 0.5),
    0 0 40px rgba(151, 252, 228, 0.4), 0 0 60px rgba(151, 252, 228, 0.3);
  position: relative;
  display: inline-block;
  color: #97fce4;
}
@media (max-width: 1024px) {
  #hero-title {
    font-size: 40px;
  }
}
@media (max-width: 768px) {
  #hero-title {
    font-size: 32px;
  }
}

#hero-subtitle {
  font-family: "Aeonik Pro", -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 24px;
  font-weight: 300;
  color: #97fce4;
  opacity: 0.7;
  line-height: 1.4;
  margin-bottom: 24px;
}

#hero-subtitle .mobile-break {
  display: none;
}

@media (max-width: 1024px) {
  #hero-subtitle {
    font-size: 20px;
  }
}
@media (max-width: 768px) {
  #hero-subtitle {
    font-size: 16px;
  }
}
@media (max-width: 450px) {
  #hero-subtitle .mobile-break {
    display: block;
  }
}

.button-wrapper {
  display: inline-flex;
  align-items: center;
  gap: 24px;
  position: relative;
  padding-top: 10px;
}

@media (max-width: 768px) {
  .button-wrapper {
    gap: 16px;
    flex-wrap: wrap;
    justify-content: center;
  }
}

.start-trading-btn-container {
  border-radius: 100px;
  background: #19c692
    linear-gradient(
      90deg,
      rgba(255, 255, 255, 0.1) 0%,
      rgba(255, 255, 255, 0.8) 50%,
      rgba(255, 255, 255, 0.1) 100%
    );
  padding: 2px;
  box-shadow: 0px 0px 64px rgba(25, 198, 146, 0.5),
    0px 0px 24px rgba(25, 198, 146, 0.4),
    inset 0px 1px 0px rgba(255, 255, 255, 0.2);
}

.start-trading-btn {
  padding: 12px 32px;
  font-family: "Aeonik Pro", -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 16px;
  font-weight: 400;
  color: #0a3d2e;
  cursor: pointer;
  position: relative;
  z-index: 1;
  overflow: hidden;
  border: 0px solid transparent;
  -webkit-button-appearance: none;

  transition: all 0.3s ease;
  background: #19c692;
  border-radius: 100px;
  color: #0a3d2e;
}

@media (max-width: 1024px) {
  .start-trading-btn {
    font-size: 14px;
  }
}
@media (max-width: 768px) {
  .start-trading-btn {
    padding: 8px 20px;
  }
}

.start-trading-btn span {
  position: relative;
  z-index: 3;
}

.start-trading-btn-small {
  padding: 8px 20px;
  font-size: 14px;
}

/* Button Hover */
.start-trading-btn:hover {
  background: #1ed9a3;
  box-shadow: 0px 0px 96px rgba(25, 198, 146, 1),
    0px 0px 32px rgba(25, 198, 146, 0.8),
    inset 0px 1px 0px rgba(255, 255, 255, 0.3);
}

.start-trading-btn:active {
  box-shadow: 0px 0px 48px rgba(25, 198, 146, 0.6),
    0px 0px 16px rgba(25, 198, 146, 0.5);
}

#learn-more-link {
  font-family: "Aeonik Pro", -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 16px;
  font-weight: 400;
  color: #ffffff;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.3s ease;

  /* White stroke and text */
  border: 1px solid #ffffff;
  border-radius: 100px;
  padding: 12px 32px;
  background: transparent;
  opacity: 0.7;
}

@media (max-width: 1024px) {
  #learn-more-link {
    font-size: 14px;
  }
}
@media (max-width: 768px) {
  #learn-more-link {
    padding: 8px 20px;
  }
}

#learn-more-link:hover {
  opacity: 1;
}

/* Powered By Section */
#powered-by {
  width: 100%;
  text-align: center;
  padding: 0 20px;

  /* Animation - start from bottom */
  opacity: 0;
  transform: translateY(100px);
  padding-bottom: 30px;
  padding-top: 70px;
}
@media (max-width: 1024px) {
  #powered-by {
    padding-top: 50px;
    bottom: 0;
    position: absolute;
  }
}

#powered-by.animate {
  animation: fadeInPoweredBy 0.8s ease-out 6s forwards;
}

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

#powered-by-text {
  font-family: "Aeonik Pro", -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 14px;
  font-weight: 400;
  color: rgba(151, 252, 228, 0.6);
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

#powered-by-logos {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
}

#powered-by-logos a {
  display: inline-block;
  text-decoration: none;
  transition: opacity 0.3s ease;
}

#powered-by-logos img {
  width: auto;
  opacity: 0.7;
  transition: opacity 0.3s ease;
}

#powered-by-logos a:hover img {
  opacity: 1;
}

#content-container {
  position: relative;
  z-index: 10;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding-top: 150px;
  flex: 1;

  /* Fix for Android rendering */
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
}

@media (max-width: 768px) {
  #content-container {
    padding-top: 20vh;
    padding-bottom: 5vh;
    flex: 1 1 auto;
    justify-content: center;
    overflow: hidden;
    height: 90vh;
  }
}

#loop-video-preload {
  display: none;
}

/* Loading Screen */
#loading-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 1s ease-in;
}

#loading-screen.show {
  opacity: 1;
  pointer-events: auto;
}

#loading-screen.fade-out {
  opacity: 0;
  transition: opacity 0.5s ease-out;
}

#loading-percentage {
  font-family: "Aeonik Pro", -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 52px;
  font-weight: 400;
  color: #ffffff;
  text-align: center;
}

@media (max-width: 1024px) {
  #loading-percentage {
    font-size: 40px;
  }
}

@media (max-width: 768px) {
  #loading-percentage {
    font-size: 32px;
  }
}
