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

* {
    box-sizing: border-box;
}

body {
    font-family: 'Nunito', sans-serif;
    background: #18191A;
    color: #ffffff;
    margin: 0;
    padding: 0;
}

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

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1316px;
    margin: 2px auto 5px auto;
    width: 100%;
}

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

.logo img {
    max-height: 82px;
	max-width:300px;
}

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

.search-form {
	margin: 0px;
}

.tag-input-container {
	position: relative;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
	height: 60px;
    padding: 10px;
    background: #18191A;
	width: 500px;
	margin: 20px 0 10px 0;
}

#search-input {
    background: transparent;
    border: none;
    color: white;
    outline: none;
    font-size: 14px;
    flex: 1;
    padding: 5px;
}

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

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

nav {
    display: flex;
    justify-content: left;
    width: 100%;
    max-width: 1316px;
    margin: auto;
}

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

nav ul li {
    display: flex;
}

nav ul li a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 165px;
    height: 39px;
    text-transform: uppercase;
    font-size: 12px;
    font-weight: bold;
    text-decoration: none;
    color: white;
    background: transparent;
    transition: background 0.3s ease, border-color 0.3s ease;
    position: relative;
}

nav ul li a:hover {
    background: rgba(255, 255, 255, 0.2);
}

nav ul li a.active::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: orange;
}

@media (max-width: 768px) {
    .nav {
        display: flex;
        justify-content: center;
        width: 100%;
    }

    nav {
        width: 100%;
        display: flex;
        justify-content: center;
    }

    nav ul {
        flex-direction: column;
        align-items: center;
        justify-content: center;
        padding: 0;
        margin: 0 auto;
    }

    nav ul li {
        width: 100%;
        text-align: center;
    }

    nav ul li a {
        width: 140px;
        height: 35px;
        font-size: 14px;
        margin: 5px auto;
    }
}

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

@media (max-width: 950px) {
    .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: #18191A;
        z-index: 1000;
        padding: 10px;
        height: 60px;
        width: 100vw;
        box-sizing: border-box;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        margin: 0;
    }

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

.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: 1316px;
    margin: auto;
    width: 100%;
}

.all-videos h2,
.all-videos h2 {
    width: 90%;
    max-width: 1300px;
    margin: 20px auto 20px auto;
    padding-left: 10px;
}

.videos-header {
        max-width: 1316px;
        margin: auto;
        display: flex;
        justify-content: space-between;
        align-items: flex-end;
    }
.filters {
    display: flex;
    gap: 1px;
    align-items: flex-end;
    height: 29px;
    padding: 1px;
    border: none;
    box-shadow: none;
}

.filters form {
    display: flex;
    gap: 1px;
    height: 29px;
    margin-bottom: 0px;
    background: #242526;
    border: none;
    box-shadow: none;
}

.filters select {
    padding: 5px;
    background: #242526;
    color: #b0b3b8;
    font-weight: 500;
    outline: none;
    border: none;
    box-shadow: none;
    transition: background 0.3s ease, color 0.3s ease;
}

.filters select:hover, 
.filters select:focus {
    background: #3a3b3c;
    color: #ffffff;
    border: none;
    box-shadow: none;
}

.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%;
    margin: auto;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    max-width: 1316px;
    gap: 8px;
}

@media (max-width: 1385px) {
    .video-grid {
        grid-template-columns: repeat(3, 1fr);
		max-width: 1100px;
		margin: auto;
    }
}

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

@media (max-width: 951px) {
    .video-grid {
        grid-template-columns: repeat(1, 1fr);
		max-width: 400px;
		margin: auto;
    }
}

.video-card {
    background: #1E1E1F;
    display: flex;
    flex-direction: column;
    align-items: left;
    text-align: left;
    min-height: 250px;
}

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

.thumbnail {
    position: relative;
    width: 100%;
	height: 180px;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: 8px;
    display: flex;
    justify-content: center;
    align-items: center;
}

@media (max-width: 1385px) {
    .thumbnail {
        height: 203px;
    }
}

@media (max-width: 1200px) {
    .thumbnail {
       height: 250px;
    }
}

@media (max-width: 951px) {
    .thumbnail {
		height: 225px;
		max-width:400px;
    }
}

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

.video-duration {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    font-size: 14px;
    font-weight: bold;
    padding: 5px 8px;
    border-radius: 3px;
}

.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;
}

.video-card h3 {
    font-size: 14px;
    margin: 10px 5px 10px 5px;
    min-height: 40px;
	font-weight: 600;
    display: flex;
    align-items: left;
    justify-content: left;
    text-align: left;
}

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

.watch-container {
    max-width: 1316px;
    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;
}

.video-card {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.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;
}

.video-details {
    font-size: 14px;
    margin: 10px 10px 0px 10px;
	padding: 10px;
	font-weight: 500;
	color: #929293;
	border-bottom-width: 1px;
	border-bottom-style: solid;
	border-bottom-color: #242526;
}

.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: 1316px;
        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;
    }

.tag-suggestions {
  	position: absolute;
    top: 80px;
    left: 0;
    background: #242526;
    width: 100%;
    z-index: 1001;
    max-height: 150px;
    overflow-y: auto;
    border-top: none;
}

.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: 1316px;
	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: 1316px;
    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;
}