* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  height: 85vh;
  font-family: Verdana, Geneva, Tahoma, sans-serif;
  background-color: #f4f4f4;
  color: black;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

a {
  text-decoration: none;
  color: #1c57b7;
}

p {
  line-height: 3.5vh;
}

.logout-form {
  margin: 0;
}

.logout-button {
  background: none;
  border: none;
  color: #1c57b7;
  cursor: pointer;
  font: inherit;
  padding: 0;
}

.logout-button:hover {
  color: #1c57b7;
}

.exit-btn {
  margin-top: 10vh;
  background-color: transparent;
  border: none;
  color: tomato;
}

.exit-confirmation {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  font-size: 0.7rem;
  text-align: center;
  margin-top: 1vh;
}

.exit-confirmation div {
  display: flex;
}

.exit-confirmation a {
  color: black;
}

.confirmation-btn {
  color: black;
  width: 11vh;
  padding: 1vh 0;
  margin: 2vh 5vh;
  border: none;
  border-radius: 3px;
  font-size: 0.7rem;
  font-weight: bold;
}

.stay-opt-btn {
  background-color: green;
}

.stay-opt-btn:hover {
  background-color: #1c57b7;
}

.exit-opt-btn {
  background-color: red;
}

.exit-opt-btn:hover {
  background-color: tomato;
}

a:hover {
  color: #1c57b7;
}


header {
  padding: 2vh 5vw 0 5vw;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.75rem;
}

header span a {
  font-weight: bold;
}

.small-logo-container {
  align-self: center;
}

.small-logo {
  max-height: 10vh;
}


.large-logo {
  max-height: 18vh;
}

main {
  flex-grow: 1;
  padding: 0 5vw;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 0;
}

h2 {
  align-self: flex-start;
  color: black;
  margin: 1vh 0;
  font-size: 1.2rem;
}

h3 {
  align-self: flex-start;
  color: black;
  margin: 1vh 0;
  font-size: 1rem;
  color: #1c57b7;
}

article {
  width: 85vw;
}

input {
  border-radius: 3px;
}

.spacer {
  width: 100%;
  margin: 2vh 0;
  border: 0;
  height: 0.3vh;
  background-image: linear-gradient(to right, transparent, #083e93, transparent);
}

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

.top-action-menu {
  width: 100%;
  height: 100%;
  justify-content: center;
}

.bottom-action-menu {
  width: 100%;
}

.bottom-action-menu nav {
  font-size: 0.6rem;
}

.menu-container {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 100%;
  flex: 1;
}

.profile summary::marker {
  color: #083e93;
}

.profile {
  display: flex;
  font-size: 0.85rem;
  text-align: right;
  cursor: pointer;
  font-weight: bold;
}

.profile nav {
  font-weight: normal;
  display: flex;
  flex-direction: column;
  font-size: 0.75rem;
}

.profile a {
  margin-top: 1.5vh;
}

.profile .logout-form {
  margin-top: 1.5vh;
}

.mobile {
  text-align: right;
}

.hamburger-btn {
  background: none;
  border: none;
  font-size: 2rem;
  cursor: pointer;
  color: #083e93;
  padding: 0;
  display: none;
}

.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: 70vw;
  max-width: 280px;
  height: 100%;
  background-color: #f4f4f4;
  box-shadow: 2px 0 8px rgba(0, 0, 0, 0.25);
  transform: translateX(-100%);
  transition: transform 0.3s ease;
  display: flex;
  flex-direction: column;
  padding: 2vh 5vw;
  z-index: 1000;
}

.sidebar.open {
  transform: translateX(0);
}

.sidebar-links-container {
  display: flex;
  flex-direction: column;
  height: 60vh;
  overflow-y: auto;
}

.sidebar a {
  margin: 1vh 0;
  padding: 2vh 1.5vh;
  font-size: 0.9rem;
  color: #083e93;
  background-color: rgba(8, 62, 147, 0.08);
  border-radius: 8px;
  text-decoration: none;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.sidebar a:hover {
  background-color: rgba(8, 62, 147, 0.18);
  color: #083e93;
}

.sidebar-logo {
  align-self: center;
  margin: 0 0 4vh 0 !important;
  padding: 0 !important;
  background-color: transparent !important;
}

.sidebar-address {
  margin-top: 5vh;
  font-size: 0.75rem;
  text-align: center;
  font-style: normal;
}

.sidebar-address a {
  font-size: 0.75rem;
  background-color: transparent !important;
  padding: 0 !important;
  border-radius: 0 !important;
  font-weight: normal;
}

.sidebar-close {
  align-self: flex-end;
  background: none;
  border: none;
  font-size: 1.2rem;
  cursor: pointer;
  color: #083e93;
  padding: 0;
}

.sidebar-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.3);
  z-index: 999;
}

.sidebar-overlay.open {
  display: block;
}

@media screen and (max-width: 480px) {
  header {
    display: flex;
    justify-content: space-between;
  }

  .hamburger-btn {
    display: flex;
  }

  .logo-link {
    display: none;
  }

  .top-action-menu {
    display: none;
  }

  .bottom-action-menu {
    display: none;
  }

  .footer-address {
    display: none;
  }

  .profile.mobile {
    display: flex;
  }
}

.menu {
  display: flex;
  align-items: center;
  font-size: 0.85rem;
}

.vertical {
  flex-direction: column;
  flex-grow: 1;
  justify-content: center;
}

.pools-grid {
  display: grid;
  grid-template-columns: 2fr 6fr 2fr;
  width: 100%;
  row-gap: 1vh;
  align-items: center;
}

.pools-grid a {
  margin: 1vh 0;
  padding: 2vh 1.5vh;
  font-size: 0.9rem;
  color: #083e93;
  background-color: rgba(8, 62, 147, 0.08);
  border-radius: 8px;
  text-decoration: none;
  transition: background-color 0.2s ease, color 0.2s ease;
  text-align: center;
}

.pools-grid a:hover {
  background-color: rgba(8, 62, 147, 0.18);
  color: #083e93;
}

.pool-bell {
  padding-left: 1vh;
  font-size: 1rem;
}

.horizontal {
  width: 100%;
  justify-content: space-around;
}

.main-form {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  line-height: 2.5vh;
  font-size: 0.85rem;
}

.main-form p {
  text-align: center;
}

.main-form>div {
  display: flex;
  flex-direction: column;
  width: 100%;
  margin-top: 3vh;
}

.main-form details {
  border-bottom: 1px solid rgba(47, 137, 255, 0.2);
  padding-bottom: 1vh;
}

.main-form details label {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  text-align: center;
  margin-top: 1.5vh;
}

.main-form summary {
  cursor: pointer;
  font-weight: bold;
}

.main-form summary div {
  font-weight: normal;
}

.main-form summary::marker {
  color: #1c57b7;
}

.main-form details input {
  margin: 0 0.75vh 0 0;
}

.main-form input,
.main-form select {
  margin-top: 1vh;
  padding: 1.5vh 1vh;
  border: none;
  color: #083e93;
  font-weight: bold;
}

.main-form input[type="submit"] {
  margin-top: 5vh;
  background-color: #083e93;
  color: white;
  font-weight: bold;
  width: 100%;
}

.main-form input[type=submit]:hover {
  background-color: #1c57b7;
}

.main-form fieldset {
  border-radius: 3px;
}

.main-form fieldset div {
  width: 100%;
}

.larger-form {
  width: 90%;
}

.forget-password {
  font-size: 0.75rem;
  align-self: flex-end;
  margin-top: 2vh;
}

.guesses-form {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  line-height: 2.5vh;
  font-size: 0.85rem;
}

.guesses-form input,
.guesses-form select {
  margin-top: 1vh;
  padding: 1.5vh 1vh;
  border: none;
  font-size: 1.5rem;
  /* color: #083e93; */
  font-weight: bold;
}

.guesses-form input[type="submit"] {
  margin-top: 5vh;
  background-color: #083e93;
  color: white;
  font-weight: bold;
  width: 100%;
  font-size: 1rem;
}

.guesses-form input[type=submit]:hover {
  background-color: #1c57b7;
}

.guesses-checkbox {
  margin: 1vh 0 0.5vh;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 0.7rem;
  text-align: center;
}

.guesses-checkbox input {
  margin: 0 0 0 0.75vh;
}

.private-checkbox {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  text-align: center;
}

.private-checkbox input {
  margin: 0 0 0 0.75vh;
}

.match-wrapper {
  display: flex;
  flex-direction: column;
  width: 100%;
  margin-bottom: 1vh;
  padding: 1vh;
  background-color: rgba(4, 0, 0, 0.125);
  border-radius: 1vh;
}

.match-time {
  text-align: center;
  margin: 0;
  font-size: 0.75rem;
}

.guess-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 0.7rem;
}

.small-team-logo {
  width: 50px;
  max-height: 35px;
  object-fit: contain;
  /* margin: 0 1vh; */
}

.team {
  display: flex;
  align-items: center;
  justify-content: space-evenly;
  width: 30vh;
  line-height: 2vh;
  text-align: center;
}

.team div {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  width: 7vh;
}

.team label {
  margin-top: 0.5vh;
  text-align: center;
}

.team input {
  text-align: center;
  margin: 0 0;
  height: 7vh;
  width: 5vh;
}

.gols-palpite-encerrado {
  color: #1c57b7;
  margin: 0 1.5vh;
  font-size: 1.1em;
  font-weight: bold;
}

.period-form-container {
  margin-top: 2vh;
  width: 100%;
}

.period-form {
  margin-top: 2vh;
  display: flex;
  column-gap: 5vh;
  align-items: center;
}

.period-form label {
  display: block;
  font-size: 0.75rem;
  margin-bottom: 0.5vh;
}

.period-form select {
  background: #f4f4f4;
  border: none;
  border-bottom: 1px solid #1c57b7;
  color: #1c57b7;
  font-size: 0.65rem;
  font-weight: bold;
}

.period-form select option {
  text-align: center;
  font-family: Verdana, Geneva, Tahoma, sans-serif;
}

.main-msg {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  flex-grow: 1;
  line-height: 2.5vh;
  font-size: 0.75rem;
  width: 95%;
}

.subtitle-msg {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  font-size: 0.6rem;
  margin: 2vh 0;
}

.home-msg {
  margin-top: 2vh;
  line-height: 3vh;
  text-align: justify;
}

.home-msg h2 {
  margin: 0;
}

.help-msg p {
  margin: 0;
  font-size: 0.55rem;
  text-align: left;
  color: black;
}

.help-links {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  flex-grow: 1;
}

.helptext ul {
  font-size: 0.65rem;
  list-style-position: inside;
  padding: 0;
  color: #083e93;
}

.helptext li {
  margin: 0;
}

.helptext li::marker {
  color: black;
}

.recommendations-list {
  list-style-position: inside;
  padding: 0 1.5vh 1.5vh 1.5vh;
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
  line-height: 3vh;
  text-align: justify;
  font-size: 0.7rem;
  margin-top: 0;
}

.recommendations-list p {
  text-align: justify;
}

.recommendations-list li {
  margin-top: 2vh;
}

.recommendations-list li::marker,
.recommendations-list strong {
  font-weight: bold;
  color: #1c57b7
}

.errorlist {
  color: red;
  list-style: none;
  padding: 0;
  text-align: justify;
  font-size: 0.75rem;
  width: 80vw;
  line-height: 1rem;
}

.messages {
  padding: 1.5vh;
  list-style: none;
  text-align: center;
  font-size: 1rem;
  color: black;
  width: 100%;
}

.temp-msg {
  padding: 3vh;
  margin: 2vh 0;
  border-radius: 1vh;
  line-height: 3.25vh;
}

.success {
  background-color: rgba(125, 255, 75, 0.25);
}

.warning {
  background-color: rgba(255, 75, 0.25, 0.25);
}

.error {
  background-color: rgba(255, 50, 75, 0.25);
}

.signin-pool-url {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  margin-top: 2vh;
  text-align: center;
}

.signin-pool-url p {
  font-size: 0.75rem;
}

#pool-url {
  margin-top: 0;
  color: #1c57b7;
  padding: 2vh 3vh;
  border-radius: 3px;
  background-color: rgba(255, 255, 255, 0.15);
}

.copy-btn {
  margin-top: 1vh;
  border: none;
  background-color: transparent;
  color: #1c57b7;
}

.manage-pool-form {
  margin-top: 5vh;
}

.manage-pool-form input[type="text"] {
  font-weight: bold;
  font-size: 0.75rem;
  color: #083e93;
}

.main-table {
  margin-top: 1vh;
  border-collapse: collapse;
  width: 100%;
  font-size: 0.75rem;
}

.main-table th,
td {
  padding: 1.5vh 0.35vh;
  text-align: center;
}

.ranking-table th,
td {
  padding: 1.5vh 0.75vh;
}

.open-pools-table {
  margin-top: 5vh;
}

.open-pools-table tbody tr:nth-child(odd) {
  background-color: rgba(0, 0, 0, 0.125);
}

.open-pools-table tbody tr:nth-child(even) {
  background-color: rgba(0, 0, 0, 0.05);
}

.ranking-table tbody tr:nth-child(odd) {
  background-color: rgba(0, 0, 0, 0.125);
}

.ranking-table tbody tr:nth-child(even) {
  background-color: rgba(0, 0, 0, 0.05);
}

.expand-icon {
  font-size: 0.5rem;
  color: #083e93;
}

.expand-icon:hover {
  cursor: pointer
}

.detail-table-container {
  padding: 0;
}

.detail-table {
  border-collapse: collapse;
  width: 100%;
  font-size: 0.7em;
  color: black;
}

.detail-table th {
  font-weight: bold;
  padding: 15px 10px;
}

.detail-table td {
  padding: 0.5vh 0 1vh;
}

.detail-table tr {
  border-bottom: 1px solid rgba(47, 137, 255, 0.2);
}

.detail-table p {
  margin: 0;
  line-height: 2vh;
}

footer {
  padding: 1vh;
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

footer address {
  font-size: 0.55rem;
  margin: 3vh 0;
}

.guess-score {
  font-size: 1.5rem;
  font-weight: bold;
  margin: 0;
  padding: 0.5em;
  text-align: center;
  min-width: 2em;
}

.guess-points {
  font-size: 0.65rem;
  align-self: center;
  font-weight: bold;
}

.guess-points-score {
  color: #1c71b7;
}

.group-standings {
  padding-top: 1vh;
  width: 100%;
  margin-bottom: 7vh;
}

.standings-table {
  margin-top: 0.25vh;
  font-size: 0.65rem;
}

.standings-table thead th {
  font-size: 0.6rem;
  color: #083e93;
  padding: 0;
}

.standings-table tr td {
  padding: 0;
  padding: 0 1vh;
  height: 5vh;
}

.standings-table tbody tr:nth-child(odd) {
  background-color: rgba(0, 0, 0, 0.125);
}

.standings-table tbody tr:nth-child(even) {
  background-color: rgba(0, 0, 0, 0.05);
}

.standings-team-logo {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0 !important;
}

.standings-team-name {
  text-align: left;
  font-weight: bold;
}

.group-title {
  margin: 1vh 0;
  font-size: 0.85rem;
}

.world-cup-ranking-form-group {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
}


.world-cup-ranking-form-group select {
  height: 5vh;
  flex: 1;
  background: #f4f4f4;
  border: 1px solid #1c57b7;
  border-radius: 10px;
  color: #1c57b7;
  font-size: 0.75rem;
  font-weight: bold;
  text-align: center;
  margin-bottom: 1vh;
}

.total-score {
  margin: 2vh;
  align-self: center;
  text-align: center;
}

.match-info-all-guesses {
  text-align: center;
  font-size: 0.50rem;
}

.all-guesses-table p {
  margin: 0;
  line-height: 2.25vh;
}

/* --- Fixed layout: conteúdo scrollável + action bar fixa --- */

body.fixed-layout main {
  overflow: hidden;
}

.page-container {
  display: flex;
  flex-direction: column;
  width: 100%;
  flex: 1;
  min-height: 0;
  align-self: stretch;
}

.scrollable-content {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding-bottom: 2vh;
}

.action-bar {
  flex-shrink: 0;
  display: flex;
  gap: 2vw;
  padding: 2vh 0 max(1vh, env(safe-area-inset-bottom));
  background-color: #f4f4f4;
}

.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5vh 2vh;
  border-radius: 10px;
  font-size: 0.85rem;
  font-weight: bold;
  cursor: pointer;
  text-align: center;
  flex: 1;
  font-family: inherit;
  text-decoration: none;
}

.btn-primary {
  background-color: #083e93;
  color: white;
  border: none;
}

.btn-primary:hover {
  background-color: #1c57b7;
  color: white;
}

.btn-secondary {
  background-color: white;
  color: #083e93;
  border: 2px solid #083e93;
}

.btn-secondary:hover {
  background-color: #f0f4ff;
  color: #083e93;
}

@media screen and (min-width: 480px) {
  .hamburger-btn {
    display: none;
  }

  .top-action-menu {
    display: flex;
  }

  .bottom-action-menu {
    display: none;
  }

  .mobile {
    display: none;
  }

  footer {
    display: flex;
  }
}