/* ============================================================
   ÁLBUM HIDROITUANGO 2024
   ============================================================ */

/* ============================================================
   OVERLAYS DE AUTENTICACIÓN (login + nombre)
   ============================================================ */
.auth-overlay {
  position: fixed;
  inset: 0;
  background: linear-gradient(160deg, #060f2e 0%, #0d2a6e 55%, #0369a1 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9000;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
  overflow-y: auto;
}

.auth-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.auth-card {
  background: #fff;
  border-radius: 28px;
  padding: 44px 40px 38px;
  max-width: 440px;
  width: 100%;
  text-align: center;
  box-shadow: 0 40px 80px rgba(0, 0, 0, 0.5);
  animation: authCardIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

@keyframes authCardIn {
  0%   { opacity: 0; transform: scale(0.85) translateY(30px); }
  100% { opacity: 1; transform: scale(1) translateY(0); }
}

.auth-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 28px;
}

.auth-logo-icon {
  width: 42px;
  height: 42px;
  border-radius: 11px;
  background: linear-gradient(135deg, #f59e0b, #fcd34d);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Montserrat', sans-serif;
  font-weight: 900;
  font-size: 20px;
  color: #0d2a6e;
  flex-shrink: 0;
}

.auth-logo-text {
  display: flex;
  flex-direction: column;
  text-align: left;
}

.auth-logo-main {
  font-family: 'Montserrat', sans-serif;
  font-weight: 800;
  font-size: 14px;
  color: #0d2a6e;
  letter-spacing: 2px;
}

.auth-logo-sub {
  font-size: 10px;
  color: #64748b;
  letter-spacing: 0.3px;
}

.auth-emblem {
  font-size: 48px;
  margin-bottom: 12px;
}

.auth-title {
  font-family: 'Montserrat', sans-serif;
  font-weight: 800;
  font-size: 24px;
  color: #1e293b;
  margin-bottom: 10px;
}

.auth-desc {
  font-size: 14px;
  color: #64748b;
  line-height: 1.6;
  margin-bottom: 24px;
}

.auth-desc--small {
  font-size: 12.5px;
  margin-top: -14px;
}

.auth-input-wrap {
  margin-bottom: 12px;
}

.auth-input {
  width: 100%;
  padding: 14px 18px;
  font-size: 15px;
  font-family: 'Open Sans', sans-serif;
  border: 2.5px solid #e2e8f0;
  border-radius: 12px;
  outline: none;
  color: #1e293b;
  background: #f8fafc;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

.auth-input:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.15);
  background: #fff;
}

.auth-error {
  margin-top: -4px;
  margin-bottom: 12px;
  font-size: 13px;
  color: #ef4444;
  font-weight: 600;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 8px;
  padding: 8px 12px;
  text-align: left;
}

.auth-btn {
  width: 100%;
  padding: 15px;
  background: linear-gradient(135deg, #0d2a6e 0%, #1e4db7 100%);
  color: #fff;
  border: none;
  border-radius: 12px;
  font-family: 'Montserrat', sans-serif;
  font-weight: 800;
  font-size: 15px;
  letter-spacing: 0.5px;
  cursor: pointer;
  box-shadow: 0 5px 18px rgba(13, 42, 110, 0.35);
  transition: transform 0.18s, box-shadow 0.18s;
}

.auth-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(13, 42, 110, 0.45);
}

.auth-btn:active { transform: translateY(0); }
.auth-btn:disabled { opacity: 0.6; cursor: default; transform: none; }

.auth-btn--secondary {
  background: #f1f5f9;
  color: #475569;
  box-shadow: none;
}

.auth-btn--secondary:hover {
  background: #e2e8f0;
  box-shadow: none;
  transform: translateY(-1px);
}

.auth-sent-icon { font-size: 56px; margin-bottom: 12px; }

.auth-sent-email {
  display: inline-block;
  margin-top: 6px;
  color: #1e4db7;
  word-break: break-all;
}

/* ============================================================
   HEADER ACTIONS (user chip, ranking link, logout)
   ============================================================ */
.header-center {
  flex: 1;
  max-width: 300px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.user-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 20px;
  padding: 5px 12px;
  font-size: 12.5px;
  color: rgba(255, 255, 255, 0.9);
  font-family: 'Montserrat', sans-serif;
  font-weight: 600;
  white-space: nowrap;
  max-width: 180px;
  overflow: hidden;
}

.user-chip-icon { font-size: 14px; }

.header-link {
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 12.5px;
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
  padding: 6px 14px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 20px;
  white-space: nowrap;
  transition: background 0.18s, color 0.18s;
}

.header-link:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
}

.logout-btn {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: rgba(255, 255, 255, 0.7);
  border-radius: 20px;
  padding: 5px 13px;
  font-family: 'Montserrat', sans-serif;
  font-weight: 600;
  font-size: 11.5px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.18s, color 0.18s;
}

.logout-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

/* ============================================================
   MODAL ÁLBUM COMPLETO – acciones
   ============================================================ */
.complete-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.complete-btn {
  padding: 14px 28px;
  border-radius: 50px;
  font-family: 'Montserrat', sans-serif;
  font-weight: 800;
  font-size: 14px;
  letter-spacing: 0.5px;
  cursor: pointer;
  border: none;
  transition: transform 0.18s, box-shadow 0.18s;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.complete-btn--ranking {
  background: linear-gradient(135deg, #f59e0b, #fcd34d);
  color: #0d2a6e;
  box-shadow: 0 6px 20px rgba(245, 158, 11, 0.4);
}

.complete-btn--ranking:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(245, 158, 11, 0.55);
}

.complete-btn--close {
  background: #f1f5f9;
  color: #475569;
}

.complete-btn--close:hover {
  background: #e2e8f0;
  transform: translateY(-1px);
}

/* ============================================================
   PÁGINA DE RANKING
   ============================================================ */
.ranking-banner {
  background: linear-gradient(160deg, #0a1f56 0%, #1a4080 50%, #92400e 100%);
  padding: 48px 24px 42px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.ranking-banner-content {
  position: relative;
  z-index: 1;
}

.ranking-trophy-icon {
  font-size: 60px;
  margin-bottom: 14px;
  animation: trophy-bounce 2s ease-in-out infinite;
}

.ranking-title {
  font-family: 'Montserrat', sans-serif;
  font-weight: 900;
  font-size: 36px;
  color: #fff;
  letter-spacing: 6px;
  margin-bottom: 10px;
  text-shadow: 0 2px 16px rgba(0,0,0,0.3);
}

.ranking-subtitle {
  font-size: 15px;
  color: rgba(255, 255, 255, 0.75);
}

/* Estadísticas propias */
.my-stats-bar {
  background: linear-gradient(90deg, #fef3c7, #fffbeb, #fef3c7);
  border-bottom: 2px solid #f59e0b;
  padding: 14px 24px;
}

.my-stats-content {
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 32px;
}

.my-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.my-stat-label {
  font-size: 10.5px;
  color: #92400e;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.my-stat-value {
  font-family: 'Montserrat', sans-serif;
  font-weight: 900;
  font-size: 22px;
  color: #0d2a6e;
  line-height: 1;
}

.my-stat-divider {
  width: 1px;
  height: 36px;
  background: #f59e0b;
  opacity: 0.4;
}

/* Tabla de ranking */
.ranking-main {
  max-width: 900px;
  margin: 0 auto;
  padding: 36px 24px 60px;
}

.ranking-card {
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.08);
  border: 1px solid #e2e8f0;
  overflow: hidden;
}

.ranking-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  border-bottom: 1px solid #f1f5f9;
  background: #f8fafc;
  flex-wrap: wrap;
  gap: 10px;
}

.ranking-card-title {
  font-family: 'Montserrat', sans-serif;
  font-weight: 800;
  font-size: 16px;
  color: #1e293b;
  display: flex;
  align-items: center;
  gap: 10px;
}

.ranking-spinner {
  font-size: 18px;
  animation: spin 1s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.ranking-controls {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.refresh-info {
  font-size: 11.5px;
  color: #94a3b8;
}

.refresh-btn {
  padding: 7px 16px;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 12px;
  color: #475569;
  cursor: pointer;
  transition: background 0.18s;
}

.refresh-btn:hover { background: #e2e8f0; }
.refresh-btn:disabled { opacity: 0.5; cursor: default; }

.ranking-table-wrap {
  overflow-x: auto;
}

.ranking-table {
  width: 100%;
  border-collapse: collapse;
}

.ranking-table thead th {
  padding: 12px 16px;
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #64748b;
  background: #f8fafc;
  border-bottom: 2px solid #e2e8f0;
  text-align: left;
}

.th-pos { width: 60px; text-align: center; }
.th-stickers { width: 240px; }
.th-fecha { width: 140px; }

.ranking-row {
  border-bottom: 1px solid #f1f5f9;
  transition: background 0.15s;
}

.ranking-row:hover { background: #f8fafc; }
.ranking-row:last-child { border-bottom: none; }

.ranking-row--me {
  background: #eff6ff !important;
}

.ranking-row--me:hover { background: #dbeafe !important; }

.ranking-row--top .rank-pos { font-size: 18px; }

.ranking-table td {
  padding: 14px 16px;
  font-size: 13.5px;
  color: #334155;
  vertical-align: middle;
}

.rank-pos {
  text-align: center;
  font-family: 'Montserrat', sans-serif;
  font-weight: 800;
}

.rank-medal { font-size: 16px; }

.rank-nombre {
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  color: #1e293b;
  display: flex;
  align-items: center;
  gap: 8px;
}

.rank-you-badge {
  font-size: 10px;
  background: #1e4db7;
  color: #fff;
  padding: 2px 8px;
  border-radius: 10px;
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.rank-stickers {
  display: flex;
  align-items: center;
  gap: 10px;
}

.rank-bar-wrap {
  flex: 1;
  height: 8px;
  background: #e2e8f0;
  border-radius: 4px;
  overflow: hidden;
  min-width: 80px;
}

.rank-bar {
  height: 100%;
  background: linear-gradient(90deg, #1e4db7, #3b82f6);
  border-radius: 4px;
  transition: width 0.6s ease;
}

.rank-bar-label {
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 12px;
  color: #475569;
  white-space: nowrap;
}

.rank-fecha {
  font-size: 12px;
  color: #94a3b8;
}

.ranking-empty {
  text-align: center;
  padding: 40px 16px;
  color: #94a3b8;
  font-size: 14px;
}

.ranking-error { color: #ef4444; }

.ranking-footer-info {
  padding: 12px 24px;
  text-align: right;
  font-size: 11px;
  color: #94a3b8;
  border-top: 1px solid #f1f5f9;
  background: #f8fafc;
}

/* ============================================================
   RESPONSIVE – añadidos para auth y ranking
   ============================================================ */
@media (max-width: 900px) {
  .header-content { flex-wrap: wrap; gap: 10px; }
  .header-center { order: 3; width: 100%; max-width: 100%; }
  .header-actions { gap: 8px; }
  .user-chip { max-width: 120px; font-size: 11px; }
}

@media (max-width: 700px) {
  .auth-card { padding: 32px 22px 28px; }
  .ranking-title { font-size: 24px; letter-spacing: 3px; }
  .my-stats-content { gap: 18px; }
  .my-stat-value { font-size: 18px; }
  .th-fecha { display: none; }
  .rank-fecha { display: none; }
  .header-link { display: none; }
}

@media (max-width: 480px) {
  .my-stat-divider { display: none; }
  .my-stats-content { gap: 12px; flex-wrap: wrap; }
  .auth-title { font-size: 20px; }
}

/* --- Reset & Base --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --h-blue-dark:   #0d2a6e;
  --h-blue:        #1e4db7;
  --h-blue-light:  #3b82f6;
  --h-teal:        #0891b2;
  --h-gold:        #f59e0b;
  --h-gold-light:  #fcd34d;
  --h-green:       #059669;
  --white:         #ffffff;
  --gray-50:       #f8fafc;
  --gray-100:      #f1f5f9;
  --gray-200:      #e2e8f0;
  --gray-400:      #94a3b8;
  --gray-600:      #475569;
  --gray-800:      #1e293b;
  --album-bg:      #eef2f7;
  --page-bg:       #fdfcf9;
  --radius-card:   14px;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Open Sans', sans-serif;
  background-color: var(--album-bg);
  color: var(--gray-800);
  min-height: 100vh;
}

/* ============================================================
   HEADER
   ============================================================ */
.album-header {
  background: linear-gradient(135deg, #0a1f56 0%, #1e4db7 100%);
  position: sticky;
  top: 0;
  z-index: 200;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.35);
}

.header-content {
  max-width: 1320px;
  margin: 0 auto;
  padding: 12px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.logo-area {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
}

.logo-icon {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--h-gold), var(--h-gold-light));
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Montserrat', sans-serif;
  font-weight: 900;
  font-size: 22px;
  color: var(--h-blue-dark);
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.45);
  flex-shrink: 0;
}

.logo-text {
  display: flex;
  flex-direction: column;
}

.logo-main {
  font-family: 'Montserrat', sans-serif;
  font-weight: 800;
  font-size: 17px;
  color: #fff;
  letter-spacing: 2.5px;
  line-height: 1.1;
}

.logo-sub {
  font-size: 10.5px;
  color: rgba(255, 255, 255, 0.65);
  letter-spacing: 0.3px;
  margin-top: 2px;
}

.progress-area {
  flex: 0 1 300px;
}

.progress-label {
  display: flex;
  justify-content: space-between;
  font-family: 'Montserrat', sans-serif;
  font-weight: 600;
  font-size: 11.5px;
  color: rgba(255, 255, 255, 0.75);
  margin-bottom: 7px;
}

.progress-bar-track {
  height: 9px;
  background: rgba(255, 255, 255, 0.18);
  border-radius: 5px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--h-gold), var(--h-gold-light));
  border-radius: 5px;
  transition: width 0.9s cubic-bezier(0.4, 0, 0.2, 1);
  width: 0%;
  box-shadow: 0 0 8px rgba(245, 158, 11, 0.5);
}

/* ============================================================
   BANNER PORTADA
   ============================================================ */
.album-banner {
  background: linear-gradient(160deg, #0a1f56 0%, #1a4080 45%, #0891b2 100%);
  padding: 56px 24px 52px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.banner-bg-pattern {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 20% 50%, rgba(255,255,255,0.04) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(245,158,11,0.08) 0%, transparent 40%);
}

.banner-content {
  position: relative;
  z-index: 1;
  max-width: 760px;
  margin: 0 auto;
}

.banner-emblem {
  margin-bottom: 16px;
}

.emblem-icon {
  font-size: 60px;
  display: inline-block;
  filter: drop-shadow(0 0 24px rgba(245, 158, 11, 0.7));
  animation: pulse-glow 3s ease-in-out infinite;
}

@keyframes pulse-glow {
  0%, 100% { filter: drop-shadow(0 0 20px rgba(245, 158, 11, 0.6)); }
  50%       { filter: drop-shadow(0 0 35px rgba(245, 158, 11, 0.9)); }
}

.banner-title {
  font-family: 'Montserrat', sans-serif;
  font-weight: 900;
  font-size: 44px;
  color: #fff;
  letter-spacing: 8px;
  margin-bottom: 14px;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
}

.banner-subtitle {
  color: rgba(255, 255, 255, 0.78);
  font-size: 15.5px;
  line-height: 1.65;
  margin-bottom: 36px;
}

.banner-stats {
  display: inline-flex;
  align-items: center;
  gap: 28px;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 18px;
  padding: 18px 36px;
}

.stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.stat-num {
  font-family: 'Montserrat', sans-serif;
  font-weight: 900;
  font-size: 30px;
  color: var(--h-gold-light);
  line-height: 1;
}

.stat-pct {
  font-size: 18px;
}

.stat-label {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.65);
  text-transform: uppercase;
  letter-spacing: 1.2px;
  white-space: nowrap;
}

.stat-divider {
  width: 1px;
  height: 44px;
  background: rgba(255, 255, 255, 0.2);
}

/* ============================================================
   CÓMO FUNCIONA
   ============================================================ */
.how-to-bar {
  background: linear-gradient(90deg, #fffbeb 0%, #fef3c7 50%, #fffbeb 100%);
  border-top: 2px solid #f59e0b;
  border-bottom: 2px solid #f59e0b;
  padding: 11px 24px;
}

.how-to-content {
  max-width: 1320px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px 16px;
}

.how-to-step {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12.5px;
  font-weight: 600;
  color: #78350f;
}

.step-icon { font-size: 15px; }

.how-to-arrow {
  font-size: 20px;
  color: var(--h-gold);
  font-weight: 700;
  line-height: 1;
}

/* ============================================================
   ÁLBUM PRINCIPAL
   ============================================================ */
.album-main {
  max-width: 1320px;
  margin: 0 auto;
  padding: 40px 24px 60px;
  display: flex;
  flex-direction: column;
  gap: 44px;
}

/* ============================================================
   SECCIÓN DE DEPARTAMENTO
   ============================================================ */
.dept-section {
  background: var(--page-bg);
  border-radius: 22px;
  overflow: hidden;
  box-shadow:
    0 4px 6px -1px rgba(0, 0, 0, 0.07),
    0 2px 4px -1px rgba(0, 0, 0, 0.04);
  border: 1px solid rgba(0, 0, 0, 0.06);
}

.dept-header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 26px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.07);
}

.dept-icon {
  width: 48px;
  height: 48px;
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.2);
  border: 2px solid rgba(255, 255, 255, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  flex-shrink: 0;
}

.dept-name {
  font-family: 'Montserrat', sans-serif;
  font-weight: 800;
  font-size: 18px;
  color: #fff;
  letter-spacing: 0.5px;
}

.dept-count {
  margin-left: auto;
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.85);
  background: rgba(0, 0, 0, 0.18);
  padding: 5px 14px;
  border-radius: 20px;
  flex-shrink: 0;
  transition: background 0.3s;
}

.dept-count.complete {
  background: rgba(255, 255, 255, 0.25);
  color: #fff;
}

.dept-count.complete::before {
  content: '✅ ';
}

.stickers-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(128px, 1fr));
  gap: 18px;
  padding: 26px;
}

/* ============================================================
   STICKER CARD
   ============================================================ */
.sticker-card {
  width: 100%;
  aspect-ratio: 3 / 4;
  cursor: pointer;
  perspective: 1000px;
  transition: transform 0.22s ease, filter 0.22s ease;
  animation: popIn 0.45s ease-out both;
}

@keyframes popIn {
  0%   { opacity: 0; transform: scale(0.75) translateY(10px); }
  75%  { transform: scale(1.04) translateY(-2px); }
  100% { opacity: 1; transform: scale(1) translateY(0); }
}

.sticker-card:not(.revealed):hover {
  transform: translateY(-6px) scale(1.04);
  filter: brightness(1.1);
}

.sticker-card.revealed {
  cursor: default;
}

/* --- Inner wrapper (flip container) --- */
.sticker-inner {
  width: 100%;
  height: 100%;
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.85s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: var(--radius-card);
}

.sticker-card.revealed .sticker-inner {
  transform: rotateY(180deg);
}

/* --- Shared face styles --- */
.sticker-front,
.sticker-back {
  position: absolute;
  inset: 0;
  border-radius: var(--radius-card);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  overflow: hidden;
}

/* ---- CARA BLOQUEADA ---- */
.sticker-front {
  background: linear-gradient(155deg, #0e2b70 0%, #1a3d8f 55%, #0d2264 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 2px solid rgba(255, 255, 255, 0.1);
  box-shadow:
    0 6px 20px rgba(0, 0, 0, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

/* Patrón diagonal sutil */
.sticker-front::before {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    45deg,
    transparent,
    transparent 9px,
    rgba(255, 255, 255, 0.025) 9px,
    rgba(255, 255, 255, 0.025) 18px
  );
  border-radius: var(--radius-card);
}

/* Barrido de brillo (shimmer) */
.sticker-front::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    108deg,
    transparent 22%,
    rgba(255, 255, 255, 0.07) 42%,
    rgba(255, 255, 255, 0.14) 50%,
    rgba(255, 255, 255, 0.07) 58%,
    transparent 78%
  );
  background-size: 220% 100%;
  animation: shimmerSweep 3.5s infinite linear;
  border-radius: var(--radius-card);
}

@keyframes shimmerSweep {
  0%   { background-position: -220% center; }
  100% { background-position: 220% center; }
}

.sticker-number-badge {
  position: absolute;
  top: 9px;
  left: 10px;
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 9px;
  color: rgba(255, 255, 255, 0.38);
  letter-spacing: 1.5px;
  z-index: 2;
}

.sticker-bg-h {
  font-family: 'Montserrat', sans-serif;
  font-weight: 900;
  font-size: 52px;
  color: rgba(255, 255, 255, 0.07);
  letter-spacing: -4px;
  line-height: 1;
  position: relative;
  z-index: 1;
  user-select: none;
}

.lock-icon-wrap {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.lock-icon { font-size: 20px; opacity: 0.7; }

.lock-hint {
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 7.5px;
  color: rgba(255, 255, 255, 0.45);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  text-align: center;
  line-height: 1.4;
}

/* ---- CARA REVELADA ---- */
.sticker-back {
  transform: rotateY(180deg);
  background: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  border: 2px solid rgba(0, 0, 0, 0.07);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

/* Barra de color del departamento */
.sticker-dept-bar {
  width: 100%;
  height: 9px;
  flex-shrink: 0;
}

/* Avatar con iniciales */
.sticker-avatar {
  margin-top: 12px;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Montserrat', sans-serif;
  font-weight: 800;
  font-size: 19px;
  color: #fff;
  flex-shrink: 0;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.22);
  border: 3px solid #fff;
}

.sticker-name {
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 9px;
  color: var(--gray-800);
  text-align: center;
  line-height: 1.35;
  padding: 7px 8px 2px;
}

.sticker-cargo {
  font-family: 'Open Sans', sans-serif;
  font-size: 7.5px;
  color: var(--gray-600);
  text-align: center;
  padding: 0 8px;
  line-height: 1.3;
  font-weight: 600;
}

.sticker-dato {
  font-size: 7px;
  color: var(--gray-400);
  text-align: center;
  padding: 5px 7px 6px;
  line-height: 1.35;
  font-style: italic;
  flex: 1;
}

.sticker-num-rev {
  align-self: flex-start;
  padding: 3px 8px 7px;
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 7.5px;
  color: rgba(0, 0, 0, 0.18);
}

/* --- Sticker especial (oro) --- */
.sticker-card.especial .sticker-back {
  border: 2px solid var(--h-gold);
  box-shadow:
    0 6px 24px rgba(245, 158, 11, 0.28),
    0 0 0 1px rgba(245, 158, 11, 0.15);
  background: linear-gradient(180deg, #fffdf5 0%, #fff 100%);
}

.sticker-card.especial .sticker-back::after {
  content: '⭐';
  position: absolute;
  top: 11px;
  right: 9px;
  font-size: 10px;
}

/* Animación especial: shimmer dorado en sticker especial bloqueado */
.sticker-card.especial .sticker-front {
  background: linear-gradient(155deg, #3d2400 0%, #7c4e00 55%, #3d2400 100%);
}

/* --- Animación de reveal pulsante en loop --- */
@keyframes revealPulse {
  0%, 100% { box-shadow: 0 8px 24px rgba(0,0,0,0.12); }
  50%       { box-shadow: 0 8px 32px rgba(245, 158, 11, 0.35); }
}

.sticker-card.revealed .sticker-back {
  animation: revealPulse 3s ease-in-out infinite;
}

.sticker-card.especial.revealed .sticker-back {
  animation: revealPulse 2s ease-in-out infinite;
}

/* --- Shake en error --- */
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  15%       { transform: translateX(-9px); }
  30%       { transform: translateX(9px); }
  45%       { transform: translateX(-6px); }
  60%       { transform: translateX(6px); }
  75%       { transform: translateX(-3px); }
  90%       { transform: translateX(3px); }
}

.shake { animation: shake 0.52s ease-in-out; }

/* ============================================================
   MODAL PALABRA CLAVE
   ============================================================ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(5, 10, 30, 0.72);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  transition: opacity 0.28s ease;
  padding: 24px;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.modal-card {
  background: #fff;
  border-radius: 26px;
  padding: 38px 36px 32px;
  max-width: 430px;
  width: 100%;
  text-align: center;
  position: relative;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.45);
  transform: scale(0.88) translateY(24px);
  transition: transform 0.32s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal-overlay.active .modal-card {
  transform: scale(1) translateY(0);
}

.modal-close {
  position: absolute;
  top: 15px;
  right: 15px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: none;
  background: var(--gray-100);
  color: var(--gray-600);
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.18s, color 0.18s;
}

.modal-close:hover {
  background: var(--gray-200);
  color: var(--gray-800);
}

.modal-sticker-preview {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  background: linear-gradient(135deg, #0d2a6e, #1e4db7);
  margin: 0 auto 22px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  box-shadow: 0 10px 28px rgba(13, 42, 110, 0.35);
}

.preview-num {
  font-family: 'Montserrat', sans-serif;
  font-weight: 800;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.55);
  letter-spacing: 1px;
}

.preview-lock {
  font-size: 22px;
}

.modal-title {
  font-family: 'Montserrat', sans-serif;
  font-weight: 800;
  font-size: 22px;
  color: var(--gray-800);
  margin-bottom: 9px;
}

.modal-desc {
  font-size: 13.5px;
  color: var(--gray-600);
  line-height: 1.55;
  margin-bottom: 26px;
}

.modal-input-wrap {
  margin-bottom: 18px;
}

.keyword-input {
  width: 100%;
  padding: 15px 18px;
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 19px;
  letter-spacing: 4px;
  text-transform: uppercase;
  text-align: center;
  border: 2.5px solid var(--gray-200);
  border-radius: 13px;
  outline: none;
  color: var(--gray-800);
  background: var(--gray-50);
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

.keyword-input:focus {
  border-color: var(--h-blue-light);
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.16);
  background: #fff;
}

.keyword-input.error {
  border-color: #ef4444;
  box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.14);
  background: #fff5f5;
}

.input-error {
  margin-top: 9px;
  font-size: 12.5px;
  font-weight: 600;
  color: #ef4444;
  opacity: 0;
  transition: opacity 0.2s;
  min-height: 19px;
}

.input-error.visible { opacity: 1; }

.reveal-btn {
  width: 100%;
  padding: 16px;
  background: linear-gradient(135deg, var(--h-blue-dark) 0%, var(--h-blue) 100%);
  color: #fff;
  border: none;
  border-radius: 13px;
  font-family: 'Montserrat', sans-serif;
  font-weight: 800;
  font-size: 16px;
  letter-spacing: 2.5px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: 0 5px 18px rgba(13, 42, 110, 0.35);
  transition: transform 0.18s, box-shadow 0.18s, background 0.18s;
}

.reveal-btn:hover {
  background: linear-gradient(135deg, #1a3c8a 0%, #2563eb 100%);
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(13, 42, 110, 0.45);
}

.reveal-btn:active {
  transform: translateY(0);
  box-shadow: 0 4px 12px rgba(13, 42, 110, 0.3);
}

.btn-icon { font-size: 18px; }

/* ============================================================
   NOTIFICACIÓN DE ÉXITO
   ============================================================ */
.notif {
  position: fixed;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%) translateY(120px);
  background: linear-gradient(135deg, #047857, #059669);
  color: #fff;
  padding: 14px 30px;
  border-radius: 50px;
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 14.5px;
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 2000;
  box-shadow: 0 10px 30px rgba(5, 150, 105, 0.45);
  transition: transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
  white-space: nowrap;
  pointer-events: none;
}

.notif.show {
  transform: translateX(-50%) translateY(0);
}

.notif-icon { font-size: 18px; }

/* ============================================================
   MODAL ÁLBUM COMPLETO
   ============================================================ */
.complete-overlay {
  position: fixed;
  inset: 0;
  background: rgba(5, 10, 30, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 3000;
  opacity: 0;
  pointer-events: none;
  backdrop-filter: blur(6px);
  transition: opacity 0.35s ease;
  padding: 24px;
}

.complete-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.complete-card {
  background: #fff;
  border-radius: 28px;
  padding: 52px 44px 40px;
  max-width: 460px;
  width: 100%;
  text-align: center;
  box-shadow: 0 40px 80px rgba(0, 0, 0, 0.5);
  border-top: 6px solid var(--h-gold);
  transform: scale(0.85);
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.complete-overlay.active .complete-card {
  transform: scale(1);
}

.complete-trophy {
  font-size: 72px;
  margin-bottom: 16px;
  animation: trophy-bounce 1.5s ease-in-out infinite;
}

@keyframes trophy-bounce {
  0%, 100% { transform: translateY(0) rotate(-3deg); }
  50%       { transform: translateY(-10px) rotate(3deg); }
}

.complete-title {
  font-family: 'Montserrat', sans-serif;
  font-weight: 900;
  font-size: 32px;
  color: var(--gray-800);
  margin-bottom: 14px;
}

.complete-desc {
  font-size: 15px;
  color: var(--gray-600);
  line-height: 1.6;
  margin-bottom: 30px;
}

.complete-btn {
  padding: 14px 40px;
  background: linear-gradient(135deg, var(--h-gold), var(--h-gold-light));
  color: var(--h-blue-dark);
  border: none;
  border-radius: 50px;
  font-family: 'Montserrat', sans-serif;
  font-weight: 800;
  font-size: 15px;
  letter-spacing: 1px;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(245, 158, 11, 0.4);
  transition: transform 0.18s, box-shadow 0.18s;
}

.complete-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(245, 158, 11, 0.55);
}

/* ============================================================
   CONFETTI
   ============================================================ */
#confetti-container {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1500;
  overflow: hidden;
}

.confetti-piece {
  position: fixed;
  animation: confettiExplode var(--duration, 0.8s) ease-out forwards;
}

@keyframes confettiExplode {
  0% {
    transform: translate(0, 0) rotate(0deg) scale(1);
    opacity: 1;
  }
  100% {
    transform: translate(var(--tx), var(--ty)) rotate(var(--rot)) scale(0.2);
    opacity: 0;
  }
}

/* ============================================================
   FOOTER DEL ÁLBUM
   ============================================================ */
.album-footer {
  text-align: center;
  padding: 36px 24px;
  color: var(--gray-400);
  font-size: 12.5px;
  border-top: 1px solid var(--gray-200);
  margin-top: 8px;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
  .banner-title { font-size: 34px; letter-spacing: 5px; }
  .stat-num { font-size: 24px; }
  .banner-stats { gap: 20px; padding: 14px 24px; }
}

@media (max-width: 700px) {
  .header-content { flex-direction: column; align-items: flex-start; gap: 12px; }
  .progress-area { width: 100%; flex: none; }
  .banner-title { font-size: 26px; letter-spacing: 3px; }
  .banner-subtitle { font-size: 13.5px; }
  .emblem-icon { font-size: 44px; }
  .banner-stats { gap: 14px; padding: 12px 18px; flex-wrap: wrap; }
  .stat-divider { display: none; }
  .stickers-grid { gap: 13px; padding: 18px; grid-template-columns: repeat(auto-fill, minmax(108px, 1fr)); }
  .how-to-arrow { display: none; }
  .modal-card { padding: 30px 22px 26px; }
}

@media (max-width: 480px) {
  .stickers-grid { grid-template-columns: repeat(3, 1fr); gap: 10px; padding: 14px; }
  .banner-title { font-size: 20px; letter-spacing: 2px; }
}
