@import url("https://fonts.googleapis.com/css2?family=Mulish:wght@400;700&display=swap");

@font-face {
  font-family: "Digital7";
  src: url("fonts/digital-7.ttf") format("truetype");
  font-weight: normal;
  font-style: normal;
}

button {
  -webkit-tap-highlight-color: transparent; /* disable default blue flash */
}

button:active {
  background: rgba(255, 111, 0, 0.3);
  border-radius: 8px;
  transform: scale(0.85);
  transition: transform 0.1s ease;
}

body {
  margin: 0;
  font-family: "Mulish", sans-serif;
  color: #f5efe2;
  background: url("images/background.png") no-repeat center center/cover;
  display: flex;
  min-height: 100vh;
  position: relative;
}

/* Overlay for readability */
body::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.25);
  z-index: 0;
}

body.no-scroll {
  overflow: hidden;
}

/* Sidebar */
.sidebar {
  width: 245px;
  background: rgba(40, 30, 20, 0.9);
  backdrop-filter: blur(6px);
  padding: 0.25rem;
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 2rem;
  transform: translateX(0);
  transition: transform 0.3s ease;
}

.sidebar h1 {
  margin: 0;
  text-align: center;
  font-size: 1.75rem;
}

.sidebar ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.sidebar a {
  text-decoration: none;
  color: #f5efe2;
  font-weight: bold;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.6rem 0.8rem;
  border-radius: 8px;
  transition: background 0.3s;
  font-size: 1.3rem;
}

.sidebar a:hover {
  background: rgba(255, 111, 0, 0.8);
}

.sidebar-header {
  position: relative;
  width: 100%;
  text-align: center; /* título no centro */
}

.sidebar-hamburger {
  display: none;
  position: absolute;
  left: 0; /* botão o mais à esquerda possível */
  background: none;
  border: none;
  font-size: 1.6rem;
  color: #f5efe2;
  cursor: pointer;
}

/* Main content */
.main-content {
  margin-left: 275px; /* sidebar space */
  flex: 1;
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 1;
}

/* Header */
header {
  padding: 1rem;
  background: rgba(40, 30, 20, 0.7);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
}

header h1 {
  margin: 0;
  font-size: 1.6rem;
}

#clock {
  font-family: "Digital7", monospace;
  font-size: 2rem;
  letter-spacing: 4px;
  margin-left: auto; /* empurra o relógio para a direita */
}

.colon {
  animation: blink 1s steps(1, end) infinite;
}

@keyframes blink {
  50% {
    opacity: 0;
  }
}

/* Hamburger (mobile only) */
.hamburger {
  display: none;
}

/* Main */
main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  text-align: center;
}

main h2 {
  font-size: 5rem;
  margin-bottom: 1rem;
  background: rgba(255, 140, 0, 0.7);
  padding: 0.5rem 1.2rem;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.subtitle {
  max-width: 850px;
  font-size: 1.75rem;
  line-height: 1.6;
  margin-bottom: 2rem;
  background: rgba(0, 0, 0, 0.5);
  padding: 1rem;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  font-weight: unset;
}

.links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
}

.links a {
  padding: 0.8rem 1.4rem;
  background: rgba(255, 87, 34, 0.85);
  border-radius: 12px;
  text-decoration: none;
  color: #f5efe2;
  font-weight: bold;
  transition: all 0.3s ease;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.links a:hover {
  background: rgba(255, 111, 0, 1);
  transform: translateY(-2px);
}

/* Footer */
footer {
  position: relative;
  z-index: 1; /* menor que sidebar */
  padding: 1rem;
  text-align: center;
  background: rgba(40, 30, 20, 0.7);
  font-size: 0.9rem;
}

.fade-out {
  opacity: 0;
  transition: opacity 0.2s ease;
}

.fade-in {
  opacity: 1;
  transition: opacity 0.3s ease;
}

/* Responsive */
@media (max-width: 768px) {
  header {
    justify-content: space-between; /* hamburger left, clock right */
    padding: 0.25rem;
  }
  .sidebar {
    transform: translateX(-100%);
    position: fixed;
    width: calc(100% - 0.5rem);
  }
  .sidebar.open {
    transform: translateX(0);
  }
  .sidebar.open .sidebar-hamburger {
    display: block;
  }
  .main-content {
    margin-left: 0;
    height: 100vh; /* ocupa só o viewport */
    overflow: hidden; /* evita scroll dentro do main */
    display: flex;
    flex-direction: column;
  }
  .main-content.scrollable {
    overflow-y: auto;
  }
  .subtitle {
    font-size: unset;
  }
  .hamburger {
    display: block;
    background: none;
    border: none;
    font-size: 1.6rem;
    color: #f5efe2;
    cursor: pointer;
  }
  main h2 {
    font-size: 3rem;
  }
  main p {
    font-size: 1.25rem;
  }
  #clock {
    font-size: 1.75rem;
  }
}
