html, body {
  margin: 0;
  padding: 0;
  width: 100vw;
  height: 100%;
  overflow: hidden;
  background: #111;
  color: #fff;
  font-family: 'VT323', monospace !important;
  letter-spacing: 0.1em;
}

@keyframes fadeIn { to { opacity: 1; } }
@keyframes blink { 0%,50%,100%{opacity:1;}25%,75%{opacity:0;} }
@keyframes hourglassSequence {0%{opacity:0;}21.43%{opacity:1;}78.57%{opacity:1;}100%{opacity:0;}}
@keyframes slideInFromLeft  {from{left:-120px;opacity:0;}to{left:50%;opacity:1;transform:translate(-50%,-50%);}}
@keyframes slideInFromRight {from{left:120vw;opacity:0;}to{left:50%;opacity:1;transform:translate(-50%,-50%);}}
@keyframes slideOutLeftAbs   {from{left:50%;opacity:1;transform:translate(-50%,-50%);}to{left:-120px;opacity:0;transform:translateY(-50%);} }
@keyframes slideOutRightAbs { from { left: 50%; opacity: 1; transform: translate(-50%, -50%); } to { left: 120vw; opacity: 0; transform: translateY(-50%); } }
@keyframes spinHourglass     {0%{transform:rotate(0deg);}100%{transform:rotate(360deg);}}
@keyframes pulseGradientMuted{0%{background-position:0% 50%;}50%{background-position:100% 50%;}100%{background-position:0% 50%;}}
@keyframes tickSlideIn  {from{left:-120px;opacity:0;}to{left:30%;opacity:1;transform:translate(-50%,-50%);} }
@keyframes tickSlideOut {from{left:30%;opacity:1;transform:translate(-50%, -50%);}to{left:-120px;opacity:0;transform:translate(-50%,-50%);} }
@keyframes crossSlideIn  {from{left:120vw;opacity:0;}to{left:70%;opacity:1;transform:translate(-50%, -50%);} }
@keyframes crossSlideOut {from{left:70%;opacity:1;transform:translate(-50%, -50%);}to{left:120vw;opacity:0;transform:translate(-50%,-50%);} }
@keyframes pulseSoft { 0%,100% { transform: scale(1); opacity: 0.85; } 50% { transform: scale(1.02); opacity: 1; } }


.upload-slide-in    {animation:slideInFromLeft 0.6s ease forwards;}
.upload-slide-out   {animation:slideOutRightAbs 0.6s ease forwards;}

.tick-slide-in      {animation:tickSlideIn 0.6s ease forwards;}
.tick-slide-out     {animation:tickSlideOut 0.6s ease forwards;}
.cross-slide-in     {animation:crossSlideIn 0.6s ease forwards;}
.cross-slide-out    {animation:crossSlideOut 0.6s ease forwards;}

#tick-btn {
  position: absolute;
  top: 32%;
  left: 35%;
  width: 60px;
  height: 60px;
  background: transparent;
  border: none;
  cursor: pointer;
  opacity: 1;
  z-index: 60;
  pointer-events: auto;
  transition: opacity 0.3s ease;
}

.tick-hidden {
  transform: translate(-150%, -50%);
  opacity: 0;
}

.tick-visible {
  transform: translate(-50%, -50%);
  opacity: 1;
}

#cross-btn {
  position: absolute;
  top: 32%;
  left: 65%;
  width: 60px;
  height: 60px;
  background: transparent;
  border: none;
  cursor: pointer;
  opacity: 1;
  z-index: 60;
  pointer-events: auto;
  transition: opacity 0.3s ease;
}

.cross-hidden {
  transform: translate(150%, -50%);
  opacity: 0;
}

.cross-visible {
  transform: translate(-50%, -50%);
  opacity: 1;
}


#landing-container,
#intro-container {
  position: relative;
  width: 100%;
  overflow: hidden;
  background: transparent;
  opacity: 0;
  animation: fadeIn 1s ease forwards;
  animation-delay: 1s;
}

#hourglass-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 2rem;
  text-transform: uppercase;
  color: white;
  opacity: 0;
  animation: hourglassSequence 3.5s ease forwards;
  animation-delay: 1.5s;
}

#hero-title {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 2rem;
  text-transform: uppercase;
  cursor: pointer;
  animation: blink 2s step-start infinite;
  transition: transform 0.15s ease-out;
}
#hero-title:active {
  transform: translate(-50%, -50%) scale(0.92);
}

#btn-left, #btn-right {
  position: absolute;
  bottom: 20px;
  width: 40px;
  height: 40px;
  background: transparent;
  border: none;
  cursor: pointer;
  opacity: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 1s ease forwards;
  animation-delay: 1.5s;
  z-index: 50;
}
#btn-left { left: 20px; }
#btn-right { right: 20px; }

button {
  transition: transform 0.15s ease-out;
}
button:active {
  transform: scale(0.92);
}

.icon {
  display: inline-block;
  vertical-align: middle;
  fill: currentColor;
  pointer-events: none;
  user-select: none;
}

.icon-reload,
.icon-unmute,
.icon-mute {
  width: 32px;
  height: 32px;
  fill: white;
  cursor: pointer;
  filter: drop-shadow(1px 1px 0 #535353);
}

.icon-hourglass-top {
  width: 40px;
  height: 40px;
  fill: rgb(255, 255, 255);
  pointer-events: none;
  filter: drop-shadow(1px 1px 0 #535353);
}

#hourglass-logo.spinning svg {
  animation: spinHourglass 2s linear infinite;
  transform-origin: center center;
}

.icon-tick,
.icon-cross,
.icon-video,
.icon-download {
  width: 60px;
  height: 60px;
  fill: white;
  cursor: pointer;
  filter: drop-shadow(4px 4px 0 #535353);
}

#tick-btn .icon-tick,
#cross-btn .icon-cross,
#upload-btn .icon-video {
  width: 60px;
  height: 60px;
}

#top-panel {
  position: absolute;
  top: -35vh;
  left: 0;
  width: 100vw;
  height: 35vh;
  background: url("/static/assets/backgrounds/terminal.gif") center center no-repeat;
  background-size: cover;
  background-color: transparent;
  opacity: 0;
  z-index: 50;
  transition: top 0.8s ease, opacity 0.8s ease;
}
#top-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.40);
  z-index: 1;
}
#top-panel.show {
  top: 0;
  opacity: 1;
}
#top-panel.hide {
  top: -35vh;
  opacity: 0;
}

#terminal-line {
  position: absolute;
  bottom: 0;
  left: 0;
  padding: 20px;
  font-size: 1.5rem;
  color: white;
  display: flex;
  align-items: flex-end;
  z-index: 2;
}

#typed-text,
#text-content {
  display: inline;
  text-shadow: 1px 1px 0 #4b4b4b;
}
#cursor {
  display: inline-block;
  vertical-align: -0.1em;
  animation: blink 1s step-start infinite;
}

#hourglass-logo {
  position: absolute;
  top: 20px;
  right: 20px;
  z-index: 2;
}

#progress-indicator {
  position: absolute;
  top: 20px;
  left: 0px;
  width: 160px;
  padding: 10px 10px 10px 70px;
  font-size: 1.5rem;
  color: white;
  background: rgba(20,20,30,0.85);
  box-shadow: 0 4px 32px 0 rgba(0,0,0,0.30);
  text-align: left;
  border-radius: 10px;
  z-index: 2;
  transform: translateX(-100%);
  transition: transform 0.8s cubic-bezier(.6,0,.4,1);
}
#progress-indicator.visible {
  transform: translateX(-50px);
}
#progress-indicator.slide-out {
  transform: translateX(-110vw);
}

#bottom-panel {
  position: absolute;
  top: 35vh;
  width: 100vw;
  background: transparent;
  z-index: 40;
  pointer-events: none;
}
#bottom-panel button {
  pointer-events: auto;
}

#upload-btn,
#download-btn {
  position: absolute;
  top: 35%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  cursor: pointer;
  opacity: 1;
  transition: transform 0.15s ease-out;
}
#upload-btn { left: -120px; width: 60px; height: 60px; }
#download-btn { left: 120vw; width: 60px; height: 60px; }
#upload-btn:active,
#download-btn:active { transform: translateY(-50%) scale(0.92); }

#info-panel {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  width: 100vw;
  height: 55vh;
  transform: translateY(100%);
  transition: transform 0.4s ease;
  z-index: 100;
  pointer-events: none;
  background: rgba(20, 20, 20, 0.6);
  backdrop-filter:  blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

#info-panel.expanded {
  transform: translateY(0);
  pointer-events: auto;
}

#info-tab {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%) translateY(calc(-100% + 3px));
  width: 80px;
  height: 36px;
  background: transparent;
  border: none;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  pointer-events: auto;
  z-index: 101;
  color: white;
  touch-action: none;
}
#panel-content {
  max-width: 420px;
  margin: 0 auto;
  padding: 10px;
  text-align: center;
  font-size: clamp(1rem, 1.2vw, 1.2rem);
  line-height: 1.4;
  color: white;
  display: flex;
  flex-direction: column;
  align-items: center;
}
#info-heading {
  font-size: 2rem;
  margin-top: 20px;
  margin-bottom: 10px;
}
.info-title {
  font-weight: bold;
  letter-spacing: 0.1em;
}
.info-subtitle {
  font-size: clamp(1.6rem, 2.6vw, 2.1rem);
  font-weight: bold;
  letter-spacing: 0.1em;
  background: linear-gradient(90deg, #554477, #446688, #7788aa);
  background-size: 300%;
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  animation: pulseGradientMuted 16s ease infinite;
  margin-bottom: 15px;
}
.info-list {
  font-size: clamp(1.2rem, 1.6vw, 1.4rem);
  line-height: 1.6;
  list-style: none;
  padding: 0;
  margin: 0 0 20px 0;
  text-align: left;
}
.info-list li {
  margin-bottom: 8px;
}
.info-footer {
  margin-top: 10px;
  font-size: clamp(1.1rem, 1.4vw, 1.3rem);
  letter-spacing: 0.1em;
  text-align: center;
}
.credit-you,
.credit-link {
  color: #aaa;
  text-decoration: none;
}
.credit-link:hover {
  text-decoration: underline;
}

#mock-terminal-container {
  position: absolute;
  top: 35vh;
  left: 0;
  width: 100vw;
  height: 45vh;
  padding: 10px;
  background: transparent;
  z-index: 60;
  overflow-y: auto;
}
#mock-terminal {
  font-family: 'VT323', monospace;
  font-size: 1rem;
  color: white;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: pre-wrap;
  line-height: 1.4;
}
.terminal-line {
  margin-bottom: 6px;
}

.hidden {
  display: none !important;
}

#preview-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: calc(45vh + 60px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  z-index: 998;
  transform: translateY(-100%);
  transition: transform 0.6s ease;
  background: rgba(20, 20, 20, 0.6);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

#preview-container.show {
  transform: translateY(0);
}

#gif-preview {
  width: 100%;
  height: 45vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  margin: 0;
  overflow: hidden;
}

#gif-image {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  image-rendering: pixelated;
  padding: 0;
  margin: 0;
  border-radius: 0;
}

#message-strip {
  height: 60px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding-left: 20px;
  font-family: "VT323", monospace;
  font-size: clamp(1.4rem, 2.4vw, 2.2rem);
  color: #fff;
  text-shadow: 1px 1px 0 #000;
  background: rgba(20, 20, 20, 0.6);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

#strip-download-btn {
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 3;
  opacity: 0.85;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

#strip-download-btn svg {
  width: 100%;
  height: 100%;
  fill: white;
  filter: drop-shadow(1px 1px 0 #535353);
  pointer-events: none;
  user-select: none;
}

#strip-download-btn:hover {
  opacity: 1;
}

#strip-download-btn:active {
  transform: translateY(-50%) scale(0.94);
}

@media (min-width: 768px) {
  #preview-container {
    left: 50%;
    transform: translateX(-50%) translateY(-100%);
    width: 480px;
    max-width: 98vw;
  }
  #preview-container.show {
    transform: translateX(-50%) translateY(0);
  }
  #gif-preview,
  #message-strip {
    width: 480px;
    max-width: 98vw;
  }
  #gif-preview img {
    max-width: 420px;
    max-height: 65vh;
  }

  
}


