/* DNC-MU Season 2 — mobile layout. Desktop styles stay in the other files. */

.mobile-brand,
.mobile-menu-toggle { display: none; }

@media (max-width: 991px) {
  html {
    min-width: 0 !important;
    height: auto;
  }
  html, body {
    max-width: 100% !important;
    overflow-x: hidden !important;
    background-attachment: fixed, scroll !important;
    background-position: center top, center bottom !important;
  }
  #body,
  #container,
  #content,
  .sidebar,
  .sidebar-r,
  .main_side,
  .panel-sidebar,
  .footer-glass,
  .footer-inner {
    max-width: 100% !important;
    box-sizing: border-box;
  }

  #navigation-top {
    position: sticky !important;
    top: 0;
    z-index: 400 !important;
    width: 100% !important;
    height: auto !important;
    background: #070d1c !important;
    border-bottom: 1px solid rgba(78,176,242,.22) !important;
  }
  .navigation-top-in {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    justify-content: space-between !important;
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    margin: 0 !important;
    padding: 8px 12px !important;
    gap: 8px 10px !important;
    box-sizing: border-box;
  }
  .mobile-brand {
    display: flex !important;
    order: 1;
    flex: 1 1 auto;
    align-items: center;
    gap: 8px;
    min-width: 0;
    text-decoration: none;
  }
  .mobile-brand img {
    width: 36px;
    height: auto;
    flex: 0 0 36px;
  }
  .mobile-brand span {
    color: #7ec8f0;
    font-family: 'Cinzel', Georgia, serif;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .nav-version { display: none !important; }
  .nav-right {
    display: none !important;
    order: 4;
    flex: 1 1 100%;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
  }
  .my-account { display: none !important; }
  .lang-select {
    position: static !important;
    top: auto !important;
    right: auto !important;
    width: 100% !important;
    margin: 0 !important;
  }
  .custom-lang-dropdown,
  .lang-dropdown-trigger {
    min-width: 0 !important;
    width: 100% !important;
    box-sizing: border-box;
  }
  .lang-dropdown-trigger {
    padding: 12px 14px !important;
    font-size: 14px !important;
    border-radius: 10px !important;
  }
  .lang-dropdown-menu {
    left: 0 !important;
    right: 0 !important;
    min-width: 0 !important;
    width: 100% !important;
  }
  .mobile-menu-toggle {
    display: inline-flex !important;
    order: 2;
    flex: 0 0 46px;
    margin-left: 0;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 46px;
    height: 40px;
    padding: 8px;
    border: 2px solid rgba(180,200,220,.55);
    border-radius: 10px;
    background: transparent;
    cursor: pointer;
  }
  .mobile-menu-toggle span {
    display: block;
    height: 2px;
    width: 100%;
    background: #d7e4f2;
    border-radius: 2px;
  }
  #cssmenu {
    display: none !important;
    order: 3;
    flex: 1 1 100%;
    width: 100% !important;
    margin: 0 !important;
  }
  #navigation-top.is-open {
    background: #05070f !important;
  }
  #navigation-top.is-open #cssmenu {
    display: block !important;
    padding: 4px 12px 0 !important;
    box-sizing: border-box;
  }
  #navigation-top.is-open #cssmenu > ul {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    flex-wrap: nowrap !important;
    gap: 8px !important;
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
  }
  #navigation-top.is-open #cssmenu > ul > li {
    float: none !important;
    width: 100%;
    list-style: none !important;
  }
  #navigation-top.is-open #cssmenu > ul > li > a {
    display: block !important;
    box-sizing: border-box !important;
    width: 100%;
    padding: 12px 14px !important;
    background: rgba(16,28,55,.85) !important;
    border: 1px solid rgba(78,176,242,.28) !important;
    border-radius: 10px !important;
    box-shadow: none !important;
    color: #d7eef8 !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    letter-spacing: .4px !important;
    text-align: center !important;
    text-transform: none !important;
    white-space: normal !important;
    height: auto !important;
    line-height: 1.3 !important;
  }
  #navigation-top.is-open #cssmenu > ul > li > a::after,
  #navigation-top.is-open #cssmenu > ul > li > a::before {
    display: none !important;
  }
  #navigation-top.is-open .nav-right {
    display: block !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 8px 12px 12px !important;
    box-sizing: border-box;
  }
  #navigation-top.is-open .my-account {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    flex-wrap: nowrap !important;
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    margin: 0 0 8px !important;
    gap: 8px !important;
  }
  #navigation-top.is-open .lang-select {
    display: block !important;
    position: relative !important;
    width: 100% !important;
    min-width: 0 !important;
    margin: 0 !important;
    clear: both;
  }
  #navigation-top.is-open .my-account a {
    display: block !important;
    box-sizing: border-box !important;
    width: 100%;
    margin: 0 !important;
    padding: 12px 14px !important;
    background: rgba(16,28,55,.85) !important;
    border: 1px solid rgba(78,176,242,.28) !important;
    border-radius: 10px !important;
    box-shadow: none !important;
    color: #d7eef8 !important;
    font-size: 14px !important;
    text-align: center !important;
    text-transform: none !important;
    white-space: normal !important;
    height: auto !important;
    line-height: 1.3 !important;
  }
  #navigation-top.is-open .mobile-menu-toggle span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }
  #navigation-top.is-open .mobile-menu-toggle span:nth-child(2) {
    opacity: 0;
  }
  #navigation-top.is-open .mobile-menu-toggle span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }
  .floating-nav,
  .floating-nav.visible {
    display: none !important;
  }

  #header {
    max-width: 100% !important;
    padding: 16px 12px 0 !important;
  }
  .webengine-mu-logo {
    left: 0 !important;
    max-width: 220px;
    height: auto;
  }
  .sparks {
    display: none !important;
  }

  .header-info-container {
    width: 100% !important;
    max-width: 100% !important;
    margin: 16px auto 0 !important;
    padding: 0 10px;
    box-sizing: border-box;
  }
  .ui-row {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 12px !important;
    max-width: 100% !important;
    margin: 0 auto !important;
    padding: 0 !important;
  }
  .ui-left,
  .ui-right {
    min-width: 0 !important;
    width: 100% !important;
    flex: 1 1 auto !important;
  }
  .glass-strip {
    height: auto !important;
    flex-direction: column;
    padding: 8px !important;
  }
  .glass-chip {
    width: 100%;
    min-height: 64px;
    flex: none !important;
  }
  .glass-chip + .glass-chip:before {
    display: none;
  }
  .header-info-container .header-info {
    display: block !important;
    width: 100% !important;
    box-sizing: border-box;
  }

  #container,
  #container.modules_cont_full {
    width: 100% !important;
    max-width: 100% !important;
    padding: 10px !important;
    box-sizing: border-box;
  }
  #content {
    display: flex;
    flex-direction: column;
    min-height: 0 !important;
    padding: 0 !important;
    overflow: visible !important;
  }
  .sidebar,
  .sidebar-r,
  .main_side {
    float: none !important;
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 !important;
    box-sizing: border-box;
  }
  .main_side { order: 1; }
  .sidebar { order: 2; }
  .sidebar-r { order: 3; }
  .panel-sidebar,
  .sidebar-banner,
  .sidebar-banner img {
    width: 100% !important;
    max-width: 100% !important;
    height: auto;
    box-sizing: border-box;
  }
  .modules_cont,
  .modules_cont_full {
    width: 100% !important;
    min-height: 0 !important;
    box-sizing: border-box;
  }

  .ucp-grid {
    grid-template-columns: 1fr 1fr !important;
  }
  .ucp-label {
    white-space: normal !important;
  }
  .general-table-ui,
  .table.rankings-glass,
  .we-news-list,
  .panel-addstats,
  .panel-general {
    display: block;
    width: 100%;
    overflow-x: auto;
  }
  .page-title,
  .we-news-title,
  .we-hero-title {
    overflow-wrap: anywhere;
  }
  .we-news-hero {
    height: 220px !important;
  }
  footer.footer,
  .footer {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    margin: 0 auto !important;
    padding: 16px 12px 28px !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
  }
  .footer-glass {
    width: 100% !important;
    max-width: 100% !important;
    margin-top: 0;
    padding: 0 !important;
    overflow: hidden;
    box-sizing: border-box;
  }
  .footer-glass .footer-inner,
  .footer-top,
  .footer-bottom,
  .footer-legal,
  .footer-socials {
    width: 100% !important;
    max-width: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    justify-content: center !important;
    text-align: center;
    gap: 8px;
  }
  .footer-links-row {
    display: flex !important;
    flex-direction: column !important;
    flex-wrap: nowrap !important;
    width: 100% !important;
    gap: 8px !important;
  }
  .footer-links-row .glass-pill {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    min-height: 42px;
    padding: 10px 12px !important;
    white-space: normal !important;
    box-sizing: border-box;
  }
  .footer-legal .legal-title,
  .footer-legal .legal-sub,
  .footer-legal .legal-powered {
    white-space: normal !important;
    overflow-wrap: anywhere;
  }
  .footer-socials {
    flex-direction: row !important;
    justify-content: center !important;
  }
  .panel-sidebar,
  .sidebar,
  .sidebar-r {
    width: 100% !important;
    max-width: 100% !important;
    float: none !important;
  }
  .rankings-glass-container {
    max-width: 100% !important;
    padding: 12px !important;
    margin: 8px 0 !important;
    box-sizing: border-box;
  }
  .rankings-glass-menu {
    justify-content: flex-start !important;
    gap: 8px !important;
  }
  .rankings-glass-menu a {
    padding: 8px 12px !important;
    font-size: 12px !important;
    letter-spacing: 0 !important;
  }
  .rankings-glass-table-wrap {
    max-width: 100% !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    -webkit-overflow-scrolling: touch;
  }
  .rankings-glass-table-wrap table {
    width: max-content !important;
    min-width: 100% !important;
    max-width: none !important;
    table-layout: auto !important;
  }
  .rankings-glass-table-wrap th,
  .rankings-glass-table-wrap td {
    white-space: nowrap !important;
    font-size: 12px !important;
    padding: 10px 8px !important;
  }
  .widget-top-gr,
  .server-info-compact,
  .general-table-ui {
    width: 100% !important;
    max-width: 100% !important;
    table-layout: fixed;
  }
  .widget-top-gr .name-cell span {
    white-space: normal !important;
  }
  .form-horizontal .control-label,
  .col-xs-8,
  .col-xs-offset-2,
  .col-sm-4,
  .col-sm-8,
  .col-sm-offset-4 {
    width: 100% !important;
    margin-left: 0 !important;
    float: none !important;
    text-align: left !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
  }
  body.modal-open {
    overflow: hidden !important;
    position: fixed !important;
    width: 100% !important;
    height: 100% !important;
    left: 0 !important;
    right: 0 !important;
  }
  .modal-backdrop {
    pointer-events: auto !important;
  }
  .modal {
    position: fixed !important;
    top: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    left: 0 !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
    padding: 0 !important;
  }
  .modal-dialog,
  #loginQuickModal .modal-dialog,
  #registerQuickModal .modal-dialog {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    transform: none !important;
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    margin: 0 !important;
  }
  .modal-content {
    border-radius: 0 !important;
  }
  .modal-body {
    overflow: visible !important;
  }
  .row {
    margin-left: 0 !important;
    margin-right: 0 !important;
  }
  [class*="col-"] {
    float: none !important;
    width: 100% !important;
    max-width: 100% !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
  }
  .container {
    width: 100% !important;
    max-width: 100% !important;
  }

  .home-news-block,
  .we-news-hero,
  .we-news-list,
  .we-news-header {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box;
  }
  .we-news-card,
  .we-card--wide {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 10px !important;
  }
  .we-news-left,
  .we-news-right,
  .we-news-thumb,
  .we-news-media {
    flex: 0 0 auto !important;
    width: 100% !important;
    max-width: 100% !important;
  }
  .we-news-thumb {
    display: block !important;
    height: 160px !important;
    overflow: hidden;
  }
  .we-news-inline-img {
    width: 100% !important;
    height: 160px !important;
    object-fit: cover;
  }
  .we-card-media {
    flex: 0 0 auto !important;
    width: 100% !important;
    height: 170px !important;
  }
  .we-card-body,
  .we-card-text,
  .we-card-title {
    width: 100% !important;
    max-width: 100% !important;
  }
  .we-hero-title,
  .we-news-hero-text h1 {
    font-size: 18px !important;
  }
  .news-row {
    grid-template-columns: 1fr !important;
    gap: 4px !important;
  }
  .news-row-date {
    white-space: normal !important;
  }

  .countdown-wrapper {
    max-width: 100% !important;
    width: 100% !important;
  }
  .countdown-container {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    transform: none !important;
    width: calc(100% - 20px) !important;
    max-width: 100% !important;
    margin: 12px auto !important;
  }

  .panel,
  .panel-body,
  .panel-heading,
  .panel-sidebar,
  .page-title,
  .shop-box,
  .dl-section {
    max-width: 100% !important;
    box-sizing: border-box;
  }
  .panel-sidebar {
    margin-bottom: 12px !important;
  }
  .page-title,
  .page-title span,
  .dl-section-title {
    font-size: 20px !important;
    letter-spacing: .4px !important;
    overflow-wrap: anywhere;
  }
  .form-control,
  .form-horizontal .form-control,
  select,
  textarea,
  input[type="text"],
  input[type="password"],
  input[type="email"],
  input[type="number"] {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box;
  }
  .method-grid,
  .dl-sysreq-grid,
  .dl-ping-grid,
  .csx-info-grid,
  .gp-members-grid,
  .guild-profile .gp-members-grid {
    grid-template-columns: 1fr !important;
  }
  .castle-siege-banner .guild_owner,
  .castle-siege-banner .guild_owner a {
    font-size: 20px !important;
  }
  .castle-siege-banner .guild_countdown {
    font-size: 18px !important;
  }
  .header-info,
  .header-info table,
  .server-info-compact td,
  .si-label {
    white-space: normal !important;
  }
  table {
    max-width: 100%;
  }
  .panel-body,
  .modules_cont,
  .modules_cont_full,
  .table-responsive {
    max-width: 100% !important;
  }

  img,
  video,
  iframe {
    max-width: 100%;
  }
}

@media (max-width: 480px) {
  #navigation-top.is-open #cssmenu > ul > li > a,
  #navigation-top.is-open .my-account a {
    font-size: 14px !important;
    padding: 12px 10px !important;
  }
  .webengine-mu-logo {
    max-width: 180px;
  }
  .ucp-grid {
    grid-template-columns: 1fr !important;
  }
  .we-news-hero {
    height: 180px !important;
  }
}
