/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --pink-deep:   #e8417a;
  --pink-mid:    #f06fab;
  --pink-light:  #f9b8d0;
  --pink-pale:   #fde8f0;
  --gold:        #d4a84b;
  --gold-light:  #f2d98a;
  --white:       #ffffff;
  --text-dark:   #8b1a4a;
  --text-med:    #c0527a;
  --badge-1:     #c0392b;
  --badge-2:     #8e44ad;
  --shadow:      rgba(232, 65, 122, 0.25);
  --radius-card: 18px;
}

body {
  font-family: 'Nunito', sans-serif;
  min-height: 100vh;
  background-image: url('img/Fundo.png');
  padding: 0;
  min-height: 100vh;
  /*background: linear-gradient(135deg, #f8c8d8 0%, #fbd3a0 40%, #f5a7c0 70%, #fbd3a0 100%);*/
  overflow-x: hidden;
  position: relative;
   background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
}


/* ===== DECORATIVE FLOWERS ===== */
.flower {
  position: fixed;
  width: 220px;
  height: 220px;
  pointer-events: none;
  z-index: 0;
  background-size: contain;
  background-repeat: no-repeat;
  opacity: 0.85;
}

/* Simulate flowers with CSS radial gradients + emoji */
.flower::before {
  content: '\a';
  font-size: 64px;
  white-space: pre;
  line-height: 1;
  display: block;
  filter: drop-shadow(0 2px 8px rgba(232,65,122,0.3));
}





.flower-tl { top: 1; left: -50px; transform: rotate(-0deg); }
.flower-tr { top: -20px; right: -20px; transform: rotate(20deg) scaleX(-1); }
.flower-bl { bottom: -20px; left: -20px; transform: rotate(160deg); }
.flower-br { bottom: -20px; right: -20px; transform: rotate(-160deg) scaleX(-1); }

/* ===== WRAPPER ===== */
.wrapper {
  position: relative;
  z-index: 1;
  max-width: 1400px;
  margin: 0 auto;
  padding: 24px 32px 20px;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ===== HEADER ===== */
.header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 28px;
}

.header-icon {
  font-size: 40px;
  filter: drop-shadow(0 2px 6px var(--shadow));
  animation: float 3s ease-in-out infinite;
}

.header-icon:last-child { animation-delay: 1.5s; }

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

.title-block {
  text-align: center;
}

.title-main {
  font-family: 'Playfair Display', serif;
  font-size: clamp(36px, 5vw, 72px);
  font-weight: 900;
  line-height: 0.9;
  color: var(--white);
  text-shadow:
    -2px -2px 0 var(--pink-deep),
    2px -2px 0 var(--pink-deep),
    -2px 2px 0 var(--pink-deep),
    2px 2px 0 var(--pink-deep),
    0 4px 16px rgba(232,65,122,0.5);
  letter-spacing: 2px;
  background: linear-gradient(180deg, #fff 30%, #f9b8d0 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 2px 8px var(--pink-deep));
}

.title-sub {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 6px;
  background: rgba(255,255,255,0.35);
  backdrop-filter: blur(6px);
  border-radius: 50px;
  padding: 4px 16px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 3px;
  color: var(--pink-deep);
  border: 1px solid rgba(255,255,255,0.6);
  box-shadow: 0 2px 12px var(--shadow);
}

.rose-icon { font-size: 14px; }

/* ===== TEAMS CONTAINER ===== */
.teams-container {
  display: grid;
  grid-template-columns: 1fr 6px 1fr;
  gap: 0 20px;
  flex: 1;
}

/* ===== DIVIDER ===== */
.divider {
  display: flex;
  align-items: stretch;
  justify-content: center;
}

.divider-line {
  width: 3px;
  background: linear-gradient(180deg, transparent, var(--pink-light) 20%, var(--pink-deep) 50%, var(--pink-light) 80%, transparent);
  border-radius: 4px;
  box-shadow: 0 0 12px var(--shadow);
}

/* ===== TEAM ===== */
.team {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* ===== TEAM HEADER ===== */
.team-header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 16px;
  background: rgba(255,255,255,0.25);
  backdrop-filter: blur(8px);
  border-radius: var(--radius-card);
  border: 1px solid rgba(255,255,255,0.5);
  box-shadow: 0 4px 24px var(--shadow);
}

.team-header.reverse {
  flex-direction: row-reverse;
}

/* ===== PLACE BADGE ===== */
.place-badge {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Playfair Display', serif;
  font-size: 26px;
  font-weight: 900;
  color: white;
  flex-shrink: 0;
  position: relative;
  box-shadow: 0 4px 16px rgba(0,0,0,0.2);
  transition: transform 0.3s ease;
}

.place-badge:hover { transform: scale(1.08); }

.place-badge[data-rank="1"] {
  background: linear-gradient(135deg, #f7c948, #d4a84b);
  box-shadow: 0 4px 16px rgba(212,168,75,0.5);
}

.place-badge[data-rank="2"] {
  background: linear-gradient(135deg, #c0c8d4, #8a97a8);
  box-shadow: 0 4px 16px rgba(138,151,168,0.4);
}

/* Before: decorative star */
.place-badge::after {
  content: '★';
  position: absolute;
  font-size: 10px;
  top: 2px;
  right: 2px;
  opacity: 0.7;
}

/* ===== LEADER PHOTO ===== */
.leader-photo-wrap {
  position: relative;
  width: 70px;
  height: 70px;
  flex-shrink: 0;
}

.leader-photo {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--gold);
  box-shadow: 0 0 0 3px var(--gold-light), 0 4px 16px var(--shadow);
  display: block;
}

.leader-ring {
  position: absolute;
  inset: -5px;
  border-radius: 50%;
  border: 2px dashed var(--gold-light);
  animation: spin 12s linear infinite;
  pointer-events: none;
}

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

/* ===== TEAM TOTAL ===== */
.team-total {
  flex: 1;
  background: rgba(255,255,255,0.9);
  border-radius: 50px;
  padding: 10px 22px;
  font-size: clamp(18px, 2.2vw, 28px);
  font-weight: 800;
  color: var(--pink-deep);
  text-align: center;
  box-shadow: 0 2px 12px var(--shadow);
  border: 2px solid rgba(255,255,255,0.8);
  letter-spacing: 0.5px;
  transition: background 0.4s;
}

/* ===== SELLERS GRID ===== */
.sellers-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

/* ===== SELLER CARD ===== */
.seller-card {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255,255,255,0.22);
  backdrop-filter: blur(6px);
  border-radius: 50px;
  padding: 6px 14px 6px 6px;
  border: 1px solid rgba(255,255,255,0.45);
  box-shadow: 0 2px 10px var(--shadow);
  transition: transform 0.2s, box-shadow 0.2s;
  animation: fadeIn 0.5s ease both;
}

.seller-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px var(--shadow);
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

.seller-rank {
  font-size: 11px;
  font-weight: 800;
  color: var(--text-med);
  min-width: 22px;
  text-align: center;
}

.seller-photo-wrap {
  position: relative;
  width: 42px;
  height: 42px;
  flex-shrink: 0;
}

.seller-photo {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--gold-light);
  box-shadow: 0 2px 8px var(--shadow);
  display: block;
  background: linear-gradient(135deg, #fbd3a0, #f9b8d0);
}

.seller-value {
  flex: 1;
  background: rgba(255,255,255,0.85);
  border-radius: 50px;
  padding: 5px 12px;
  font-size: clamp(12px, 1.2vw, 15px);
  font-weight: 700;
  color: var(--pink-deep);
  text-align: center;
  box-shadow: inset 0 1px 4px rgba(232,65,122,0.1);
  white-space: nowrap;
  min-width: 80px;
}

/* ===== FOOTER ===== */
.footer {
  margin-top: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  background: rgba(255,255,255,0.2);
  backdrop-filter: blur(6px);
  border-radius: 50px;
  border: 1px solid rgba(255,255,255,0.4);
}

.logo-empresa {
  position: absolute;
  bottom: px;
  left: 47%
  
}

.logo-empresa img {
  max-width: 200px;
  height: auto;
  display: block;
}

.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  color: var(--pink-deep);
  font-size: 15px; 
  letter-spacing: 0.5px;
}

.brand-icon { font-size: 20px; }

.last-update {
  font-size: 12px;
  color: var(--text-med);
  font-weight: 600;
}

/* ===== LOADING STATE ===== */
.loading-overlay {
  position: fixed;
  inset: 0;
  background: linear-gradient(135deg, #f8c8d8, #fbd3a0);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  flex-direction: column;
  gap: 16px;
  font-family: 'Nunito', sans-serif;
  transition: opacity 0.5s;
}

.loading-overlay.hidden {
  opacity: 0;
  pointer-events: none;
}

.spinner {
  width: 48px;
  height: 48px;
  border: 4px solid rgba(232,65,122,0.2);
  border-top-color: var(--pink-deep);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.loading-text {
  color: var(--pink-deep);
  font-weight: 700;
  font-size: 16px;
}

/* ===== SELLER AVATAR PLACEHOLDER ===== */
.avatar-placeholder {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--pink-light), var(--gold-light));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  border: 2px solid var(--gold-light);
  flex-shrink: 0;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  .wrapper { padding: 16px; }
  .sellers-grid { grid-template-columns: 1fr; }
  .teams-container { grid-template-columns: 1fr; gap: 20px 0; }
  .divider { display: none; }
  .team-total { font-size: 16px; }
}
