:root {
    --background-color: #1e1e1e;
    --text-color: #d1d1d1;
    --highlight-color: #66d37a;
    --hover-text-color: #333333;
    --neutr: #f5f5f5;
    --infos: #aaaaaa;
}

[data-theme="light"] {
    --background-color: #f9f9f9;
    --text-color: #333333;
    --neutr: #000000;
    --infos: #f9f9f9;
}

body {
    background-color: var(--background-color);
    color: var(--text-color);
    font-size: 17px;
    text-align: left;
    margin: 0;
    padding: 0;
}

a {
    color: var(--highlight-color);
    text-decoration: none;
    transition: color 0.3s ease, background-color 0.3s ease;
}

a:hover {
    color: #ffffff;
}

.logo {
    flex-shrink: 0;
}

.logo a { 
    background: url(/img/logo.webp) no-repeat center; 
    display: block; 
    width:200px; 
    height:45px; 
    background-size: contain; 
}

.menu-wrapper {
    display: flex;
    align-items: center;
}

.menu {
    margin-right: 5px;
    display: flex;
}

.menu a {
    padding: 12px 16px;
    text-decoration: none;
    display: block;
}

.menu-button {
    display: none;
    background-color: #262626;
    color: var(--highlight-color);
    padding: 14px 16px;
    font-size: 17px;
    font-weight: bold;
    border: none;
    cursor: pointer;
    background: url(/img/menue.svg) no-repeat center;
}

.menu-button:hover {
    background: url(/img/closem.svg) no-repeat center;
}

.popup-menu {
    display: none;
    position: fixed;
    top: 50px;
    right: 0;
    background-color: rgba(0, 0, 0, 0.95);
    min-width: 200px;
    box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.2);
    z-index: 6;
    flex-wrap: wrap;
}

.popup-menu a {
    padding: 10px 12px;
    text-decoration: none;
    display: block;
    flex: 1 0 100%;
    box-sizing: border-box;
    text-align: center;
}

#theme-toggle {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 24px;
    color: var(--text-color);
    padding: 0 5px;
    transition: color 0.3s ease;
}

#theme-toggle:hover {
    color: #4ac26b;
}

#theme-toggle span {
    display: inline-block;
    transition: opacity 0.3s ease;
}

.language-dropdown {
    position: relative;
    display: inline-block;
}

.language-toggle {
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    font-size: 16px;
    color: var(--text-color);
    padding: 5px 10px;
}

.language-toggle img {
    width: 24px;
    height: 24px;
    margin-right: 5px;
}

.language-dropdown-content {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: rgba(0, 0, 0, 0.95);
    padding: 5px 0;
    box-shadow: 0px 8px 16px rgba(0,0,0,0.2);
    z-index: 10;
    flex-direction: column;
    border-radius: 5px;
    width: 120px;
}

.language-dropdown-content a {
    display: flex;
    align-items: center;
    padding: 10px 16px;
    text-decoration: none;
}

.language-dropdown-content a img {
    width: 24px;
    height: 24px;
    margin-right: 5px;
    border-radius: 50%;
}

.container {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    margin: 0 auto;
}

ul, li {
    list-style: none;
    margin: 0;
    padding: 0;
}

h2 {
    font-size: 18px;
    margin: 4px;
}

p {
    padding: 5px;
    margin:5px;
}

.infos {
    color: var(--infos);
    padding: 5px 0;
    text-align: left;
    margin: 5px 0;
    background-color: rgba(18, 18, 18, 0.9);
    width:100%;
}

.infos p a {
    text-decoration:underline;
}


h1 {
    display: inline-block;
    font-size: 19px;
    margin: 5px;
    padding: 5px;
}

.h1-bar {
    box-shadow: 0 7px 20px -10px rgba(0, 0, 0, 1);
    margin: 50px 0 10px 0;
}

.top-menu {
    background-color: #262626;
    position: fixed;
    top: 0;
    margin: 0 auto;
    width: 100%;
    z-index: 5;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#videoPrev {
    pointer-events: none;
    width: 100%;
    height: 257px;
    border-radius: 5px;
    object-fit: cover;
    z-index: 1;
    visibility: visible;
    max-width: 100%;
}

.categoryes {
    padding: 5px;
    text-align: left;
    margin: 3px 5px;
}

.categoryes li {
    margin: 2px;
    background-color: rgba(18, 18, 18, 0.9);
    display: inline-block;
}

.categoryes li a {
    display: block;
    padding: 8px 15px;
}

.article {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    margin: 0 auto;
    padding: 0 15px;
}

.thumbs {
    position: relative;
    width: calc(33.33% - 2%);
    margin: 0 1% 20px 1%;
    background-color: rgba(18, 18, 18, 0.9);
    border-radius: 2px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.thumbs video {
    pointer-events: none;
    touch-action: manipulation;
}

.thumbs a {
    display: block;
    width: 100%;
    text-decoration: none;
    color: inherit;
}

.thumb-image {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: 2px 2px 0 0;
}

.thumb-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.thumb-image:hover img {
    transform: scale(1.05);
}

.overlay {
    position: absolute;
    bottom: 8px;
    background: rgba(0, 0, 0, 0.8);
    color: #fff;
    font-size: 12px;
    font-weight: 500;
    padding: 4px 8px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 5px;
    line-height: 1;
}

.duration { right: 8px; }
.views { left: 8px; }

.overlay svg {
    flex-shrink: 0;
}

.h2 {
    display: block;
    padding: 10px;
    text-align: left;
    font-size: 16px;
    color: #fff;
    line-height: 1.3;
    word-break: break-word;
}

.neutral-title {
    color: var(--neutr);
    text-align: left;
    font-weight: bold;
    padding: 10px;
    border-bottom: 1px solid #121212;
    margin: 5px;
}

.pagination {
    display: flex;
    justify-content: left;
    align-items: center;
    list-style-type: none;
    padding: 0;
    margin: 20px 0;
    flex-wrap: wrap;
}

.pagination a, .pagination .current {
    display: inline-block;
    padding: 10px 15px;
    margin: 5px;
    color: var(--highlight-color);
    text-decoration: none;
    border: 1px solid #ddd;
    border-radius: 5px;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.pagination .current {
    background-color: #007bff;
    color: white;
    border: 1px solid #007bff;
}

.pagination a:hover {
    background-color: #58b169;
    color: white;
}

.footer {
    color:#8c8c8c;
    padding: 12px 8px;
    background-color: #121212;
}

.footer a {
    text-decoration: underline;
}

.footer span {
    float: right;
}

@media all and (min-width: 1020px) {
    .foot {
        margin: 0 auto;
        width: 996px;
    }
}

@media screen and (min-width: 1400px) {
    .thumbs {
        width: calc(25% - 2%);
    }
}

@media screen and (max-width: 830px) {
    .thumbs {
        width: calc(50% - 2%);
    }
}

@media screen and (max-width: 750px) {
    .menu {
        display: none;
        width: 100%;
    }

    .menu-button {
        display: block;
        float: right;
        margin: 0 10px;
    }

    .popup-menu {
        display: flex;
        flex-direction: column;
        width: 100%;
        height: auto;
    }
}

@media screen and (max-width: 480px) {
    #theme-toggle {
        margin-top:-3px;
    }
    .thumbs {
        width: 98%;
    }
    
    .container {
        flex-direction: column;
    }

    .infos {
        order: 3;
    }
    
    .pagination {
        order: 2;
    }

    .article {
        order: 1;
    }

    .pagination a, .pagination .current {
        padding: 8px 12px;
        font-size: 14px;
    }

    .pagination .prev, .pagination .next {
        font-size: 16px;
    }
    
    .tags li {
        width:48%; 
    }
}

@media screen and (max-width: 360px) {
    .logo a { 
        background: url(/img/small_logo.png) no-repeat center; 
        width:75px; 
        height:35px; 
        background-size: contain; 
    }
    
    .logo { 
        padding: 5px 0;
    }
}