/* RESET, BASIC UI SETTINGS
----------------------------------------------- */
:root {
    --main-color: #348638;
    --main-color-hover: #42ab47;
    --medium-color: rgb(86 92 103 / 20%);
    --two-medium-color: rgb(86 92 103 / 32%);
    --bg-main-color: #191a1d;
}

* {
    background: transparent;
    margin: 0;
    padding: 0;
    outline: none;
    border: 0;
    box-sizing: border-box;
}

ol, ul {
    list-style: none;
}

table {
    border-collapse: collapse;
    border-spacing: 0;
}

/* ❗ MEDIA RESET — player-ს არ ვეხებით */
img, table {
    max-width: 100%;
    border-radius: 6px;
}

iframe, video, embed, object {
    max-width: none;
    border-radius: 0;
}

html {
    font-size: 62.5%;
}

body {
    line-height: normal;
    font-family: 'BPG Arial', sans-serif;
    color: #fff;
    background: #141414;
    min-height: 100%;
    width: 100%;
    font-weight: 500;
    font-size: 1.2rem;
}

body.modal-opened {
    overflow: hidden;
}

a {
    color: #ffffff;
    text-decoration: none;
}

a:hover {
    color: #f7f7f7;
}

h1, h2, h3, h4, h5 {
    font-weight: 400;
    font-size: 2.4rem;
}

::selection {
    background: #f6e58d;
    color: #000;
}

b, strong {
    font-weight: bold;
}

/* FORM ELEMENTS
----------------------------------------------- */
button, select, textarea, input {
    appearance: none;
    -webkit-appearance: none;
    font-family: "Montserrat", sans-serif;
}

button:not(.mute-toggle, .muted, .btn-vion):not([class*="fr"]):not([class*="plyr"]):not(.search-btn):not([class*="fancybox"]):not(.form__btn),
.button, .btn,
input[type="button"], input[type="submit"] {
    display: inline-block;
    cursor: pointer;
    text-align: center;
    padding: 0 20px;
    height: 40px;
    line-height: 40px;
    background: var(--main-color);
    color: #fff;
    font-size: 1.4rem;
    font-weight: 600;
    border-radius: 6px;
}

button:hover, .btn:hover {
    background: var(--main-color-hover);
}

input[type="text"], input[type="password"], select, textarea {
    height: 40px;
    padding: 0 15px;
    color: #999;
    width: 100%;
    background-color: var(--medium-color);
    border-radius: 4px;
}

textarea {
    resize: vertical;
    padding: 15px;
}

input::placeholder, textarea::placeholder {
    opacity: 0.5;
}

/* SNIPPETS / HELPERS
----------------------------------------------- */
.d-none { display: none; }
.clr { clear: both; }

.clearfix::after {
    content: "";
    display: table;
    clear: both;
}

.d-flex {
    display: flex;
    flex-wrap: wrap;
}

.fd-column {
    flex-direction: column;
}

.jc-center { justify-content: center; }
.jc-space-between { justify-content: space-between; }
.ai-center { align-items: center; }

.flex-grow-1 {
    flex: 1 1 0;
}

/* GRID — DLE CONTENT
----------------------------------------------- */
#dle-content {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    grid-gap: 20px;
    width: 100%;
}

#dle-content > *:not(.movie-item) {
    grid-column: 1 / -1;
}

/* SEARCH GRID */
#searchsuggestions {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    grid-gap: 20px;
}

#searchsuggestions > *:not(.movie-item) {
    grid-column: 1 / -1;
}

/* ======================================
   🔒 PLAYER FULL ISOLATION (CRITICAL)
   ====================================== */

.video-player-scope {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    grid-column: 1 / -1 !important;
}

.video-player-scope * {
    box-sizing: border-box;
}

.video-player-scope iframe,
.video-player-scope video {
    display: block;
    width: 100% !important;
    height: auto !important;
    aspect-ratio: 16 / 9;
    max-width: none !important;
}

/* JW / Plyr safety */
.video-player-scope .jwplayer,
.video-player-scope .plyr {
    width: 100% !important;
}

/* prevent grid/flex collapse */
.video-player-scope {
    contain: layout paint size;
}
