/* RESET / BASE */
* {
  box-sizing: border-box;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

body {
  margin: 0;
  background: #f5f7fa;
  color: #222;
}

/* =========================
   TOP BAR
========================= */
.top-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px;
  background: white;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.site-title {
  text-align: center;
  margin-right: 20px;
}

.site-title h1 {
  font-size: 18px;
  margin: 0;
}

.site-title p {
  font-size: 12px;
  margin: 0;
  opacity: 0.6;
}

.year-controls {
  display: flex;
  gap: 8px;
  align-items: center;
}


.top-bar button,
.top-bar select {
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid #ddd;
  background: #fff;
  cursor: pointer;
}

.top-bar button:hover {
  background: #eee;
}

/* =========================
   CARDS GRID (RESPONSIVE)
========================= */
#cards {
  display: grid;
  gap: 16px;
  padding: 16px;
  grid-template-columns: repeat(5, 1fr);
}

@media (max-width: 1100px) {
  #cards {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 700px) {
  #cards {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 420px) {
  #cards {
    grid-template-columns: 1fr;
  }
}

/* =========================
   CARD
========================= */
.card {
  background: white;
  border-radius: 16px;
  padding: 14px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.06);
  position: relative;
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 28px rgba(0,0,0,0.1);
}

.card.reveal {
  animation: revealSoft 0.6s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes revealSoft {
  from {
    opacity: 0;
    transform: translateY(6px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* =========================
   CARD HEADER
========================= */
.card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.card-header img.icon {
  width: 36px;
  height: 36px;
  object-fit: contain;
}

.card-header h3 {
  font-size: 13px;
  margin: 0;
  line-height: 1.2;
}

.season-label {
  font-size: 12px;
  opacity: 0.6;
  margin-top: 2px;
}

/* =========================
   PICK DISPLAY
========================= */
.pick-display {
  padding: 10px;
  border: 2px dashed #ddd;
  border-radius: 12px;
  text-align: center;
  cursor: pointer;
  background: #f9fafb;
  transition: all 0.15s;
}

.pick-display:hover {
  background: #eef2ff;
  border-color: #4c7cff;
}

.pick-display strong {
  font-size: 14px;
}

.pick-display .placeholder {
  opacity: 0.5;
  font-size: 13px;
}

.card.picked {
  outline: 2px solid #4c7cff;
  outline-offset: 2px;
}

/* =========================
   CLUB LIST
========================= */
.club-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 8px;
  max-height: 160px;
  overflow-y: auto;
  padding-right: 4px;
}

.club-list button {
  padding: 6px 8px;
  border-radius: 8px;
  border: 1px solid #ddd;
  background: #fafafa;
  cursor: pointer;
  font-size: 12px;
  text-align: left;
}

.club-list button:hover {
  background: #e8edff;
  border-color: #4c7cff;
}

.hidden {
  display: none;
}

/* =========================
   RESULT STATES
========================= */
.card.correct {
  border: 2px solid #2ecc71;
}

.card.wrong {
  border: 2px solid #e74c3c;
}

.card.ongoing {
  border: 2px dashed gold;
}

/* =========================
   RESULT CARD (AFTER SUBMIT)
========================= */
.result-card {
  text-align: center;
  padding: 8px 4px;
  position: relative;
}

.result-meta {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
  opacity: 0.75;
}

.result-meta img.flag {
  width: 22px;
  height: 14px;
  object-fit: contain;
}

.result-meta .season {
  font-size: 0.8rem;
  font-weight: 500;
}

.club-logo {
  width: 56px;
  height: 56px;
  object-fit: contain;
  margin-bottom: 6px;
}

.result-card h4 {
  margin: 4px 0;
  font-size: 14px;
}

.streak {
  margin-top: 6px;
  font-weight: 600;
  color: #ff6b00;
}

.wrong-pick {
  margin-top: 6px;
  font-size: 13px;
  opacity: 0.75;
}

/* logo de fundo da competição (opcional) */
.competition-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0.07;
  pointer-events: none;
}

.result-card > * {
  position: relative;
  z-index: 1;
}

/* =========================
   FOOTER / ACTIONS
========================= */
footer {
  margin-top: 24px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

#submit {
  padding: 12px 28px;
  border-radius: 999px;
  border: none;
  background: #4c7cff;
  color: white;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}

#submit:hover {
  background: #345ce8;
  transform: translateY(-1px);
}

#submit:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

#share {
  padding: 10px 22px;
  border-radius: 999px;
  border: 2px solid #4c7cff;
  background: white;
  color: #4c7cff;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}

#share:hover {
  background: #eef2ff;
}

#shareBox {
  width: 100%;
  max-width: 420px;
  height: 110px;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid #ddd;
  background: #f9fafb;
  font-family: monospace;
  font-size: 13px;
  resize: none;
}

#shareArea {
  margin: 16px;
  padding: 16px;
  background: white;
  border-radius: 16px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.06);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
