#dialog-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    justify-content: center;
    align-items: center;
    z-index: 1000;
    backdrop-filter: blur(4px);
}

#dialog-box {
    background-color: #ffffff;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.25);
    width: 900px;             /* шире */
    max-width: 95%;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    font-family: "Segoe UI", sans-serif;
}

#dialog-header {
    background: #007bff;
    color: #fff;
    padding: 14px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 500;
    font-size: 18px;
    flex-shrink: 0;
}

#close-btn {
    background: none;
    border: none;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    transition: transform 0.2s ease;
}
#close-btn:hover {
    transform: scale(1.1);
}

#dialog-content {
    padding: 15px 20px;
    flex: 1;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #ccc transparent;
}

/* Красивый скроллбар */
#dialog-content::-webkit-scrollbar {
    width: 6px;
}
#dialog-content::-webkit-scrollbar-track {
    background: transparent;
}
#dialog-content::-webkit-scrollbar-thumb {
    background-color: #bbb;
    border-radius: 6px;
}
#dialog-content::-webkit-scrollbar-thumb:hover {
    background-color: #999;
}

#dialog-content iframe {
    width: 100%;
    height: 420px;   /* увеличил размер видео */
    border-radius: 10px;
    margin: 12px 0;
    border: none;
}

#dialog-footer {
    border-top: 1px solid #121c4b2e;
    background-color: #f1f1f1;
    color: #aaa;
    font-size: 12px;
    text-align: center;
    padding: 10px;
    display: flex;
    justify-content: space-between;
    flex-shrink: 0; /* не сжимается */
}

#dialog-footer a {
    color: #bbb;
    text-decoration: none;
    transition: color 0.2s ease;
}
#dialog-footer a:hover {
    color: #888;
}

.video-container {
    width: 90%;
    max-width: 960px;
    margin: 20px auto;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 8px 20px rgba(0,0,0,0.4);
}

.video-container video {
    width: 100%;
    display: block;
    border-radius: 15px;
}

.vk-video-link {
    position: relative;
    width: 90%;
    max-width: 960px;
    margin: 20px auto;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 8px 20px rgba(0,0,0,0.4);
    text-align: center;
}

.vk-video-link img.vk-poster {
    width: 100%;
    display: block;
    border-radius: 15px;
}

.vk-video-link .vk-button {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    padding: 10px 25px;
    background-color: rgba(0, 123, 255, 0.8);
    color: white;
    text-decoration: none;
    font-weight: bold;
    border-radius: 8px;
    transition: background-color 0.3s;
}

.vk-video-link .vk-button:hover {
    background-color: rgba(0, 123, 255, 1);
}
