
:root {
  --corP: #2e2d2c;
  --corB: #f0f0f0;
  --cor1: #535cf0;
  --cor2: #2283f1;
  --cor3: #204ba1;
  --cor4: #b85bcc;
  --cor5: #71b999;
  --gold: #ffd700;
  --silver: #c0c0c0;
  --bronze: #cd7f32;
  --shadow: rgba(0, 0, 0, 0.2);
  --shadow-heavy: rgba(0, 0, 0, 0.4);
}

@import url("https://fonts.googleapis.com/css2?family=Montserrat:wght@400;600;700&display=swap");

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
a {
  color: inherit;
  text-decoration: none;
}

body {
  font-family: "Montserrat", sans-serif;
  background: linear-gradient(45deg, var(--cor1), var(--cor2));
  min-height: 100vh;
  color: var(--corP);
  overflow-x: hidden;
  margin: 0;
}

.detailbg {
  position: fixed;
  inset: 0;
  background-image: url("imgs/detailbg.png");
  background-repeat: repeat;
  background-position: center;
  background-size: auto;

  opacity: 0.08;           /* CONTROLE REAL */
  pointer-events: none;   /* não bloqueia clique */
  z-index: -1;
}

/* Botão */
#bateria-toggle{
  position: fixed;
  top: 20px;
  left: 20px;
  z-index: 1001;
  background: #fff;
  border-radius: 50%;
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(0,0,0,.2);
}

#bateria-toggle i{
  font-size: 18px;
}

/* Menu lateral */
#bateria-menu{
  position: fixed;
  top: 0;
  left: -260px;
  width: 260px;
  height: 100vh;
  background: #fff;
  z-index: 1002;
  transition: left .3s ease;
  box-shadow: 4px 0 12px rgba(0,0,0,.25);
  padding-top: 20px;
}

/* Aberto */
#bateria-menu.open{
  left: 0;
}

/* Header */
.bateria-header{
  font-weight: 700;
  padding: 16px;
  border-bottom: 1px solid #ddd;
}

/* Itens */
.bateria-item{
  display: block;
  padding: 14px 16px;
  border-bottom: 1px solid #eee;
  text-decoration: none;
  color: #333;
}

.bateria-item:hover{
  background: #f0f0f0;
}

.bateria-item.active{
  background: var(--cor1);
  color: #fff;
  font-weight: 600;
}

/* Overlay */
#bateria-overlay{
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.4);
  z-index: 1000;
  display: none;
}

#bateria-overlay.show{
  display: block;
}


.detail1 {
  position: absolute;
  top: 0;
  right: 0;
}

.detail1 img {
  width: 200px;
}

.detail2 {
  margin: -40px 0 0 -120px;
}

.detail2 img {
  width: 200px;
}

.header {
  display: flex;
  background-color: rgba(32, 75, 161, 0.7);
  justify-content: center;
  align-items: center;
  padding: 10px;
}

.header .logo img {
  height: 100px;
}

.ranking-wrapper{
  max-width: 900px;
  width: 95%;
  margin: 20px auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.ranking-wrapper h1 {
    text-align: center;
    color: var(--corB);
}

/* TOP 3 */
.rank-gold{
  border: 3px solid var(--gold);
}

.rank-silver{
  border: 3px solid var(--silver);
}

.rank-bronze{
  border: 3px solid var(--bronze);
}

/* resto */
.rank-default{
  border: 3px solid var(--corP);
}

.rank-card{
  display: flex;
  flex-direction: column;
  background: #eee;
  border-radius: 12px 0 0;
  overflow: hidden;
}

.rank-superior{
  border-radius: 9px 0 0;
  display: flex;
  flex-direction: row;
  justify-content: flex-start;
  align-items: stretch;
}

.rank-pos{
  background: white;
  font-weight: 900;
  font-size: 35px;
  color: var(--cor4);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px 15px;
  border-radius: 10px 0;
}

.rank-name{
  display: flex;
  gap: 5px;
  padding: 10px 14px;
  font-weight: 800;
  font-size: 20px;
  align-items: center;
}

.rank-inferior{
  display: flex;
  flex-direction: column;
}

.rank-mid {
  display: flex;
  flex-direction: row;
}

.rank-re{
  width: 40%;
  display: flex;
  gap: 5px;
  padding: 10px 14px;
  font-weight: 600;
  font-size: 18px;
  align-items: center;
  border-top: none;
  border-left: none;
}

.rank-tempo{
  width: 60%;
  display: flex;
  gap: 5px;
  padding: 10px 14px;
  font-weight: 600;
  font-size: 18px;
  align-items: center;
  border-top: none;
  border-right: none;
}

.rank-bottom{
  display: flex;
  flex-direction: row;
  align-items: stretch;
  justify-content: flex-start;
}

.rank-points{
  width: 40%;
  display: flex;
  gap: 5px;
  padding: 10px 14px;
  font-weight: 600;
  font-size: 18px;
  align-items: center;
  border-bottom: none;
  border-left: none;
}

.rank-team{
  width: 60%;
  display: flex;
  gap: 5px;
  padding: 10px 14px;
  font-weight: 600;
  font-size: 18px;
  align-items: center;
  border-bottom: none;
  border-right: none;
}

.bateria-select{
  max-width: 600px;
  margin: 20px auto;
  text-align: right;
}

.rank-main{
  display: flex;
  flex-direction: column;
}

.rank-sub{
  font-size: 12px;
  color: #666;
}

@media (max-width: 600px) {
  .detail1 img {
      width: 80px;
  }
  .detail2 {
    margin: -20px 0 0 -10px;
  }

  .detail2 img {
    width: 120px;
  }

  .header .logo img {
    height: 60px;
  }
  .rank-name,.rank-re,.rank-points,.rank-team {
    font-size: 12px;
  }
}