@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700;800;900&family=Caveat:wght@700&display=swap');

:root {
  --primary-blue: #0044cc;
  --dark-blue: #002266;
  --deep-navy: #001133;
  --accent-blue: #0055ff;
  --light-blue-bg: #e6f2ff;
  --text-dark: #002266;
  --text-muted: #64748b;
  --font-family: 'Outfit', sans-serif;
  --cursive-font: 'Caveat', cursive;
}

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

body {
  margin: 0;
  padding: 0;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  font-family: var(--font-family);
  background: radial-gradient(circle at top left, #001133 0%, transparent 60%),
              radial-gradient(circle at top right, #0044cc 0%, transparent 60%),
              radial-gradient(circle at bottom left, #00d2ff 0%, transparent 60%),
              radial-gradient(circle at bottom right, #ffffff 0%, transparent 60%),
              #002266;
  display: flex;
  justify-content: center;
  align-items: center;
  box-sizing: border-box;
  user-select: none;
}

/* LA APP DE LA TV EN 16:9 FIJO A 1920x1080 (se escala por JS) */
.tv-app {
  width: 1920px;
  height: 1080px;
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%) scale(1);
  transform-origin: center center;
  background: linear-gradient(to right, rgba(230, 242, 255, 0.98) 0%, rgba(230, 242, 255, 0.96) 28%, rgba(230, 242, 255, 0.8) 42%, rgba(230, 242, 255, 0.15) 60%, rgba(230, 242, 255, 0) 100%), url('mar_del_plata_coast.png') no-repeat center center / cover;
  border: none;
  border-radius: 0;
  box-shadow: inset 0 0 15px rgba(0,0,0,0.1), 0 30px 80px rgba(0, 0, 0, 0.5);
  box-sizing: border-box;
  display: grid;
  grid-template-rows: auto 1fr auto;
  padding: 40px 48px;
  gap: 32px;
  overflow: hidden;
}

/* TOP HEADER */
.top-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 32px;
  position: relative;
}

.escudo {
  height: 160px;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 8px 20px rgba(0, 34, 102, 0.2));
}

.header-titles h1 {
  font-size: 58px;
  font-weight: 900;
  color: var(--dark-blue);
  line-height: 1.1;
  letter-spacing: -1px;
  margin: 0;
}

.header-titles p {
  font-size: 18px;
  font-weight: 800;
  color: var(--primary-blue);
  letter-spacing: 2.5px;
  margin-top: 6px;
  text-transform: uppercase;
}

.header-seagulls {
  position: absolute;
  right: -220px;
  top: 10px;
  width: 200px;
  height: 70px;
  pointer-events: none;
}

.header-right-widget {
  display: flex;
  align-items: center;
  gap: 20px;
}

.top-header-pill {
  background: var(--dark-blue);
  border-radius: 36px;
  padding: 14px 32px;
  box-shadow: 0 8px 24px rgba(0, 34, 102, 0.2);
  display: flex;
  align-items: center;
  gap: 24px;
  color: #fff;
  height: 76px;
}

.weather-section {
  display: flex;
  align-items: center;
  gap: 16px;
}

.weather-sun-icon {
  width: 36px;
  height: 36px;
  display: block;
  animation: sunPulse 4s ease-in-out infinite alternate;
}

@keyframes sunPulse {
  0% { transform: scale(1); filter: drop-shadow(0 0 2px rgba(245, 158, 11, 0.3)); }
  100% { transform: scale(1.1); filter: drop-shadow(0 0 6px rgba(245, 158, 11, 0.7)); }
}

.weather-info {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.weather-temp {
  font-size: 26px;
  font-weight: 800;
  line-height: 1;
}

.weather-city {
  font-size: 14px;
  color: #60a5fa;
  text-transform: uppercase;
  font-weight: 600;
  margin-top: 3px;
}

.pill-vertical-divider {
  width: 1px;
  height: 36px;
  background: rgba(255, 255, 255, 0.3);
}

.time-section {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
}

.clock-time {
  font-size: 26px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0.5px;
}

.clock-date {
  font-size: 14px;
  color: #60a5fa;
  margin-top: 3px;
  font-weight: 600;
  text-transform: capitalize;
}

/* MAIN CONTENT GRID */
.main-content {
  display: grid;
  grid-template-columns: 1.15fr 4.35fr 2.85fr;
  gap: 30px;
  height: 100%;
  min-height: 0;
  box-sizing: border-box;
}

/* SIDEBAR IZQUIERDA (AZUL SOLID) */
.left-sidebar-card {
  background: var(--dark-blue);
  color: #fff;
  border-radius: 36px;
  padding: 48px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  justify-content: space-between;
  box-shadow: 0 16px 40px rgba(0, 34, 102, 0.2);
  box-sizing: border-box;
}

.sidebar-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  width: 100%;
}

.sidebar-svg-icon {
  width: 120px;
  height: 96px;
  display: block;
  margin-bottom: 8px;
}

.sidebar-text {
  font-size: 22px;
  font-weight: 700;
  line-height: 1.3;
  padding: 0 10px;
}

.divider-heart {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 16px 0;
}

.divider-line {
  flex: 1;
  height: 1px;
  background: rgba(255, 255, 255, 0.15);
}

.heart-inline-svg {
  width: 20px;
  height: 20px;
}

.sidebar-callout {
  font-size: 28px;
  font-weight: 900;
  color: #fff;
  line-height: 1.2;
}

.highlight-cyan {
  color: #00d2ff;
  display: block;
}

.handshake-svg {
  width: 100px;
  height: 100px;
  display: block;
  margin-bottom: 12px;
}

.sidebar-footer-text {
  font-size: 16px;
  color: rgba(255, 255, 255, 0.85);
  line-height: 1.3;
  font-weight: 600;
}

/* CENTRO: TABLA TOP 10 BARRIOS */
.top10-card {
  background: #fff;
  border-radius: 36px;
  padding: 36px 42px;
  box-shadow: 0 16px 50px rgba(0, 34, 102, 0.05);
  display: flex;
  flex-direction: column;
  border: none;
  box-sizing: border-box;
}

.top10-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 2px solid #f1f5f9;
}

.top10-title {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 26px;
  font-weight: 800;
  color: var(--dark-blue);
}

.trophy-svg-icon {
  width: 32px;
  height: 32px;
  fill: var(--dark-blue);
}

.top10-subtitle {
  font-size: 18px;
  font-weight: 800;
  color: var(--text-muted);
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.barrios-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  flex: 1;
  justify-content: space-between;
}

.barrio-row {
  display: grid;
  grid-template-columns: 44px 180px 1fr 70px;
  align-items: center;
  gap: 20px;
}

.rank-badge {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--dark-blue);
  color: #fff;
  font-size: 20px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}

.rank-badge.top-1 { background: var(--accent-blue); }
.rank-badge.top-2 { background: #0055d4; }
.rank-badge.top-3 { background: #1a66ff; }

.barrio-row-name {
  font-size: 24px;
  font-weight: 800;
  color: var(--dark-blue);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.barrio-progress-track {
  width: 100%;
  height: 16px;
  background: #f1f5f9;
  border-radius: 10px;
  overflow: hidden;
}

.barrio-progress-fill {
  height: 100%;
  background: var(--accent-blue);
  border-radius: 10px;
  transition: width 1s ease-in-out;
}

.barrio-count {
  font-size: 26px;
  font-weight: 800;
  color: var(--dark-blue);
  text-align: right;
}

/* COLUMNA DERECHA */
.right-column {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: flex-end;
  height: 100%;
}

.callout-card {
  background: #fff;
  border-radius: 36px;
  width: 360px;
  height: 360px;
  padding: 32px 28px;
  box-shadow: 0 16px 50px rgba(0, 56, 130, 0.05);
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: flex-start;
  gap: 24px;
  box-sizing: border-box;
}

.callout-top-row {
  display: flex;
  align-items: center;
  gap: 20px;
  width: 100%;
  text-align: left;
}

.callout-title {
  font-size: 26px;
  font-weight: 800;
  color: var(--dark-blue);
  line-height: 1.2;
  text-align: left;
}

.all-barrios-card {
  background: #fff;
  border-radius: 36px;
  width: 550px;
  padding: 30px 36px;
  box-shadow: 0 16px 50px rgba(0, 56, 130, 0.05);
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
}

.all-barrios-header {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 24px;
  font-weight: 800;
  color: var(--dark-blue);
  margin-bottom: 18px;
  padding-bottom: 12px;
  border-bottom: 2px solid #f1f5f9;
}

.all-barrios-list-icon {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
}

.all-barrios-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 20px;
  font-size: 18px;
  font-weight: 700;
  color: var(--dark-blue);
}

.all-barrio-item {
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.all-barrio-item::before {
  content: '•';
  color: var(--accent-blue);
  font-weight: 900;
  font-size: 24px;
  line-height: 1;
}

/* FOOTER INFERIOR */
.bottom-footer {
  background: var(--dark-blue);
  color: #fff;
  border-radius: 20px;
  padding: 14px 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  font-size: 22px;
  font-weight: 700;
  box-shadow: 0 8px 30px rgba(0, 34, 102, 0.2);
  box-sizing: border-box;
}

.footer-star-wrapper {
  flex-shrink: 0;
}

.footer-star-svg {
  width: 32px;
  height: 32px;
  display: block;
}

.footer-text {
  line-height: 1;
}

.footer-thanks {
  color: #00d2ff;
  font-weight: 700;
}

/* IMAGENES OFICIALES SUBIDAS POR EL USUARIO */
.sidebar-img-asset {
  width: 120px;
  height: auto;
  object-fit: contain;
  display: block;
  margin-bottom: 8px;
}

.sidebar-img-asset.hands-asset {
  width: 100px;
  margin-bottom: 12px;
}

.heart-badge-asset {
  width: 80px;
  height: auto;
  object-fit: contain;
  display: block;
  flex-shrink: 0;
}

.sumate-text-asset {
  width: 275px;
  height: auto;
  object-fit: contain;
  display: block;
  margin-bottom: 0;
}

/* ESTILOS DE REPRODUCTOR DE DIAPOSITIVAS */
.tv-slide-pane {
  width: 100%;
  height: 100%;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 12px 36px rgba(0, 34, 102, 0.25);
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
}

.text-pane {
  background: linear-gradient(135deg, var(--dark-blue) 0%, var(--deep-navy) 100%);
  color: #fff;
  padding: 48px;
  justify-content: center;
  align-items: flex-start;
  gap: 16px;
  border: 4px solid var(--accent-blue);
}

.text-pane .slide-badge {
  background: var(--accent-blue);
  color: white;
  font-size: 14px;
  font-weight: 800;
  padding: 6px 16px;
  border-radius: 8px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

.text-pane h2 {
  font-size: 48px;
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -0.5px;
}

.text-pane p {
  font-size: 26px;
  color: #cbd5e1;
  line-height: 1.5;
  font-weight: 500;
  max-width: 90%;
}

.image-pane {
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  position: relative;
  border: 4px solid var(--accent-blue);
}

.tv-slide-image-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  background: linear-gradient(0deg, rgba(0, 21, 64, 0.9) 0%, rgba(0, 21, 64, 0) 100%);
  padding: 40px 48px;
  color: #fff;
}

.tv-slide-image-overlay h2 {
  font-size: 42px;
  font-weight: 900;
  line-height: 1.2;
}

.video-pane {
  background: #000;
}

/* ANIMACIONES */
.animate-fade-in {
  animation: tvFadeIn 0.8s ease-out forwards;
}

@keyframes tvFadeIn {
  from {
    opacity: 0;
    transform: scale(0.98);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

