/*
 =========================================================
 * Responsive layer for WebEngine template
 * Keeps desktop design intact and adapts layout down to phones.
 =========================================================
*/

*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

img,
svg,
video,
canvas,
iframe {
    max-width: 100%;
    height: auto;
}

table {
    max-width: 100%;
}

#container {
    width: min(1200px, calc(100% - 32px)) !important;
    max-width: 1200px !important;
}

#content,
.modules_cont,
.modules_cont_full,
.panel,
.glass-panel,
.panel-body,
.modal-content {
    max-width: 100%;
}

.modules_cont,
.modules_cont_full,
.panel-body,
.content-rankings {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.row-flex,
.equal-height-panels {
    min-width: 0;
}

.row-flex > [class*='col-'],
.equal-height-panels > [class*='col-'],
[class*='col-'] {
    min-width: 0;
}

.table {
    width: 100% !important;
}

.social-buttons-container,
.hero-actions,
.hero-stats,
.server-info-bar .row,
.footer .row {
    max-width: 100%;
}

@media (max-width: 1250px) {
    #container {
        width: calc(100% - 40px) !important;
    }

    #navbar ul {
        max-width: calc(100% - 220px) !important;
        gap: 14px !important;
    }

    #navbar ul li a {
        padding: 8px 10px !important;
        font-size: 12px !important;
    }

    #hero {
        min-height: 720px !important;
    }

    .hero-logo {
        width: 430px !important;
    }
}

@media (max-width: 991px) {
    body {
        min-width: 0;
    }

    #navbar {
        position: sticky !important;
        top: 0;
        height: auto !important;
        min-height: 60px;
        flex-wrap: wrap;
        align-items: center;
        padding: 8px 12px;
    }

    #navbar ul {
        order: 2;
        width: 100%;
        max-width: 100% !important;
        justify-content: flex-start !important;
        gap: 8px !important;
        margin: 8px 0 0 !important;
        padding: 0 0 6px !important;
        overflow-x: auto;
        overflow-y: hidden;
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
    }

    #navbar ul li {
        flex: 0 0 auto;
    }

    #navbar ul li a {
        display: block;
        white-space: nowrap;
        font-size: 12px !important;
        padding: 8px 11px !important;
    }

    .navbar-login-btn {
        position: static !important;
        order: 1;
        margin-left: auto;
        display: flex;
        flex-wrap: wrap;
        justify-content: flex-end;
        gap: 6px;
        max-width: 100%;
    }

    .btn-login-small {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-height: 36px;
        padding: 8px 11px !important;
        font-size: 12px !important;
        line-height: 1.1;
        white-space: nowrap;
    }

    #hero {
        height: auto !important;
        min-height: auto !important;
        padding: 44px 16px 34px !important;
    }

    #hero .hero-content {
        max-width: 720px;
        padding: 0 4px;
    }

    .hero-logo {
        width: 380px !important;
        margin-bottom: 18px !important;
    }

    .hero-stats {
        flex-direction: column !important;
        align-items: center !important;
        gap: 18px !important;
        margin-top: 24px !important;
    }

    .stat-box-middle {
        order: 1;
    }

    .stat-box-account,
    .stat-box-char {
        order: 2;
        width: min(100%, 340px) !important;
        min-width: 0 !important;
        padding: 16px 22px !important;
    }

    .hero-online-btn {
        width: 170px !important;
        height: 170px !important;
    }

    .hero-online-btn .count {
        font-size: 64px !important;
    }

    .hero-online-btn .label {
        font-size: 13px !important;
        letter-spacing: 1px !important;
    }

    .hero-actions {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 12px;
        margin-top: 24px !important;
    }

    .btn-hero-large {
        margin: 0 !important;
        min-width: 190px;
        padding: 13px 22px !important;
        font-size: 18px !important;
        line-height: 1.1;
        text-align: center;
    }

    #container {
        width: calc(100% - 28px) !important;
        padding: 28px 0 !important;
    }

    .row-flex,
    .equal-height-panels {
        display: block !important;
    }

    .row-flex > [class*='col-'],
    .equal-height-panels > [class*='col-'] {
        display: block !important;
        width: 100% !important;
        float: none !important;
    }

    .row-flex > [class*='col-'] > .modules_cont,
    .row-flex > [class*='col-'] > .sidebar {
        height: auto !important;
        display: block !important;
    }

    .sidebar {
        margin-top: 22px;
    }

    .server-info-bar {
        position: relative;
        padding: 16px 0 !important;
    }

    .server-info-bar .info-item {
        margin-bottom: 12px;
    }

    .content-rankings {
        width: 100% !important;
        max-width: 100% !important;
        padding: 26px 18px !important;
        margin: 10px auto 36px !important;
    }

    .ranking-module-header img {
        max-width: 420px !important;
        width: 100% !important;
    }

    .modal-dialog {
        width: calc(100% - 28px) !important;
        margin: 18px auto !important;
    }

    .footer {
        padding: 28px 0 !important;
    }
}

@media (max-width: 767px) {
    h1,
    h2,
    h3,
    h4,
    h5,
    h6,
    .panel-title,
    .page-title,
    .modal-title {
        font-size: 22px !important;
        line-height: 1.25 !important;
        margin-bottom: 18px !important;
        letter-spacing: 1px !important;
        overflow-wrap: anywhere;
    }

    #navbar {
        padding: 8px 10px;
    }

    #navbar ul li a {
        font-size: 11px !important;
        padding: 8px 10px !important;
    }

    .navbar-login-btn {
        width: 100%;
        justify-content: center;
        margin-left: 0;
    }

    .btn-login-small {
        flex: 1 1 auto;
        max-width: 150px;
    }

    #hero {
        padding: 30px 12px 28px !important;
    }

    .hero-logo {
        width: 280px !important;
        margin-bottom: 12px !important;
    }

    .hero-online-btn {
        width: 144px !important;
        height: 144px !important;
        border-width: 4px !important;
    }

    .hero-online-btn .count {
        font-size: 50px !important;
    }

    .hero-online-btn .label {
        font-size: 11px !important;
        max-width: 110px;
    }

    .stat-box-account,
    .stat-box-char {
        width: min(100%, 300px) !important;
        padding: 13px 18px !important;
    }

    .stat-box-account .value,
    .stat-box-char .value {
        font-size: 26px !important;
    }

    .stat-box-account .label,
    .stat-box-char .label {
        font-size: 10px !important;
    }

    .hero-actions {
        flex-direction: column;
        align-items: stretch;
        width: min(100%, 320px);
        margin-left: auto;
        margin-right: auto;
    }

    .btn-hero-large {
        width: 100%;
        min-width: 0;
        font-size: 16px !important;
        padding: 13px 18px !important;
    }

    #container {
        width: calc(100% - 20px) !important;
        padding: 20px 0 !important;
    }

    .row {
        margin-left: -8px !important;
        margin-right: -8px !important;
    }

    [class*='col-'] {
        padding-left: 8px !important;
        padding-right: 8px !important;
    }

    .glass-panel,
    .panel,
    .modules_cont,
    .modules_cont_full,
    .modal-content,
    .content-rankings {
        border-radius: 8px !important;
    }

    .panel-heading,
    .card-header {
        padding: 12px 14px !important;
    }

    .panel-body,
    .card-body,
    .modules_cont,
    .modules_cont_full {
        padding: 14px !important;
    }

    .table {
        min-width: 540px;
        font-size: 13px !important;
    }

    .table thead th,
    .table tbody td,
    .table-condensed > tbody > tr > td {
        padding: 8px 7px !important;
        white-space: nowrap;
    }

    .rankings_menu {
        display: grid !important;
        grid-template-columns: 1fr;
        gap: 8px !important;
        padding: 12px !important;
    }

    .rankings_menu a {
        width: 100%;
        min-width: 0 !important;
        padding: 10px 12px !important;
        font-size: 12px !important;
        text-align: center;
    }

    .content-rankings {
        padding: 18px 12px !important;
        border-width: 1px !important;
    }

    .social-buttons-container {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
    }

    .btn-social {
        width: 46px !important;
        height: 46px !important;
        padding: 0 !important;
        display: inline-flex !important;
        align-items: center;
        justify-content: center;
    }

    .floating-widget {
        left: 10px !important;
        bottom: 10px !important;
        gap: 8px !important;
        z-index: 1001 !important;
    }

    .fw-btn {
        width: 46px !important;
        height: 46px !important;
        padding: 0 !important;
    }

    .footer {
        text-align: center;
        padding: 24px 10px 76px !important;
    }

    .footer a,
    .footer span {
        display: inline-block;
        margin: 4px 2px;
    }
}

@media (max-width: 575px) {
    #navbar ul {
        scrollbar-width: thin;
    }

    .hero-logo {
        width: 230px !important;
    }

    .hero-stats {
        gap: 14px !important;
    }

    .hero-online-btn {
        width: 128px !important;
        height: 128px !important;
    }

    .hero-online-btn .count {
        font-size: 42px !important;
    }

    .btn-hero-large {
        font-size: 15px !important;
    }

    .server-info-bar .col-xs-6 {
        width: 100% !important;
        float: none !important;
    }

    .register-container {
        max-width: calc(100% - 20px) !important;
        padding: 2rem 1.15rem !important;
        margin: 14px auto !important;
    }

    #container[style*='min-height: 100vh'] {
        align-items: flex-start !important;
        justify-content: center !important;
        min-height: auto !important;
        padding: 16px 0 28px !important;
    }

    .input-group-addon {
        min-width: 42px !important;
    }

    .form-control {
        min-width: 0;
    }

    .modal-dialog {
        width: calc(100% - 18px) !important;
        margin: 10px auto !important;
    }

    .modal-body {
        padding: 16px !important;
    }

    .king-of-mu-container {
        padding: 22px 14px !important;
    }

    .king-title {
        font-size: 24px !important;
    }

    .king-clan-name {
        font-size: 28px !important;
        overflow-wrap: anywhere;
    }
}

@media (max-width: 380px) {
    #container {
        width: calc(100% - 14px) !important;
    }

    .hero-logo {
        width: 200px !important;
    }

    .hero-online-btn {
        width: 116px !important;
        height: 116px !important;
    }

    .hero-online-btn .count {
        font-size: 36px !important;
    }

    .btn-login-small {
        max-width: none;
        padding: 7px 9px !important;
    }

    .panel-body,
    .card-body,
    .modules_cont,
    .modules_cont_full {
        padding: 12px !important;
    }
}
