/* DESKTOP  (1024)
---------------------------------------------*/
@media only screen and (max-width:1024px) {
    .aside.right {display: none;}
    .promo_item_content img {height: 190px;}
}



/* TABLET  (992)
---------------------------------------------*/
@media only screen and (max-width:992px) {
    .promo_item_content img {height: 235px;}
}



/* TABLET  (800)
---------------------------------------------*/
@media only screen and (max-width:800px) {
    .aside {flex: 0 0 auto;}
    .aside_bl {display: none;}
    .aside.left {margin-right: 0;}
    .main {max-width: calc(100%);}
    .promo_item_content img {height: 265px;}
    .logo {flex: 0 0 100%;margin-bottom: 5px;}
    .header {padding: 5px 5px 15px;}
    .search input {height: 36px;}
    #open_panel, .m_nav, .m_nav:hover {background: rgba(255, 255, 255, 0.2);}
    .m_nav {margin: 0 15px 0 10px; display: inline-block;}
    #open_panel {margin-right: -5px;}
    .aside_bl.menu_ {position: absolute;z-index: 20;min-width: 250px;}
}



/* TABLET  (768)
---------------------------------------------*/
@media only screen and (max-width:768px) {
    .promo_item_content img {height: 250px;}
}



/* TABLET  (640)
---------------------------------------------*/
@media only screen and (max-width:640px) {
    .promo_item_content img {height: 285px;}
}



/* MOBILE  (480)
---------------------------------------------*/
@media only screen and (max-width:480px) {
    .m_nav, .upanel {order: 4;}
    .search {order: 2;display: flex;width: 100%;flex: 1 100%;}
    .search form {width: 100%;margin: 0 15px 15px;}
    .promo_item_content img {height: 205px;}
    .short_item_top_content .poster {flex: 0 0 100%;margin-right: 0;margin-bottom: 20px;}
    .short_item_load .rating_star {display: none;}
    .short_item_top {margin-bottom: 15px;}
    .short_item_load h3 {text-align: center;margin-top: 0px;}
    .full_poster img {max-width: 65%;}
}



/* MOBILE  (360)
---------------------------------------------*/
@media only screen and (max-width: 360px) {
    .m_hide {display: none;}
    .search form {margin: 0 10px 15px;}
    .short_item_top_content .descr {display: none;}
    .short_item_top_content .poster {margin-bottom: 15px;}
    .short_item_top {margin-bottom: 0;}
    .category {display: none;}
    .short_item_bottom {justify-content: center;}
    .promo_item_content img {height: 230px;}
    .full_poster img {max-width: 100%;}
    .short_item_bottom {justify-content: space-between;}
    .short_item_bottom_info {justify-content: center;}
    .add_user {display: none;}
}



/* MOBILE  (320)
---------------------------------------------*/
@media only screen and (max-width:320px) {
    .promo_item_content img {height: 420px;}
}

/* Modern responsive overrides */
@media only screen and (max-width:1180px) {
    .container {
        padding: 16px !important;
    }

    .middle {
        grid-template-columns: 235px minmax(0, 1fr) !important;
        gap: 16px !important;
    }

    .content {
        grid-template-columns: minmax(0, 1fr) !important;
    }

    .aside.right {
        display: none !important;
    }
}

@media only screen and (max-width:800px) {
    .middle {
        display: block !important;
    }

    .main {
        max-width: 100% !important;
    }

    .header {
        padding: 12px !important;
        gap: 10px !important;
    }

    .logo {
        flex: 1 1 auto !important;
        width: auto !important;
        margin-bottom: 0 !important;
        text-align: left !important;
    }

    .search {
        flex: 1 1 100% !important;
        width: 100% !important;
    }

    .search form {
        margin: 0 !important;
    }

    .m_nav {
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        margin: 0 !important;
        min-height: 38px !important;
        padding: 8px 12px !important;
    }

    .aside_bl.menu_ {
        position: absolute !important;
        z-index: 20 !important;
        min-width: min(300px, calc(100vw - 32px)) !important;
        box-shadow: 0 16px 40px rgba(20, 28, 33, .18) !important;
    }

    .promo_item_content img {
        height: 220px !important;
    }

    .full_page,
    .short_item_load {
        padding: 18px !important;
    }

    .post_full_top,
    .item_post_content {
        grid-template-columns: 1fr !important;
    }

    .item_poster {
        max-width: 260px !important;
    }

    .item_post_info {
        gap: 12px !important;
    }
}

@media only screen and (max-width:560px) {
    .container {
        padding: 10px !important;
    }

    .header {
        margin-bottom: 14px !important;
    }

    .logo {
        flex: 1 1 100% !important;
        justify-content: center !important;
        font-size: 18px !important;
    }

    .search form {
        display: grid !important;
        grid-template-columns: 1fr !important;
    }

    .search input,
    .search button {
        width: 100% !important;
    }

    .promo_item_content img {
        height: 240px !important;
    }

    .content_body > div[style*="text-align: center"] h1 span {
        font-size: 16px !important;
    }

    .item_post {
        padding: 14px !important;
    }

    .item_post .post_title a {
        font-size: 16px !important;
    }

    .item_poster {
        max-width: none !important;
        width: 100% !important;
    }

    .item_poster img {
        width: 100% !important;
        max-width: 100% !important;
    }

    .item_descr {
        display: block !important;
    }

    .post_info {
        padding: 14px !important;
    }

    .post_info > ul > li {
        display: block !important;
    }

    .footer {
        text-align: center !important;
    }
}

/* Anime layout upgrade responsive */
@media only screen and (max-width:1320px) {
    .aside.right .inf_bl {
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    }

    #allEntries {
        grid-template-columns: 1fr !important;
    }

    #allEntries > div[id^="entryID"]:first-of-type .item_post_content {
        grid-template-columns: 180px minmax(0, 1fr) !important;
    }
}

@media only screen and (max-width:1040px) {
    .aside.left {
        position: static !important;
    }

    .aside.right .inf_bl {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }

    .post_info > ul {
        grid-template-columns: 1fr !important;
    }

    .post_info > ul > li {
        min-height: 0 !important;
    }
}

@media only screen and (max-width:860px) {
    .global_promo {
        padding: 10px !important;
    }

    .aside.right .inf_bl {
        grid-template-columns: 1fr !important;
    }

    .aside.right .inf_3 {
        grid-template-columns: 64px minmax(0, 1fr) !important;
        min-height: 92px !important;
    }

    .aside.right .inf_3 .inf_item_img img {
        width: 64px !important;
        height: 82px !important;
    }

    #allEntries,
    #allEntries > div[id^="entryID"] {
        display: block !important;
    }

    #allEntries > div[id^="entryID"] .item_post_content,
    #allEntries > div[id^="entryID"]:first-of-type .item_post_content {
        grid-template-columns: 160px minmax(0, 1fr) !important;
    }

    #allEntries > div[id^="entryID"]:first-of-type .post_title a {
        font-size: 18px !important;
    }

    .post_full_top {
        grid-template-columns: minmax(210px, 280px) minmax(0, 1fr) !important;
    }

    .full_page .h1,
    .full_page .h3,
    #namegame {
        font-size: 24px !important;
    }
}

@media only screen and (max-width:620px) {
    .container {
        padding: 10px !important;
    }

    .header::before {
        width: 120px !important;
    }

    .logo {
        flex-basis: 100% !important;
        justify-content: center !important;
        box-shadow: none !important;
    }

    .global_promo {
        padding: 0 !important;
        border: 0 !important;
        background: transparent !important;
        box-shadow: none !important;
    }

    #allEntries > div[id^="entryID"] .post_title {
        padding: 16px 14px 0 !important;
    }

    #allEntries > div[id^="entryID"] .item_post_content,
    #allEntries > div[id^="entryID"]:first-of-type .item_post_content {
        display: block !important;
        padding: 0 14px 14px !important;
    }

    #allEntries .item_poster {
        max-width: none !important;
    }

    #allEntries .item_descr {
        -webkit-line-clamp: 4 !important;
    }

    .post_full_top {
        grid-template-columns: 1fr !important;
    }

    .post_img {
        max-width: 330px !important;
        margin: 0 auto !important;
    }

    div.article_image {
        grid-template-columns: 1fr !important;
    }

    div.article_image a.ulightbox img {
        height: auto !important;
    }

    .footer {
        display: block !important;
        text-align: center !important;
    }
}

/* Anime responsive polish */
@media only screen and (max-width:1180px) {
    .container {
        padding: 16px !important;
    }

    .middle {
        grid-template-columns: 235px minmax(0, 1fr) !important;
        gap: 18px !important;
    }

    .content {
        grid-template-columns: minmax(0, 1fr) !important;
        gap: 18px !important;
    }

    .aside.right {
        display: none !important;
    }
}

@media only screen and (max-width:860px) {
    .middle {
        display: block !important;
    }

    .main {
        max-width: 100% !important;
    }

    .header {
        padding: 12px !important;
        gap: 10px !important;
    }

    .logo {
        flex: 1 1 auto !important;
        width: auto !important;
        margin-bottom: 0 !important;
        justify-content: flex-start !important;
        text-align: left !important;
    }

    .search {
        flex: 1 1 100% !important;
        width: 100% !important;
    }

    .search form {
        width: 100% !important;
        margin: 0 !important;
    }

    .m_nav {
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        margin: 0 !important;
        min-height: 38px !important;
        padding: 8px 12px !important;
    }

    .aside_bl.menu_ {
        position: absolute !important;
        z-index: 20 !important;
        min-width: min(310px, calc(100vw - 32px)) !important;
        box-shadow: 0 18px 45px rgba(43, 34, 56, .18) !important;
    }

    .promo_item_content img {
        height: 220px !important;
    }

    .full_page,
    .short_item_load {
        padding: 18px !important;
    }

    .post_full_top,
    .item_post_content {
        grid-template-columns: 1fr !important;
    }

    .item_poster {
        width: 100% !important;
        max-width: 280px !important;
    }

    .item_post_info {
        gap: 12px !important;
    }
}

@media only screen and (max-width:560px) {
    .container {
        padding: 10px !important;
    }

    .header {
        margin-bottom: 14px !important;
    }

    .logo {
        flex: 1 1 100% !important;
        justify-content: center !important;
        font-size: 18px !important;
    }

    .search form {
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 8px !important;
    }

    .search input,
    .search button {
        width: 100% !important;
    }

    .promo_item_content img {
        height: 240px !important;
    }

    .content_body > div[style*="text-align: center"] h1 span {
        font-size: 16px !important;
    }

    .item_post {
        padding: 14px !important;
    }

    .content_body .item_post .item_post_content {
        display: block !important;
    }

    .item_post .post_title a {
        font-size: 16px !important;
    }

    .item_poster {
        width: 100% !important;
        max-width: none !important;
        margin: 0 0 16px !important;
    }

    .item_poster img {
        width: 100% !important;
        max-width: 100% !important;
    }

    .item_descr {
        display: block !important;
    }

    .post_full_top {
        grid-template-columns: 1fr !important;
    }

    .post_info {
        padding: 14px !important;
    }

    .post_info > ul > li {
        display: block !important;
    }

    .post_info > ul > li span {
        display: block !important;
        margin-bottom: 3px !important;
    }

    .article_image a.ulightbox {
        width: 100% !important;
        margin: 5px 0 !important;
    }

    td#catsjs {
        width: calc(100% - 34px) !important;
    }

    .footer {
        text-align: center !important;
    }
}

/* Final anime layout fixes after all older media overrides */
@media only screen and (max-width:1180px) {
    .aside.right {
        display: block !important;
        order: -1 !important;
    }

    .aside.right .aside_bl {
        display: block !important;
    }

    .aside.right .inf_bl {
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    }
}

@media only screen and (max-width:860px) {
    .aside.right {
        display: block !important;
    }

    .aside.left .aside_bl:not(.menu_),
    .aside.right .aside_bl {
        display: block !important;
    }

    .aside.right .inf_bl {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }

    #allEntries {
        display: block !important;
    }

    #allEntries > div[id^="entryID"] {
        display: block !important;
    }

    #allEntries > div[id^="entryID"] .item_post_content,
    #allEntries > div[id^="entryID"]:first-of-type .item_post_content {
        display: grid !important;
        grid-template-columns: 150px minmax(0, 1fr) !important;
    }
}

@media only screen and (max-width:620px) {
    .aside.right .inf_bl {
        grid-template-columns: 1fr !important;
    }

    #allEntries > div[id^="entryID"] .item_post_content,
    #allEntries > div[id^="entryID"]:first-of-type .item_post_content {
        display: block !important;
    }

    .content_body .item_post .item_post_content {
        display: block !important;
    }

    #allEntries .item_poster {
        max-width: none !important;
    }
}
