body {
    background-color: #8ec5fc;
    background-image: linear-gradient(90deg, #8ec5fc 0%, #fcedc3 100%);
}

@font-face {
    font-family: MCFont;
    src: url(../fonts/Minecraft.ttf);
}

@font-face {
    font-family: Main;
    src: url(../fonts/Raleway.ttf);
}

*{
    box-sizing: border-box;
    font-family: Main;
    font-weight: bold;
}

.test_block{
    padding: 12px;
    border: 1px dashed blue;
}

.container {
    box-sizing: border-box;
    width: calc(100vw - 48px); 
    min-height: calc(100vh - 48px);
    margin: 24px;
    padding: 24px 24px 100px 24px;
    background-color: white;
    border-radius: 24px;
    box-shadow: 0 0 10px 0px #cccccc38;
}

.header{
    margin-bottom: 12px;
    display: flex;
}

.logo{
    width: 100%;
    font-size: xx-large;
    cursor: default;
    user-select: none;
    font-weight: lighter;
    align-items: center;
    font-family: MCFont;
}

.reload{
    width: 100%;
    text-align: right;
    align-items: center;
}

.main{
    display: flex;
}

.navigation{
    width: 16%;
    padding-right: 12px;
}

.btn{
    background: white;
    border-radius: 16px;
    padding: 12px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s, box-shadow 0.2s;
    cursor: pointer;
    user-select: none;
}

.btn:hover {
    transform: translateY(-2px);
}


.content {
    columns: 5 200px;
    column-gap: 15px;
    width: 100%;
    padding: 12px;
    background-color: lightgrey;
    border-radius: 24px;
}

.content_block {
    display: flex;
    flex-direction: column;
    break-inside: avoid;
    margin-bottom: 15px;
    color: white;
    background: #232323;
    border-radius: 16px;
    padding: 12px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}

.content_block:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.2);
}

.content_block_image {
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
}

.youtube {
    background-image: url(../img/assets/youtube.png);
}

.telegram {
    background-image: url(../img/assets/telegram.jpg);
}

.app {
    background-image: url(../img/assets/app.webp);
}

.content_block.expanded {
    position: fixed;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    margin: 0 !important;
    padding: 20px;
    z-index: 1000;
    border-radius: 0 !important;
    cursor: default;
    transform: none !important;
    box-shadow: none !important;
}

.close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 1001;
    transition: background-color 0.2s;
    opacity: 0;
    transition: opacity 0.3s ease 0.2s;
}

.close-btn:hover {
    background-color: rgba(255, 255, 255, 0.4);
}

.close-btn::before, .close-btn::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 2px;
    background-color: white;
}

.close-btn::before {
    transform: rotate(45deg);
}

.close-btn::after {
    transform: rotate(-45deg);
}

.content_block.expanded .close-btn {
    display: flex;
    opacity: 1;
}

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0);
    z-index: 999;
    display: none;
    transition: background-color 0.4s ease;
}

.overlay.active {
    background-color: rgba(0, 0, 0, 0.8);
}

body.block-expanded {
    overflow: hidden;
}

.content_iframe {
    position: relative;
    flex-grow: 1;
    width: 100%;
    margin-top: 12px;
    border-radius: 12px;
    height: calc(100% - 24px); /* Учитываем padding (12px сверху + 12px снизу) */
    margin-top: 12px;
}

.ad_block {
    border: 1px solid black;
    background: lightblue;
    background-image: url(../img/LuxeDraw.png);
    background-position: center;
    background-size: contain;
    width: 100%;
    aspect-ratio: 6 / 5;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    font-family: 'Courier New', Courier, monospace;
    margin-top: 12px;
    border-radius: 24px;

    text-align: center;
    padding-top: 25%;

    -webkit-box-shadow: 0px 0px 35px 18px rgba(255, 128, 0, 0.2);
    -moz-box-shadow: 0px 0px 35px 18px rgba(255, 128, 0, 0.2);
    box-shadow: 0px 0px 35px 18px rgba(255, 128, 0, 0.2);
}

.content_link{
    text-decoration: none;
}


@media (max-width: 768px) {
    body {
        background: linear-gradient(90deg, #8ec5fc 0%, #fcedc3 100%) fixed;
        height: auto;
        min-height: 100vh;
        padding: 0;
    }

    .container {
        width: 100%;
        height: auto;
        min-height: 100vh;
        margin: 0;
        padding: 16px;
        border-radius: 12px;
    }

    .logo, .reload {
        width: 100%;
    }

    .reload {
        margin-top: 12px;
    }

    .main {
        flex-direction: column;
    }

    .navigation {
        width: 100%;
        padding-right: 0;
        margin-bottom: 16px;
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .btn {
        padding: 10px;
        text-align: center;
    }

    .content {
        columns: 1 !important;
        column-gap: 0;
        padding: 8px;
        background-color: transparent;
    }

    .content_block {
        width: 100%;
        margin-bottom: 12px;
    }

    .content_block.expanded {
        padding: 16px;
    }

    .close-btn {
        top: 10px;
        right: 10px;
        width: 30px;
        height: 30px;
    }

    .close-btn::before, 
    .close-btn::after {
        width: 16px;
    }

    .content_iframe {
        height: calc(100% - 20px);
        margin-top: 8px;
        border-radius: 8px;
    }

    .ad_block {
        aspect-ratio: 1 / 1;
        padding-top: 30%;
    }
}


@media (max-width: 480px) {
    .navigation {
        grid-template-columns: 1fr;
    }

    .content_block {
        padding: 10px;
    }

    .content_iframe {
        height: calc(100% - 16px);
    }
}

.favorite-star {
    position: absolute;
    top: 4px;
    right: 10px;
    font-size: 24px;
    cursor: pointer;
    user-select: none;
    color: gold;
    text-shadow: 0 0 2px black;
    transition: transform 0.2s;
}

.favorite-star:hover {
    transform: scale(1.2);
}

.favorite-star.active {
    color: gold;
    content: "★";
}

.content_block {
    position: relative;
}

.content_block:not(.favorite) {
    display: block;
}

.show-favorites-only .content_block:not(.favorite) {
    display: none;
}