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

body {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  min-height: 100vh;
  font-family: 'Hack', monospace;
  background-color: #ffffff;
  color: #727272;
  overflow-x: hidden;
}

.top-text {
  margin-top: 5vh;
  color: #727272;
  text-align: center;
  font-size: 0.9rem;
  padding: 0 20px;
}

.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1;
  width: 100%;
  padding: 20px;
}

.hero > div {
  margin-bottom: 2rem;
  color: #727272;
  font-size: 1.1rem;
  text-align: center;
}

p[data-item="PretorIA"] {
  margin: 0 0 1rem 0;
  font-size: clamp(3rem, 10vw, 6rem);
  color: #cccccc;
  text-transform: uppercase;
  font-weight: 600;
  position: relative;
  transition: all 1s ease-in-out;
  user-select: none;
}

p[data-item="PretorIA"]::before {
  content: attr(data-item);
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  width: 0;
  color: #8254ff;
  overflow: hidden;
  transition: all 0.8s ease-in-out;
  white-space: nowrap;
}

p[data-item="PretorIA"]:hover::before {
  width: 100%;
}

nav {
  margin-top: 25px;
  background: #f9f9f9;
  padding: 16px 32px;
  border-radius: 8px;
  width: 90%;
  max-width: 800px;
}

nav .menuItems {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-around;
  gap: 1.5rem;
}

nav .menuItems li a {
  text-decoration: none;
  color: #8f8f8f;
  font-size: 1.2rem;
  font-weight: 400;
  transition: all 0.5s ease-in-out;
  position: relative;
  text-transform: uppercase;
  padding: 0.5rem;
}

nav .menuItems li a::before {
  content: attr(data-item);
  transition: 0.5s;
  color: #8254ff;
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  width: 0;
  overflow: hidden;
  white-space: nowrap;
  padding: 0.5rem;
}

nav .menuItems li a:hover::before {
  width: 100%;
}

footer {
  width: 100%;
  padding: 1.5rem;
  font-size: 0.85rem;
  background-color: #f1f1f1;
  color: #000000;
  text-align: center;
}

footer a {
  text-decoration: none;
  color: inherit;
  border-bottom: 1px solid #000000;
  transition: border-color 0.3s ease;
}

footer a:hover {
  border-bottom: 1px solid transparent;
}

/* OVERLAY STYLES */
.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  z-index: 9999;
  display: none;
  justify-content: center;
  align-items: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.overlay.active {
  display: flex;
  opacity: 1;
}

.pdf-viewer {
  background-color: #fff;
  position: relative;
  width: 90%;
  height: 85%;
  border-radius: 8px;
  display: flex;
  justify-content: center;
  align-items: center;
  -webkit-overflow-scrolling: touch;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.close-button {
  position: absolute;
  top: -40px;
  right: 0;
  font-size: 40px;
  color: #fff;
  cursor: pointer;
  z-index: 10001;
  background: none;
  border: none;
  text-shadow: 0 0 4px rgba(0,0,0,0.5);
}

.loading-spinner {
  border: 4px solid rgba(0, 0, 0, 0.1);
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border-left-color: #8254ff;
  animation: spin 1s linear infinite;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 10000;
}

@keyframes spin {
  0% { transform: translate(-50%, -50%) rotate(0deg); }
  100% { transform: translate(-50%, -50%) rotate(360deg); }
}

.dynamic-embed {
  width: 100%;
  height: 100%;
  border: none;
  border-radius: 8px;
  background: #fff;
  object-fit: contain;
  z-index: 10001; /* Above spinner so it covers it when loaded */
  position: relative;
}

video.dynamic-embed {
  background: #000;
}

/* MOBILE RESPONSIVENESS */
@media (max-width: 768px) {
  nav {
    padding: 1.5rem;
    width: 95%;
  }

  nav .menuItems {
    flex-direction: column;
    gap: 1.5rem;
    align-items: center;
  }
  
  p[data-item="PretorIA"]::before {
    animation: revealText 1.5s ease-in-out forwards;
    animation-delay: 0.3s;
  }
  
  @keyframes revealText {
    0% { width: 0; }
    100% { width: 100%; }
  }

  .pdf-viewer {
    width: 100%;
    height: 100%;
    border-radius: 0;
  }

  .dynamic-embed {
    border-radius: 0;
  }

  .close-button {
    top: 10px;
    right: 20px;
    font-size: 50px;
    text-shadow: 0 0 8px rgba(0,0,0,0.8);
  }
}