@font-face {
  font-family: 'Avenir';
  font-weight: 300;
  src: url('fonts/avenir-light.ttf') format('truetype');
}

@font-face {
  font-family: 'Avenir';
  font-weight: 500;
  src: url('fonts/avenir-medium.ttf') format('truetype');
}

@font-face {
  font-family: 'Avenir';
  font-weight: 900;
  src: url('fonts/Avenir Black.ttf') format('truetype');
}

:root {
  --screen-bg: #091117;
  --screen-bg-2: #0f1c24;
  --gold: #d1b174;
  --gold-soft: rgba(209, 177, 116, 0.24);
  --line: rgba(255, 255, 255, 0.1);
  --text-soft: rgba(255, 255, 255, 0.62);
}

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

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background:
    radial-gradient(circle at top left, rgba(209, 177, 116, 0.08), transparent 18%),
    radial-gradient(circle at right center, rgba(40, 89, 108, 0.16), transparent 30%),
    linear-gradient(160deg, var(--screen-bg) 0%, var(--screen-bg-2) 100%);
  color: #ffffff;
  font-family: 'Avenir', sans-serif;
  font-weight: 300;
}

.fullscreen-enabled html,
.fullscreen-enabled body {
  cursor: none;
}

#layout {
  display: flex;
  width: 100%;
  height: 100%;
}

#main-area {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  position: relative;
}

#slides-container {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
  position: relative;
  overflow: hidden;
  padding: 2.8vw;
}

#slides-container::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 18% 20%, rgba(209, 177, 116, 0.08) 0%, transparent 46%),
    radial-gradient(ellipse at 82% 68%, rgba(58, 122, 147, 0.09) 0%, transparent 38%);
  pointer-events: none;
  z-index: 0;
}

#slide-content {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 1;
  border-radius: 34px;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0.01));
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.04),
    0 24px 54px rgba(0, 0, 0, 0.22);
}

#slide-content > div {
  width: 100%;
  height: 100%;
}

.slide-item {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: min(2vh, 18px);
}

.slide-current {
  z-index: 2;
}

#slide-content img,
#slide-content video {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  object-position: center center;
  display: block;
}

.empty-state {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.6rem;
}

.empty-state .empty-icon {
  font-size: 4rem;
  opacity: 0.3;
}

.empty-state p {
  font-size: 1.35rem;
  opacity: 0.46;
  font-weight: 300;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

#footer {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 2.2vh 3vw 2.8vh;
  background: linear-gradient(0deg, rgba(2, 5, 7, 0.82) 0%, transparent 100%);
  pointer-events: none;
  z-index: 2;
}

#dots {
  display: flex;
  gap: 0.65rem;
  align-items: center;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  transition: all 0.4s ease;
}

.dot.active {
  background: rgba(209, 177, 116, 0.92);
  width: 28px;
  border-radius: 999px;
  box-shadow: 0 0 14px rgba(209, 177, 116, 0.35);
}

#next-info {
  font-size: 0.8rem;
  font-weight: 500;
  opacity: 0.58;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

#sidebar {
  width: 24vw;
  min-width: 240px;
  max-width: 360px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: center;
  gap: 0;
  padding: 2.4vw 2vw;
  background:
    linear-gradient(180deg, rgba(12, 22, 28, 0.84), rgba(8, 14, 18, 0.92));
  border-left: 1px solid rgba(255, 255, 255, 0.08);
  position: relative;
  overflow: hidden;
}

#sidebar::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(209, 177, 116, 0.06) 0%, transparent 26%),
    radial-gradient(circle at top center, rgba(209, 177, 116, 0.1), transparent 34%);
  pointer-events: none;
}

#clock,
#date,
#welcome-container,
#weather {
  position: relative;
  z-index: 1;
}

#clock {
  font-size: clamp(3.2rem, 5vw, 5.6rem);
  font-weight: 900;
  line-height: 0.95;
  letter-spacing: -0.05em;
  color: #ffffff;
  text-align: center;
}

#clock::before {
  content: 'Horario';
  display: block;
  margin-bottom: 1.2rem;
  color: rgba(255, 255, 255, 0.4);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}

#clock::after {
  content: '';
  display: block;
  width: 48%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(209, 177, 116, 0.75), transparent);
  margin: 1.4rem auto 1rem;
}

#date {
  font-size: clamp(0.88rem, 1vw, 1.02rem);
  font-weight: 500;
  color: rgba(255, 255, 255, 0.64);
  letter-spacing: 0.06em;
  margin-bottom: 2rem;
  text-transform: capitalize;
  text-align: center;
}

#welcome-container {
  width: 100%;
  overflow: hidden;
  white-space: nowrap;
  margin: 0 0 2rem;
  padding: 1rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

#welcome {
  display: inline-block;
  white-space: nowrap;
  font-size: clamp(0.95rem, 1.05vw, 1.15rem);
  font-weight: 500;
  color: rgba(255, 255, 255, 0.82);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0 2px;
}

#welcome.scrolling {
  animation: marquee 25s linear infinite;
}

@keyframes marquee {
  0% { transform: translateX(30vw); }
  100% { transform: translateX(-100%); }
}

#weather {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  padding-top: 1.75rem;
  width: 100%;
  transition: opacity 0.5s ease;
}

#weather::before {
  content: 'Clima';
  display: block;
  color: rgba(255, 255, 255, 0.42);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}

#weather-icon {
  font-size: clamp(2.2rem, 3vw, 3.2rem);
  line-height: 1;
  margin-bottom: 0.25rem;
  animation: weatherFloat 3s ease-in-out infinite;
}

@keyframes weatherFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

#weather-temp {
  font-size: clamp(2rem, 3vw, 3rem);
  font-weight: 900;
  line-height: 1.1;
  color: #ffffff;
}

#weather-desc {
  font-size: clamp(0.8rem, 0.92vw, 0.92rem);
  font-weight: 300;
  color: var(--text-soft);
  text-transform: capitalize;
  letter-spacing: 0.04em;
}

#loading {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  background:
    radial-gradient(circle at top left, rgba(209, 177, 116, 0.07), transparent 22%),
    linear-gradient(180deg, #081116 0%, #0c171d 100%);
  z-index: 100;
  font-weight: 500;
  font-size: 0.92rem;
  opacity: 0.72;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.loading-bar {
  width: 136px;
  height: 2px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  overflow: hidden;
}

.loading-bar-inner {
  width: 30%;
  height: 100%;
  background: rgba(209, 177, 116, 0.8);
  border-radius: 999px;
  animation: loadingSweep 1.4s ease-in-out infinite;
}

@keyframes loadingSweep {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(400%); }
}

#fullscreen-prompt {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(5, 9, 12, 0.8);
  z-index: 200;
  cursor: pointer;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

#fullscreen-prompt p {
  font-size: clamp(1.2rem, 2vw, 1.85rem);
  font-weight: 300;
  color: #fff;
  text-align: center;
  padding: 1.9rem 3rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.04);
  letter-spacing: 0.04em;
  animation: fadeInOut 2.8s ease-in-out infinite;
}

#fullscreen-prompt strong {
  font-weight: 500;
  color: rgba(209, 177, 116, 0.96);
}

@keyframes fadeInOut {
  0%, 100% { opacity: 0.74; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.02); }
}

.hidden {
  display: none !important;
}

.slide-enter {
  animation: slideEnter 0.42s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.slide-exit {
  z-index: 1;
  animation: slideExit 0.42s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes slideEnter {
  from { opacity: 0; transform: scale(0.985); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes slideExit {
  from { opacity: 1; transform: scale(1); }
  to { opacity: 0; transform: scale(1.01); }
}
