/* MuBad visual identity. Functional template styles remain unchanged. */
body {
  background-color: #08090d;
  background-image:
    radial-gradient(ellipse at center top, transparent 0, rgba(4, 5, 9, 0.12) 45%, rgba(4, 5, 9, 0.72) 100%),
    linear-gradient(to bottom, transparent 0, rgba(4, 5, 9, 0.18) 55vh, rgba(4, 5, 9, 0.82) 100%),
    url('../img/mubad-background.webp');
  background-position: center top;
  background-repeat: no-repeat;
  background-size: cover;
  background-attachment: fixed;
}

.header {
  min-height: 760px;
  isolation: isolate;
}

.header::before,
.header::after {
  content: '';
  position: absolute;
  left: 50%;
  width: 100vw;
  pointer-events: none;
  transform: translateX(-50%);
}

.header::before {
  top: 0;
  z-index: 0;
  height: 920px;
  background: #090a0e url('../img/hero mubadd.png') center top / cover no-repeat;
  -webkit-mask-image: linear-gradient(to bottom, #000 0, #000 64%, rgba(0, 0, 0, 0.86) 76%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 0, #000 64%, rgba(0, 0, 0, 0.86) 76%, transparent 100%);
}

.header::after {
  bottom: -150px;
  z-index: 1;
  height: 480px;
  background: linear-gradient(to bottom, transparent 0, rgba(8, 9, 13, 0.14) 22%, rgba(8, 9, 13, 0.72) 68%, rgba(8, 9, 13, 0.38) 84%, transparent 100%);
}

.menu-top {
  position: relative;
  z-index: 10;
  background: linear-gradient(to bottom, rgba(5, 6, 10, 0.94), rgba(5, 6, 10, 0.45) 72%, transparent);
  border-top: 1px solid rgba(212, 142, 64, 0.32);
}

.topPanel__buttons {
  position: relative;
  z-index: 10;
}

.menu-top ul li a:hover,
.menu-top .active a {
  color: #ffbc76;
  border-top-color: #d33731;
  text-shadow: 0 0 22px rgba(235, 49, 43, 0.9);
}

.logo {
  top: 405px;
  left: 50%;
  width: 900px;
  margin-left: 0;
  transform: translateX(-50%);
  z-index: 4;
  filter: drop-shadow(0 12px 24px rgba(0, 0, 0, 0.9));
}

.logo img {
  display: block;
  width: 100%;
  height: auto;
}

.logo:hover {
  filter: brightness(115%) drop-shadow(0 12px 28px rgba(179, 31, 23, 0.55));
}

.content {
  padding-top: 8px;
}

@media (max-width: 900px) {
  body {
    background-size: auto 100vh;
  }

  .header::before {
    background-size: auto 920px;
  }
}

/* Correcciones globales del modal de inicio de sesión. */
#login-login #loginBox1,
#login-login #loginBox2,
#login-login #loginBox1:hover,
#login-login #loginBox2:hover,
#login-login #loginBox1:focus,
#login-login #loginBox2:focus,
#login-login #loginBox1:active,
#login-login #loginBox2:active {
  background-color: rgba(48, 17, 65, 0.82) !important;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  caret-color: #ffffff !important;
  outline: none !important;
}

#login-login #loginBox1:-webkit-autofill,
#login-login #loginBox2:-webkit-autofill,
#login-login #loginBox1:-webkit-autofill:hover,
#login-login #loginBox2:-webkit-autofill:hover,
#login-login #loginBox1:-webkit-autofill:focus,
#login-login #loginBox2:-webkit-autofill:focus {
  -webkit-text-fill-color: #ffffff !important;
  caret-color: #ffffff !important;
  -webkit-box-shadow: 0 0 0 1000px rgba(48, 17, 65, 0.96) inset !important;
  transition: background-color 9999s ease-out 0s;
}

#login-login .formButton {
  display: flex;
  align-items: center;
  justify-content: center;
}

#login-login .formButton button.button {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  box-sizing: border-box !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
  text-align: center !important;
  text-indent: 0 !important;
}

/* Botón panorámico de Discord compartido por todas las páginas. */
.fast-button .net-block.discord-block {
  position: relative;
  overflow: hidden;
  background-image: url('../img/discord-button-bg.png') !important;
  background-position: center center !important;
  background-repeat: no-repeat !important;
  background-size: cover !important;
  transition: filter 0.25s ease, box-shadow 0.25s ease;
}

.fast-button .net-block.discord-block:hover {
  filter: brightness(1.1);
  box-shadow: 0 0 22px rgba(255, 30, 200, 0.65);
}

.fast-button .net-block.discord-block a {
  position: relative;
  z-index: 1;
  float: none !important;
  display: flex !important;
  width: 100% !important;
  height: 100% !important;
  box-sizing: border-box !important;
  padding: 0 30px 0 42% !important;
  align-items: flex-start !important;
  justify-content: center !important;
  flex-direction: column !important;
  background: none !important;
  text-align: left !important;
  text-decoration: none !important;
}

.fast-button .net-block.discord-block a span {
  display: block;
  margin: 0;
  color: #ffffff;
  font-size: 31px;
  font-weight: 700;
  font-style: italic;
  line-height: 1;
  text-transform: uppercase;
  text-shadow: 0 2px 8px rgba(40, 0, 45, 0.85);
}

.fast-button .net-block.discord-block a p {
  margin: 10px 0 0;
  color: #2b1231;
  font-size: 17px;
  font-weight: 600;
  line-height: 1.2;
  text-shadow: 0 1px 1px rgba(255, 255, 255, 0.35);
}

/* Responsive layout: conserva la composición de escritorio y adapta los
   bloques a todo el ancho disponible en tablets y móviles. */
@media (max-width: 1199px) {
  html,
  body {
    width: 100%;
    min-width: 0;
    overflow-x: hidden;
  }

  .wrapper {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
  }

  .header {
    min-height: 460px;
  }

  .header::before {
    height: 620px;
    background-size: auto 620px;
  }

  .header::after {
    bottom: -100px;
    height: 320px;
  }

  .menu-top {
    height: auto;
    min-height: 108px;
    padding-top: 52px;
  }

  .menu-top ul {
    width: 50%;
    float: left;
    padding: 0;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
  }

  .menu-top ul li {
    margin: 0 5px;
  }

  .menu-top ul li a {
    padding: 16px 5px;
    font-size: 12px;
  }

  .server-load {
    left: 50%;
    top: 108px;
    transform: translateX(-50%) scale(0.75);
    transform-origin: top center;
  }

  .topPanel__buttons {
    position: absolute;
    top: 8px;
    right: 16px;
    z-index: 10;
  }

  .topPanel__buttons a {
    top: 0;
    left: auto;
    right: auto;
  }

  .logo {
    top: 215px;
    left: 50%;
    width: min(76vw, 700px);
    max-width: 700px;
    margin-left: 0;
    transform: translateX(-50%);
  }

  .sparks-sparks,
  .periy {
    display: none;
  }

  .content {
    width: 100%;
    padding: 0 12px 28px;
  }

  .fast-button {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
  }

  .download-block,
  .regisrtation-block,
  .net-block.discord-block {
    flex: 1 1 calc(33.333% - 8px);
    width: calc(33.333% - 8px);
    max-width: none;
    min-width: 0;
    margin: 0;
    background-size: 100% 100%;
  }

  .download-block,
  .regisrtation-block,
  .net-block.discord-block {
    height: auto;
    aspect-ratio: 398 / 132;
  }

  .download-block a,
  .regisrtation-block a {
    display: flex;
    flex-direction: column;
    justify-content: center;
    height: 100%;
    padding: 10px 10px 10px 43%;
  }

  .download-block span,
  .regisrtation-block span {
    font-size: clamp(16px, 2.7vw, 28px);
  }

  .top-content {
    width: 100%;
    display: flex;
    flex-direction: column;
    padding: 12px 0;
  }

  .swiper-container,
  .news-top {
    width: 100%;
    float: none;
    margin: 0;
  }

  .swiper-slider {
    height: 320px;
  }

  .swiper-slider .swiper-slide .slider-info {
    width: 100%;
    padding: 0 24px 20px;
  }

  .swiper-slider .swiper-slide .slider-info p {
    width: calc(100% - 185px);
  }

  .slider-button-more.button-small {
    flex: 0 0 162px;
  }

  .top-content::before,
  .top-content::after {
    width: 100%;
    right: 0;
    background-size: 100% auto;
  }

  .news-top {
    height: auto;
    min-height: 260px;
    background-size: cover;
  }

  .news {
    margin-left: 0;
    margin-right: 0;
    padding-left: 24px;
    padding-right: 24px;
  }

  .block-widget {
    width: 100%;
    display: flex;
    flex-direction: column;
    margin-top: 14px;
  }

  .block-widget > .block-players,
  .block-widget > .widget-fon-guilds,
  .block-widget > .widget-fon-discussions {
    width: 100%;
    max-width: 902px;
    height: auto;
    min-height: 420px;
    left: 0;
    right: 0;
    margin: 0 auto 12px;
    background-size: 100% 100%;
    padding: 0 30px 24px !important;
  }

  .block-widget > .widget-fon-discussions {
    min-height: 360px;
  }

  .block-widget-1 .block-players,
  .block-widget-1 .widget-fon-guilds,
  .block-widget-1 .widget-fon-discussions {
    width: 100%;
    max-width: 902px;
    height: auto;
    min-height: 0;
    left: 0;
    right: 0;
    margin: 0 auto 12px;
    background-size: 100% 100%;
    padding: 0 30px 24px !important;
  }

  .block-widget-title {
    padding: 30px 8px 22px;
    font-size: 19px;
  }

  .block-widget-2 {
    width: 100%;
    padding-top: 12px;
  }

  .block-widget-1 {
    width: 100%;
    float: none;
    left: 0;
  }

  .page-content {
    width: 100%;
    min-height: 0;
    margin: 0;
    padding: 32px 28px;
    display: block;
  }

  .page-content:after {
    width: calc(100% + 64px);
    left: -32px;
    background-size: 100% auto;
  }

  .page-text-img {
    width: 100%;
    height: auto;
  }

  .footer-logo {
    width: 100%;
    float: none;
    margin-left: 0;
  }

  .footer-block-coperite,
  .footer-block-r {
    float: none;
    width: 100%;
    text-align: center;
  }

  .rankings-table tr td {
    padding: 7px 4px;
    font-size: 13px !important;
  }

  .rankings_menu {
    display: flex;
    gap: 4px;
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: 5px;
  }

  .rankings_menu a {
    flex: 0 0 145px;
    width: 145px;
  }

  .fast-links {
    width: 100%;
    left: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding-top: 12px;
  }

  .fast-links > span {
    display: none;
  }

  .fast-links-left,
  .fast-links-center,
  .fast-links-right {
    width: 100%;
    max-width: 398px;
    height: auto;
    aspect-ratio: 398 / 222;
    margin: 0;
    background-size: 100% 100%;
    padding-right: 14px;
  }

  .fast-links-left:before,
  .fast-links-center:before,
  .fast-links-right:before {
    display: none;
  }
}

@media (max-width: 767px) {
  .header {
    min-height: 350px;
  }

  .header::before {
    height: 450px;
    background-size: auto 450px;
  }

  .header::after {
    bottom: -70px;
    height: 240px;
  }

  .menu-top {
    min-height: 112px;
  }

  .menu-top ul {
    width: 100%;
    float: none;
  }

  .menu-top ul li {
    margin: 0 2px;
  }

  .menu-top ul li a {
    padding: 9px 4px;
    font-size: 10px;
  }

  .server-load {
    display: none;
  }

  .topPanel__buttons {
    top: 5px;
    right: 8px;
  }

  .topPanel__buttons a {
    top: 0;
    right: 0;
    width: 96px;
    height: 48px;
    padding: 15px 6px;
    font-size: 10px;
    background-size: 100% 100%;
  }

  .logo {
    top: 135px;
    width: 78vw;
    max-width: 360px;
  }

  .content {
    padding-left: 8px;
    padding-right: 8px;
  }

  .fast-button {
    flex-direction: column;
    align-items: center;
    gap: 8px;
  }

  .download-block,
  .regisrtation-block,
  .net-block.discord-block {
    flex: 0 0 auto;
    width: 100%;
    max-width: 398px;
  }

  .download-block span,
  .regisrtation-block span {
    font-size: 23px;
  }

  .download-block p,
  .regisrtation-block p,
  .fast-button .net-block.discord-block a p {
    font-size: 13px;
  }

  .fast-button .net-block.discord-block a {
    padding-left: 42% !important;
    padding-right: 14px !important;
  }

  .fast-button .net-block.discord-block a span {
    font-size: 25px;
  }

  .swiper-slider {
    height: 245px;
  }

  .swiper-slider .swiper-slide h2 {
    font-size: 18px;
    padding: 18px 16px;
  }

  .swiper-slider .swiper-slide .slider-info {
    bottom: 45px;
    height: auto;
    padding: 0 14px 12px;
  }

  .swiper-slider .swiper-slide .slider-info p {
    width: calc(100% - 112px);
    font-size: 11px;
    line-height: 1.3;
  }

  .slider-button-more.button-small {
    flex-basis: 100px;
    width: 100px;
    height: 50px;
    background-size: 100% 100%;
    font-size: 11px;
  }

  .news-top {
    min-height: 220px;
  }

  .news-top-title span {
    padding: 20px 18px 14px;
    font-size: 17px;
  }

  .tab-more {
    margin-right: 14px;
  }

  .news {
    min-height: 40px;
    height: auto;
    padding: 10px 14px;
    font-size: 12px;
  }

  .news a {
    width: auto;
    min-width: 0;
    flex: 1;
  }

  .date {
    margin-left: 7px;
    font-size: 10px;
  }

  .block-widget > .block-players,
  .block-widget > .widget-fon-guilds,
  .block-widget > .widget-fon-discussions {
    min-height: 0;
    padding: 0 12px 18px !important;
  }

  .block-widget-1 .block-players,
  .block-widget-1 .widget-fon-guilds,
  .block-widget-1 .widget-fon-discussions {
    padding: 0 12px 18px !important;
  }

  .block-widget-title {
    padding: 24px 4px 17px;
    font-size: 17px;
  }

  .top-title,
  .top-list {
    font-size: 12px;
  }

  .top-list {
    height: 37px;
  }

  .top-list:hover {
    height: 37px;
    margin: 0;
    padding: 0;
  }

  .top-block .top-number {
    width: 22px;
  }

  .top-block .top-flag {
    width: 25px;
  }

  .top-block .top-name {
    width: auto;
    min-width: 0;
    flex: 1;
  }

  .top-block .top-lvl,
  .top-block .top-Res {
    width: 58px;
    text-align: center;
  }

  .buttons-small .button-small {
    width: 140px;
    height: 56px;
    background-size: 100% 100%;
    font-size: 12px;
  }

  .page-content {
    padding: 28px 14px;
  }

  .page-title {
    font-size: 18px;
  }

  .rankings-table tr td {
    padding: 6px 2px;
    font-size: 11px !important;
  }

  .rankings-class-image {
    width: 22px;
  }

  .rankings-table-place {
    font-size: 17px;
  }

  .rankings_menu a {
    flex-basis: 125px;
    width: 125px;
    height: 50px;
    line-height: 38px;
    font-size: 11px !important;
  }

  .fast-links-left,
  .fast-links-center,
  .fast-links-right {
    padding-left: 20px;
    padding-right: 10px;
  }

  .fast-links-left span,
  .fast-links-center span,
  .fast-links-right span {
    font-size: 22px;
    margin-top: -14px;
  }

  .fast-links-left p,
  .fast-links-center p,
  .fast-links-right p {
    font-size: 12px;
  }

  .f-menu li {
    margin: 10px 8px;
  }

  .modal_div,
  .modal_div_re {
    width: calc(100% - 24px);
    max-width: 437px;
    height: auto;
    aspect-ratio: 437 / 517;
    top: 50%;
    left: 50%;
    margin: 0;
    transform: translate(-50%, -50%);
    background-size: 100% 100%;
    padding-left: 0;
  }

  .modal_div_re {
    aspect-ratio: 437 / 769;
  }

  .modal-content {
    width: 100%;
    padding: 0 8px;
  }

  .modal-content h2 {
    margin-bottom: 20px;
    font-size: 18px;
  }

  .input-re_1,
  .input-re_2,
  .input-re_3 {
    width: min(350px, 100%);
    height: auto;
    aspect-ratio: 350 / 107;
    background-size: 100% 100% !important;
    padding-top: 34px;
  }

  .formButton {
    margin-top: 18px;
  }

  .formButton button.button {
    transform: scale(0.82);
    transform-origin: center top;
  }
}
