* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

@font-face {
  font-family: "Manrope";
  src: local("Manrope ExtraBold"), local("Manrope-ExtraBold"),
    url("../fonts/Manrope-ExtraBold.woff2") format("woff2");
  font-weight: bold;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Manrope";
  src: local("Manrope Bold"), local("Manrope-Bold"),
    url("../fonts/Manrope-Bold.woff2") format("woff2");
  font-weight: bold;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Manrope";
  src: local("Manrope Light"), local("Manrope-Light"),
    url("../fonts/Manrope-Light.woff2") format("woff2");
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Manrope";
  src: local("Manrope SemiBold"), local("Manrope-SemiBold"),
    url("../fonts/Manrope-SemiBold.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Manrope";
  src: local("Manrope Medium"), local("Manrope-Medium"),
    url("../fonts/Manrope-Medium.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Manrope";
  src: local("Manrope Regular"), local("Manrope-Regular"),
    url("../fonts/Manrope-Regular.woff2") format("woff2");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Manrope";
  src: local("Manrope ExtraLight"), local("Manrope-ExtraLight"),
    url("../fonts/Manrope-ExtraLight.woff2") format("woff2");
  font-weight: 200;
  font-style: normal;
  font-display: swap;
}

:root {
  --primary: #ff6600;
  /* Orange */
  --secondary: #333333;
  /* Dark gray */
  --background: #ffffff;
  /* Light background */
  --surface: #f8f9fa;
  /* Card background */
  --text-primary: #212529;
  /* Dark text */
  --text-secondary: #44494e;
  /* Gray text */
  --shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
  font-family: "Manrope", sans-serif;
  background-color: var(--background);
  color: var(--text-primary);
  overflow-x: hidden;
  font-size: 15px;
}

h3 {
  font-size: 20px;
  font-weight: 600;
}

input,
textarea,
p {
  font-size: 16px !important;
}

/* Navbar */
.navbar {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  padding: 0.5rem 0;
  position: sticky;
  top: 0;
  width: 100%;
  z-index: 1050;
  transition: var(--transition);
}

.navbar.scrolled {
  background: rgba(255, 255, 255, 0.98);
  box-shadow: var(--shadow);
}

.navbar-brand {
  padding-block: 0 !important;
}

.navbar-brand img {
  height: 36px;
  transition: var(--transition);
}

.nav-link {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-primary);
  margin: 0 1rem;
  position: relative;
  padding: 0.5rem 0.8rem;
  border-radius: 8px;
  transition: var(--transition);
  margin-inline: 0;
}

.nav-link:hover,
.nav-link.active {
  background: rgba(255, 102, 0, 0.15);
  color: var(--primary) !important;
}

.navbar-toggler {
  border: 1px solid var(--primary);
  padding: 0 10px;
  background: transparent;
  transition: var(--transition);
}

.navbar-toggler i {
  color: var(--primary);
}

.navbar-toggler:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(255, 102, 0, 0.25);
}

.navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(33, 37, 41, 0.75)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
  width: 1.5em;
  height: 1.5em;
}

.navbar-collapse {
  padding-top: 0.5rem;
}

/* Hero - Smaller size */
.hero {
  background: linear-gradient(135deg, var(--primary) 0%, #cc5500 100%);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #ffffff;
  padding: 40px 0px;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url('data:image/svg+xml,%3Csvg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 320"%3E%3Cpath fill="%23ffffff" fill-opacity="0.08" d="M0,96L48,112C96,128,192,160,288,160C384,160,480,128,576,112C672,96,768,96,864,112C960,128,1056,160,1152,176C1248,192,1344,192,1392,192L1440,192L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z"%3E%3C/path%3E%3C/svg%3E')
    bottom/cover no-repeat;
}

.hero-content {
  position: relative;
  max-width: 850px;
  padding: 0 2rem;
  width: 100%;
}

.hero-title {
  font-size: 2.4rem;
  font-weight: 800;
  margin-bottom: 1rem;
  line-height: 1.1;
  text-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.hero-subtitle {
  font-size: 1rem;
  font-weight: 300;
  opacity: 0.9;
}

.search-form {
  max-width: 650px;
  margin: 0 auto;
  position: relative;
}

.search-input {
  border-radius: 999px;
  padding: 0.9rem 2.5rem 0.9rem 1.5rem;
  border: none;
  font-size: 16px;
  box-shadow: var(--shadow);
  transition: var(--transition);
  background: rgba(255, 255, 255, 0.95);
  width: 100%;
}

.form-control:focus {
  box-shadow: 0 0 0 4px rgba(255, 102, 0, 0.25);
  outline: none;
  border-color: rgba(255, 102, 0, 0.25);
}

.search-btn {
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 1.1rem;
  transition: var(--transition);
}

.search-btn:hover {
  color: var(--primary);
}

/* Suggestions Styles */
.suggestions {
  position: absolute;
  width: 100%;
  background: var(--background);
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 8px;
  box-shadow: var(--shadow);
  max-height: 300px;
  overflow-x: hidden;
  overflow-y: auto;
  z-index: 1000;
  display: none;
  margin-top: 0.5rem;
}

.suggestions .dropdown-item {
  padding: 0.75rem 1rem;
  font-size: 0.95rem;
  color: var(--text-primary);
  transition: var(--transition);
  white-space: wrap !important;
}
.suggestions .dropdown-item span {
  display: -webkit-box !important;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.suggestions .dropdown-item:hover {
  background: rgba(255, 102, 0, 0.15);
  color: var(--primary);
}

/* Filters */
.filters {
  background: var(--surface);
  padding: 1rem 0;
  z-index: 1000;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.filters .d-flex {
  overflow-x: auto;
}

.filter-chip {
  background: rgba(0, 0, 0, 0.05);
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 999px;
  padding: 0.5rem 1.1rem;
  margin: 0.3rem 0.4rem 0.3rem 0;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
  flex-shrink: 0;
  transition: var(--transition);
}

.filter-chip:hover,
.filter-chip.active {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
  box-shadow: 0 2px 8px rgba(255, 102, 0, 0.3);
  transform: translateY(-2px);
}

/* Sections */
.section {
  padding: 3rem 0;
  padding-bottom: 1.5rem !important;
}

.section-title {
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 0;
  position: relative;
  display: inline-block;
}

/* Video Grid */
.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

.video-card {
  background: var(--surface);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: var(--transition);
  position: relative;
  cursor: pointer;
}

.video-card a {
  color: inherit !important;
  text-decoration: inherit !important;
}

.video-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

.thumbnail-container {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
}

.thumbnail {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition);
}

.video-card:hover .thumbnail {
  transform: scale(1.08);
}

.video-duration {
  position: absolute;
  bottom: 0.5rem;
  right: 0.5rem;
  background: rgba(0, 0, 0, 0.7);
  color: #ffffff;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 500;
}

.video-details {
  padding: 1rem;
}

.video-title {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.video-meta {
  font-size: 0.8rem;
  color: var(--text-secondary);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.meta-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.8rem;
}

.channel-name {
  color: var(--text-primary);
  font-weight: 500;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.published-at {
  color: var(--text-primary);
  white-space: nowrap;
}

.meta-stats {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  color: var(--text-primary);
  margin-top: 0.3rem;
}

.meta-stats span {
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

/* Ad Zone */
.ad-zone {
  background: rgba(248, 249, 250, 0.5);
  padding: 1rem 0;
  text-align: center;
  border-top: 1px solid rgba(0, 0, 0, 0.05);
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.ad-placeholder {
  background: var(--surface);
  border-radius: 12px;
  padding: 2rem;
  box-shadow: var(--shadow);
  max-width: 900px;
  margin: 0 auto;
  font-size: 1rem;
  color: var(--text-secondary);
  border: 1px solid rgba(0, 0, 0, 0.05);
}

/* Footer */
footer {
  background: #f8f9fa;
  color: var(--text-primary);
  padding: 1rem 1.5rem;
  border-top: 1px solid rgba(0, 0, 0, 0.05);
}

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

.footer-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.newsletter-form {
  max-width: 400px;
  width: 100%;
  display: flex;
  margin-bottom: 1.5rem;
}

.newsletter-input {
  flex: 1;
  border-radius: 8px 0 0 8px;
  padding: 0.8rem 1.25rem;
  border: none;
  font-size: 0.9rem;
  background: rgba(0, 0, 0, 0.08);
  color: var(--text-primary);
}

.newsletter-input:focus {
  outline: none;
  background: rgba(0, 0, 0, 0.12);
}

.newsletter-btn {
  border-radius: 0 8px 8px 0;
  background: var(--primary);
  border: none;
  padding: 0.8rem 1.5rem;
  color: #ffffff;
  font-weight: 600;
  transition: var(--transition);
}

.newsletter-btn:hover {
  background: #cc5500;
  color: #fff;
}

.footer-links {
  display: flex;
  column-gap: 1.25rem;
  row-gap: 0.5rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.footer-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.9rem;
  transition: var(--transition);
  padding: 0.5rem;
  border-radius: 6px;
}

.footer-link.active,
.footer-link:hover {
  color: var(--text-primary);
  background: rgba(0, 0, 0, 0.08);
}

.footer-disclaimer {
  font-size: 0.8rem !important;
  opacity: 0.7;
  margin-bottom: 0.5rem !important;
}

.footer-copyright {
  opacity: 0.7;
  margin-bottom: 0 !important;
}

/* dropdown custoem */

.country-flag {
  width: 20px;
  height: 15px;
  margin-right: 8px;
}

/* Custom styling to show icon on right */
.dropdown-toggle::after {
  display: none !important;
  /* hide default caret */
}

.custom-selectbox {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-width: 180px;
  background: rgba(255, 102, 0, 0.15) !important;
  border: 1px solid var(--primary) !important;
}

.custom-selectbox:hover,
.custom-selectbox:focus-visible,
.custom-selectbox:active {
  background: rgba(255, 102, 0, 0.15) !important;
  border: 1px solid var(--primary) !important;
}

.dropdown-item.active,
.dropdown-item:active {
  background-color: var(--primary);
}

.custom-dropmenu {
  right: 0 !important;
  left: unset !important;
  display: grid !important;
  visibility: hidden;
  opacity: 0;
  transform: translateY(10px) scale(0.95);
  transition: opacity 0.25s ease, transform 0.25s ease;
  transform-origin: top right;
  width: 100%;
  max-height: 210px;
}

.custom-dropmenu.show {
  visibility: visible;
  opacity: 1;
  transform: translateY(0) scale(1);
}

button.search-openbtn {
  background: rgba(255, 102, 0, 0.15) !important;
  border: 1px solid var(--primary) !important;
  height: 100%;
  width: 100%;
  padding: 5px 10px;
}

button.search-openbtn i {
  color: var(--primary);
}

/* 404 Content */
.error-container {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 208px);
  padding: 1rem 1rem;
}

.error-content {
  text-align: center;
  max-width: 740px;
  padding: 3rem 2rem;
}

.error-code {
  font-size: 8rem;
  font-weight: 800;
  line-height: 1;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, var(--primary) 0%, #cc5500 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  color: transparent;
}

.error-title {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.error-message {
  font-size: 1.1rem;
  color: var(--text-secondary);
  margin-bottom: 2rem;
  line-height: 1.6;
}

.error-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.btn-primary {
  background: var(--primary);
  border: none;
  padding: 0.8rem 1.5rem;
  border-radius: 8px;
  color: white;
  font-weight: 600;
  transition: var(--transition);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-primary:hover {
  background: #cc5500;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(255, 102, 0, 0.3);
  color: white;
}

.btn-outline {
  background: transparent;
  border: 2px solid var(--primary);
  padding: 0.8rem 1.5rem;
  border-radius: 8px;
  color: var(--primary);
  font-weight: 600;
  transition: var(--transition);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-outline:hover {
  background: rgba(255, 102, 0, 0.1);
  transform: translateY(-2px);
}

.textareas {
  min-height: 120px !important;
  max-height: 280px;
}

/* Skeleton loading styles */
.video-card.card-loading {
  pointer-events: none;
  opacity: 0.7;
}

.video-card.card-loading .thumbnail-container,
.video-card.card-loading .video-title,
.video-card.card-loading .channel-name,
.video-card.card-loading .published-at,
.video-card.card-loading .meta-stats span,
.video-card.card-loading .video-duration {
  background: linear-gradient(100deg, #d8d7d7 30%, #f5f5f5 50%, #e0e0e0 70%);
  background-size: 200% 100%;
  animation: shimmer 2.5s linear infinite;
  color: transparent;
  /* Hide text content */
}

.video-card.card-loading .thumbnail {
  opacity: 0;
  /* Hide the actual thumbnail image during loading */
}

.video-card.card-loading .thumbnail-container {
  border-radius: 4px 4px 0 0;
  /* No bottom radius */
  aspect-ratio: 16 / 9;
  width: 100%;
  position: relative;
}

.video-card.card-loading .video-title {
  border-radius: 4px;
  width: 80%;
  height: 1.5em;
  margin-bottom: 0.5em;
}

.video-card.card-loading .channel-name,
.video-card.card-loading .published-at {
  border-radius: 4px;
  width: 40%;
  height: 1em;
  display: inline-block;
}

.video-card.card-loading .meta-stats span {
  border-radius: 4px;
  width: 20%;
  height: 1em;
  margin-right: 10px;
}

.video-card.card-loading .video-duration {
  border-radius: 4px;
  width: 40px;
  height: 16px;
  position: absolute;
  bottom: 8px;
  right: 8px;
}

@keyframes shimmer {
  0% {
    background-position-x: 200%;
  }

  100% {
    background-position-x: 0%;
  }
}

.page-select {
  cursor: pointer;
  height: 38px !important;
  border-radius: 0 !important;
}
.form-select:focus {
  box-shadow: none !important;
  border-color: var(--primary) !important;
}
.page-link:focus,
.page-link:hover {
  background-color: rgba(255, 102, 0, 0.15) !important;
}

.page-link {
  color: var(--primary) !important;
}

.topyt-pagination .page-item:first-child .page-link {
  border-right: 0 !important;
}
.topyt-pagination .page-item:last-child .page-link {
  border-left: 0 !important;
}

.page-item:not(:first-child) .page-link {
  margin-left: 0 !important;
}

.page-link:focus {
  box-shadow: none !important;
}

.pagination-dropdown .btn {
  border: var(--bs-pagination-border-width) solid
    var(--bs-pagination-border-color) !important;
  border-radius: 0 !important;
  width: 120px;
}

.pagination-dropdown ul.dropdown-menu {
  min-width: auto;
  max-width: 100%;
  width: 100%;
  border-radius: 0 !important;
  text-align: center;
  max-height: 250px;
  overflow: auto;
}

.pagination-dropdown ul.dropdown-menu li {
  cursor: pointer;
  padding-block: 0.25rem;
}

.pagination-dropdown ul.dropdown-menu li:active,
.pagination-dropdown ul.dropdown-menu li:hover {
  background: #e9ebec;
}

.pagination-dropdown .dropdown-menu.show {
  display: grid;
  gap: 8px;
}

/* Media Queries */

@media (min-width: 992px) {
  .navbar .search-form {
    width: 200px;
    transition: width 0.5s linear;
  }

  .navbar .search-form:focus-within {
    width: 100%;
  }

  .navbar .menu {
    width: 100%;
  }
}

@media (max-width: 992px) {
  .navbar-collapse {
    background: var(--background);
    border-top: none;
    padding: 1rem;
    margin-top: 10px;
    border-radius: 8px;
  }

  .country-flag {
    margin: 0;
    width: 25px;
  }

  .menu .custom-selectbox span > span {
    display: none;
  }

  .menu .custom-selectbox span {
    width: fit-content;
    height: fit-content;
  }

  .menu .custom-selectbox > i {
    display: none;
  }

  .hero-title {
    font-size: 1.8rem;
  }

  .custom-selectbox {
    min-width: 20px;
  }

  .hero-subtitle {
    font-size: 0.95rem;
  }

  .section-title {
    font-size: 1.6rem;
  }

  .video-grid {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  }
}

@media (max-width: 767px) {
  .navbar-brand img {
    height: 7.5vw;
    max-height: 35px;
    min-height: 30px;
  }

  .menu .search-form {
    max-width: 100%;
    position: absolute;
    left: 0;
    top: 100%;
    z-index: 2;
    width: 100%;
  }

  .menu .search-form .search-input {
    border-radius: 0;
    width: 100%;
    padding-block: 16px !important;
  }

  .menu .search-form .search-input:focus {
    box-shadow: none;
    outline: none;
  }

  .hero-title {
    font-size: 1.8rem;
  }

  .filter-chip {
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
  }

  .nav-link {
    font-size: 0.85rem;
    margin: 0 0.5rem;
    padding: 0.4rem 0.6rem;
  }

  .menu .suggestions {
    border: 0;
    border-radius: 0;
    box-shadow: none;
    margin-top: 0;
  }

  .footer-links {
    column-gap: 0.8rem;
  }

  .custom-selectbox {
    min-width: auto;
  }

  .section-header button#countryDropdown {
    width: 100%;
  }

  .section-header .dropdown {
    flex: 1;
  }
}

#main-card-section {
  scroll-margin-top: 48px;
}
