:root {
    --site-width: 1760px;
}

html, body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

* {
    box-sizing: border-box;
}

body {
    font-family: 'Roboto Condensed', sans-serif;
    background: #161015;
    color: #ffffff;
    margin: 0;
    padding: 0;
}

header {
    background: #161015;
    width: 100%;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: var(--site-width);
    margin: 8px auto;
    width: 100%;
    gap: 20px;
}

.logo {
    display: flex;
    align-items: center;
    padding-left: 20px;
    flex: 0 0 auto;
}

.logo img {
    height: 82px;
}

.search-login {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
    width: 100%;
}

.search-form {
    margin: 0;
    width: 100%;
    max-width: 620px;
    position: relative;
}

.tag-input-container {
    position: relative;
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    height: 54px;
    padding: 0 18px;
    background: #161015;
    border: 2px solid #2d272c;
    border-radius: 50px;
    width: 100%;
}

.tag-suggestions {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    width: 100%;
    background: #242526;
    z-index: 2000;
    max-height: 220px;
    overflow-y: auto;
    border-radius: 12px;
    border: 1px solid #3a3b3c;
    box-shadow: 0 8px 20px rgba(0,0,0,0.4);
}

.tag-suggestions.show {
    display: block;
}

/* lupa */

.search-button {
    position: absolute;
    left: 16px;
    border: none;
    background: transparent;
    font-size: 18px;
    cursor: pointer;
    color: #888;
    transition: color .2s;
}

.search-button:hover {
    color: #F261B8;
}

/* input */

#search-input {
    background: transparent;
    border: none;
    outline: none;
	font-family: 'Roboto Condensed', sans-serif;

    color: white;
    font-size: 16px;

    flex: 1;

    padding-left: 0px;
}

/* tagi */

#tag-list {
    display: flex;
    gap: 6px;
    margin-left: 36px; /* wyrównanie z tekstem */
}

#search-input::placeholder {
    color: #9b8f98;
    opacity: 1;
}

.search-hint {
    position: absolute;
    left: 20px;
    right: 56px;
    pointer-events: none;
    color: #8a7d86;
    font-size: 15px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tag-input-container:focus-within .search-hint,
#search-input:not(:placeholder-shown) + .search-hint {
    display: none;
}

.search-submit {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    min-width: 38px;
    border: none;
    background: transparent;
    color: #2d272c;
    cursor: pointer;
    border-radius: 50%;
    transition: color 0.25s ease, transform 0.25s ease;
    padding: 0;
}

.search-submit:hover {
    color: #F261B8;
    transform: scale(1.05);
}

.search-submit svg {
    width: 20px;
    height: 20px;
    display: block;
}

.search-tag {
    display: inline-block;
    background: orange;
    color: black;
    padding: 5px 10px;
    border-radius: 5px;
    margin: 3px;
    font-size: 14px;
    font-weight: bold;
}

.search-button{
    border:none;
    background:transparent;
    font-size:18px;
    cursor:pointer;
    color:#888;
    margin-right:10px;
    transition:color .2s;
}

.search-button:hover{
    color:#F261B8;
}

.tag-remove {
    margin-left: 5px;
    cursor: pointer;
    color: white;
}

nav {
    display: flex;
    justify-content: flex-start;
    width: 100%;
    max-width: var(--site-width);
    padding-top: 20px;
    margin: auto;
    position: relative;
    border-bottom: 2px solid #2d272c;
}

nav ul {
    list-style: none;
    padding: 0;
    display: flex;
    gap: 1px;
    margin: 0;
    justify-content: flex-start;
}

nav ul li {
    display: flex;
    position: relative;
}

nav ul li a {
    display: flex;
    align-items: center;
    justify-content: left;
    padding: 0 18px;
    height: 39px;
    text-transform: uppercase;
    font-size: 18px;
    font-weight: bold;
    text-decoration: none;
    color: white;
    background: transparent;
    transition: color 0.25s ease;
    position: relative;
    white-space: nowrap;
}

nav ul li a:hover {
    color: #F261B8;
}

nav ul li a::after {
    content: "";
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 3px;
    background: #F261B8;
    transition: width 0.3s ease;
    z-index: 2;
}

nav ul li a:hover::after {
    width: 100%;
}

nav ul li a.active {
    color: #F261B8;
}

nav ul li a.active::after {
    width: 100%;
}

.search-toggle-icon,
.search-back-icon {
    display: none;
}

@media (max-width: 950px) {
    .header-content {
        gap: 10px;
        padding: 0 10px;
        box-sizing: border-box;
    }

    .logo img {
        height: 64px;
    }

    .search-toggle-icon,
    .search-back-icon {
        position: absolute;
        top: 50%;
        right: 10px;
        transform: translateY(-50%);
        font-size: 20px;
        z-index: 1002;
        cursor: pointer;
    }

    .search-login {
        position: relative;
        justify-content: flex-end;
        padding-right: 10px;
        width: 100%;
    }

    .search-toggle-icon {
        display: block;
        margin-left: auto;
    }

    .tag-input-container {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        background: #161015;
        z-index: 1000;
        padding: 0 14px;
        height: 60px;
        width: 100vw;
        box-sizing: border-box;
        border: none;
        border-bottom: 2px solid #555;
        border-radius: 0;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        margin: 0;
    }

    #search-input {
        padding-right: 40px;
        width: 100%;
    }

    .search-hint {
        left: 14px;
        right: 48px;
        font-size: 14px;
    }

    .search-back-icon {
        position: absolute;
        top: 50%;
        right: 10px;
        transform: translateY(-50%);
        font-size: 20px;
        display: none;
        z-index: 1002;
        cursor: pointer;
    }

    .search-active .tag-input-container {
        display: flex;
    }

    .search-active .search-toggle-icon {
        display: none;
    }

    .search-active .search-back-icon {
        display: block;
    }

    .search-active .logo {
        display: none;
    }

    .nav.search-active {
        display: none;
    }

    .videos-header.search-active {
        margin-top: 67px;
    }
}
.featured-videos h2,
.latest-videos h2 {
    width: 90%;
    max-width: 1300px;
    margin: 20px auto 20px auto;
    padding-left: 10px;
}



.all-videos {
    max-width: var(--site-width);
    margin: auto;
    width: 100%;
}

.all-videos h2,
.all-videos h2 {
    width: 100%;
    max-width: var(--site-width);
    margin: 20px auto 20px auto;
    padding-left: 10px;
}

.videos-header {
    max-width: var(--site-width);
    margin: auto;
    display: flex;
    padding: 20px 0 5px 0;
    justify-content: space-between;
    align-items: flex-end;
}


.filters {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    width: 100%;
}

.filters form {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0;
    padding: 10px 12px;
    background: #1d171c;
    border: 1px solid #2d272c;
    border-radius: 14px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);
}

.filters label {
    display: flex;
    align-items: center;
    margin: 0;
}

.filters select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    min-width: 140px;
    padding: 10px 40px 10px 14px;
    background-color: #242526;
    color: #ffffff;
    font-size: 14px;
    font-weight: 600;
    border: 1px solid #353038;
    border-radius: 10px;
    outline: none;
    box-shadow: none;
    cursor: pointer;
    transition: border-color 0.25s ease, color 0.25s ease, background-color 0.25s ease, box-shadow 0.25s ease;
    background-image:
        linear-gradient(45deg, transparent 50%, #9b8f98 50%),
        linear-gradient(135deg, #9b8f98 50%, transparent 50%);
    background-position:
        calc(100% - 18px) calc(50% - 3px),
        calc(100% - 12px) calc(50% - 3px);
    background-size: 6px 6px, 6px 6px;
    background-repeat: no-repeat;
}

.filters select:hover {
    background-color: #2b2c2d;
    border-color: #4a3d48;
    color: #ffffff;
}

.filters select:focus {
    border-color: #F261B8;
    box-shadow: 0 0 0 3px rgba(242, 97, 184, 0.16);
}

@media (max-width: 1100px) {
    .filters {
        justify-content: center;
    }

    .filters form {
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
        padding: 10px;
    }

    .filters select {
        min-width: 160px;
    }
}

@media (max-width: 700px) {
    .filters form {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    .filters label,
    .filters select {
        width: 100%;
    }
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 30px auto;
    padding: 10px;
    gap: 5px;
}

.pagination a {
    display: inline-block;
    padding: 10px 15px;
    text-decoration: none;
    font-size: 14px;
    font-weight: bold;
    color: white;
    background: #3a3b3c;
    border-radius: 5px;
    transition: background 0.3s ease;
}

.pagination a:hover {
    background: #ffcc00;
    color: black;
}

.pagination a.active {
    background: #ffcc00;
    color: black;
    pointer-events: none;
}

.latest-videos {
    display: flex;
    justify-content: space-between;
    width: 90%;
    margin: auto;
    font-size: 18px;
    font-weight: bold;
}

.video-grid {
    width: 100%;
    max-width: var(--site-width);
    margin: auto;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 20px 12px;
}

@media (max-width: 1500px) {
    .video-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (max-width: 1200px) {
    .video-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 900px) {
    .video-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 560px) {
    .video-grid {
        grid-template-columns: 1fr;
    }
}

.video-card {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    background: transparent;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.video-card a {
    display: block;
    width: 100%;
    max-width: 100%;
    text-decoration: none;
    color: white;
}

.thumbnail {
    position: relative;
    display: block;
    width: 100%;
    max-width: 100%;
    aspect-ratio: 16 / 9;
    height: auto;
    overflow: hidden;
    border-radius: 8px;
    background: transparent;
}

.thumbnail img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-duration {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.55); /* półprzezroczyste */
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    padding: 4px 7px;
    border-radius: 4px;
    line-height: 1;
}

.video-card h3 {
    font-size: 16px;
    font-weight: 700;
    margin: 10px 8px 8px 8px;
    text-align: center;
    text-transform: capitalize;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
    line-height: 1.25;
}

.video-details {
    margin: 0 8px 0 8px;
    padding: 0;
    font-weight: 500;
    color: rgba(242, 242, 242, 0.5);
    border: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    text-align: center;
    flex-wrap: wrap;
}

.video-meta-item {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.video-meta-icon {
    font-size: 15px;
    line-height: 1;
    opacity: 0.9;
}

.video-info {
    position: absolute;
    bottom: 8px;
    left: 8px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 3px 8px;
    font-size: 14px;
    border-radius: 3px;
    display: flex;
    gap: 8px;
}


.watch-page {
    color: white;
    padding: 40px 0;
}

.watch-container {
    max-width: var(--site-width);
    margin: auto;
    padding: 20px;
}

.related-videos {
    flex: 1;
    width: 100%;
}

.related-videos h2 {
    font-size: 18px;
    margin-bottom: 10px;
}

.related-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.content-center {
    width: 980px;
    text-align: center;
    margin: 0 auto;
}

.video-player {
    width: 100%;
	aspect-ratio: 16 / 9;
	max-width: 1356px;
    height: auto;
}

@media (max-width: 1385px) {
    .video-player {
    }
}

@media (max-width: 1200px) {
    .video-player {
    }
}

@media (max-width: 951px) {
    .video-player {
    }
}

iframe {
	width:100%;
	height:100%;
}

h1 {
    font-size: 24px;
    margin-top: 20px;
}

.tags {
    margin: 0px 10px 0px 10px;
	padding: 10px;
	border-bottom-width: 1px;
	border-bottom-style: solid;
	border-bottom-color: #242526;
}

.tag {
    display: inline-block;
    background-color: #242526;
    padding: 10px 17px;
    margin: 2px;
    border-radius: 5px;
    color: white;
    text-decoration: none;
}

.tag:hover {
    background-color: #787878;
}

    .tag-list {
        display: flex;
        flex-wrap: wrap;
        gap: 10px;
        padding: 20px;
        max-width: var(--site-width);
        margin: auto;
    }
    .tag-list-tag {
        display: inline-block;
        background-color: #242526;
        padding: 10px 15px;
        border-radius: 5px;
        color: white;
        text-decoration: none;
        font-size: 14px;
    }
    .tag-list-tag:hover {
        background-color: #3a3b3c;
    }



.suggestion {
    padding: 10px;
    cursor: pointer;
    color: white;
    border-bottom: 1px solid #3a3b3c;
}

.suggestion:hover {
    background-color: #3a3b3c;
}

.description {
    margin: 0px 10px 0px 10px;
	padding: 14px;
	border-bottom-width: 1px;
	border-bottom-style: solid;
	border-bottom-color: #242526;
	font-size: 14px;
    color: #d1d1d1;
}

.ad-div {
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: var(--site-width);
	max-height: 80px;
    margin: 2px auto 5px auto;
    width: 100%;
    height: 80px;
    overflow: hidden;
}

footer {
    background-color: #242526;
    padding: 20px 0;
    width: 100%;
    color: #b0b3b8;
    font-size: 13px;
}

.footer-wrapper {
    max-width: var(--site-width);
    margin: 0 auto;
    padding: 0 20px;
}

.footer-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.footer-links {
    display: flex;
    gap: 20px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.footer-links a {
    color: #b0b3b8;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: orange;
}

.footer-copy {
    color: #808080;
    font-size: 12px;
}

.videos-header-centered {
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 20px 0 20px 0;
}

.videos-header-centered h2 {
    width: 100%;
    text-align: center;
    margin: 0;
}

.search-layout {
    width: 100%;
    max-width: var(--site-width);
    margin: 0 auto 30px auto;
    padding: 0 20px; /* odstęp lewo/prawo */
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 30px;
    align-items: start;
}

.search-sidebar {
    width: 100%;
}

.search-sidebar-title {
    color: #ffffff;
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 18px;
    text-align: left;
}

.search-sidebar-desktop {
    position: sticky;
    top: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.search-sidebar-mobile {
    display: none;
}

.search-sidebar-tag {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    text-decoration: none;
    padding: 4px 0;
}

.search-sidebar-tag-name {
    color: #ffffff;
    font-size: 18px;
    font-weight: 500;
    transition: color 0.25s ease;
}

.search-sidebar-tag-count {
    color: #7f7f86;
    font-size: 18px;
    font-weight: 500;
    transition: color 0.25s ease;
}

.search-sidebar-tag:hover .search-sidebar-tag-name {
    color: #F261B8;
}

.search-sidebar-tag.active .search-sidebar-tag-name,
.search-sidebar-tag.active .search-sidebar-tag-count {
    color: #F261B8;
}

.search-main {
    min-width: 0;
}

.search-main .videos-header {
    justify-content: flex-end;
    padding-top: 0;
    padding-bottom: 16px;
}

.search-main .video-grid {
    max-width: 100%;
    margin: 0;
}

.search-grid {
    width: 100%;
    max-width: 100%;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px 12px;
}

@media (max-width: 1500px) {
    .search-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 1100px) {
    .search-layout {
        grid-template-columns: 1fr;
        gap: 18px;
        padding: 0 14px; /* odstęp od lewej i prawej */
    }

    .search-sidebar-title {
        margin-bottom: 12px;
        font-size: 20px;
    }

    .search-sidebar-desktop {
        display: none;
    }

    .search-sidebar-mobile {
        display: flex;
        flex-wrap: wrap;
        gap: 10px 10px;
        align-items: flex-start;
    }

    .search-sidebar-mobile .search-sidebar-tag {
        display: inline-flex;
        width: auto;
        justify-content: center;
        padding: 10px 14px;
        background: #242526;
        border-radius: 999px;
        flex: 0 0 auto;
    }

    .search-sidebar-mobile .search-sidebar-tag-name {
        font-size: 15px;
        line-height: 1;
    }

    .search-sidebar-mobile .search-sidebar-tag-count {
        font-size: 15px;
        line-height: 1;
    }

    .search-main .videos-header {
        justify-content: center;
    }

    .search-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 950px) {
    .header-content,
    nav,
    .footer-wrapper {
        padding-left: 14px;
        padding-right: 14px;
    }
}

@media (max-width: 700px) {
    .search-layout {
        padding: 0 12px;
    }

    .search-sidebar-mobile {
        gap: 8px;
    }

    .search-sidebar-mobile .search-sidebar-tag {
        padding: 9px 12px;
    }

    .search-sidebar-mobile .search-sidebar-tag-name,
    .search-sidebar-mobile .search-sidebar-tag-count {
        font-size: 14px;
    }

    .search-grid {
        grid-template-columns: 1fr;
    }
}

.watch-container {
    max-width: var(--site-width);
    margin: 0 auto;
    padding: 20px;
}

.watch-top {
    display: grid;
    grid-template-columns: minmax(0, 1080px) 300px;
    gap: 24px;
    align-items: start;
    justify-content: center;
}

.watch-player-column {
    width: 100%;
    min-width: 0;
}

.video-player {
    width: 100%;
    max-width: 1080px;
    aspect-ratio: 16 / 9;
    height: auto;
    margin: 0 auto;
}

.video-player iframe {
    width: 100%;
    height: 100%;
    display: block;
}

.watch-sidebar-ads {

}

.watch-side-ad {
}

.watch-ad-horizontal {
	max-height: 90px;
}

.watch-title-row {
    max-width: 1404px;
    margin: 28px auto 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.watch-title {
    margin: 0;
    font-size: 36px;
    line-height: 1.2;
    font-weight: 700;
    color: #fff;
    text-transform: capitalize;
}

.watch-share-button {
    border: 1px solid #3a3238;
    background: #1d171c;
    color: #fff;
    padding: 12px 20px;
    border-radius: 999px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: border-color 0.25s ease, color 0.25s ease, background 0.25s ease;
    white-space: nowrap;
}

.watch-share-button:hover {
    border-color: #F261B8;
    color: #F261B8;
}

.watch-meta {
    max-width: 1404px;
    margin: 12px auto 0 auto;
    padding: 0;
    color: rgba(242, 242, 242, 0.5);
    border: 0;
    display: flex;
    align-items: center;
    gap: 18px;
    font-size: 14px;
    flex-wrap: wrap;
}

.watch-description-box {
    max-width: 1404px;
    margin: 24px auto 0 auto;
}

.watch-description {
    margin: 0 0 24px 0;
    padding: 0;
    border: 0;
    color: #d1d1d1;
    font-size: 15px;
    line-height: 1.7;
}

.watch-description p {
    margin: 0;
}

.watch-tags-block {
    margin-top: 0;
}

.watch-tags-title {
    color: #fff;
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 14px;
}

.watch-tags-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 16px;
}

.watch-tag-link {
    color: #8e8e96;
    text-decoration: none;
    font-size: 17px;
    font-weight: 500;
    transition: color 0.25s ease;
}

.watch-tag-link:hover {
    color: #F261B8;
}

.related-videos {
    width: 100%;
    margin-top: 40px;
}

.related-title {
    text-align: center;
    font-size: 28px;
    font-weight: 700;
    color: #fff;
    margin: 0 0 24px 0;
}

.related-grid-main {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    max-width: var(--site-width);
    margin: 0 auto;
}

@media (max-width: 1700px) {
    .watch-container {
        padding-left: 20px;
        padding-right: 20px;
    }
}

@media (max-width: 1500px) {
    .related-grid-main {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (max-width: 1400px) {
    .watch-top {
        grid-template-columns: 1fr;
    }

    .watch-sidebar-ads {
        width: 100%;
        flex-direction: row;
        justify-content: center;
        flex-wrap: wrap;
    }

    .watch-side-ad {
        width: 300px;
    }
}

@media (max-width: 1200px) {
    .related-grid-main {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .watch-title {
        font-size: 30px;
    }
}

@media (max-width: 900px) {
    .related-grid-main {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .watch-title-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .watch-title {
        font-size: 26px;
    }

    .watch-ad-horizontal {
        max-width: 100%;
    }
}

@media (max-width: 560px) {
    .related-grid-main {
        grid-template-columns: 1fr;
    }

    .watch-container {
        padding: 14px;
    }

    .watch-title {
        font-size: 22px;
    }

    .watch-tags-title {
        font-size: 20px;
    }

    .watch-tag-link {
        font-size: 15px;
    }
}