/* 
Elementor theme
*/
.site.grid-container {
  max-width: 100vw;
}

.separate-containers .inside-article {
  color: transparent !important;
  background-color: transparent !important;
  border: none !important;
  border-radius: 0 !important;
  color: var(--contrast) !important;
  padding: 40px 0 !important;
}

.separate-containers .inside-article h1 {
  text-align: center !important;
}

.separate-containers .inside-article .elementor-element-40522d4 {
  padding: 0 !important;
}

/* 
``````````````````````````````````````````````
Root Container
``````````````````````````````````````````````
*/
.root-container {
  max-width: 1300px;
  width: 100%;
  margin: 0 auto;
}

/* 
``````````````````````````````````````````````
Heading
``````````````````````````````````````````````
*/

.youtube-music-tool-heading {
  display: flex;
  flex-direction: column;
  gap: 20px;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
}

.youtube-music-tool-heading .page-heading {
  font-size: 45px;
  font-weight: 600;
  line-height: 50px;
  color: var(--e-global-color-text);
  margin: 0;
}

.youtube-music-tool-heading .heading-tag-container {
  background-color: var(--e-global-color-primary);
  padding: 4px 10px 4px 10px;
  border-radius: 5px 5px 5px 5px;
}

.youtube-music-tool-heading .heading-tag-container .heading-tag {
  font-size: 15px;
  font-weight: 600;
  color: #ffffff;
  margin: 0;
}

.youtube-music-tool-heading .heading-description {
  max-width: 612px;
  text-align: center;
  margin-bottom: 1.5em;
  color: var(--e-global-color-text);
}

/* 
``````````````````````````````````````````````
Music Tool Container
``````````````````````````````````````````````
*/
.youtube-music-tool-container {
  background: #fefefe;
  border-radius: 10px;
  box-shadow: rgba(0, 0, 0, 0.1) 0 5px 25px, rgba(0, 0, 0, 0.02) 0 5px 10px;
  width: 100%;
  margin-bottom: 100px;
  color: var(--body-bgl-color-text);
  line-height: 1.6;
}

.dark .youtube-music-tool-container {
  background: var(--card-alt);
}

.youtube-music-tool {
  background: transparent;
  border-radius: 10px;
  padding: 20px;
  width: 100%;
  /* overflow: hidden; */
}

/* Search form layout */
.search-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-bottom: 30px;
  padding: 24px;
  position: relative;
  z-index: 2;
  background: rgba(248, 249, 250, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: 10px;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
}

.dark .search-form {
  background-color: var(--card-color);
  background: var(--card-color);
}

.search-form .form-container {
  margin-bottom: 30px;
  min-height: 220px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.search-form .form-container .main-content {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.search-form .tool-row {
  justify-content: space-between;
}

.search-section {
  display: flex;
  gap: 15px;
  align-items: center;
  width: 100%;
  margin-bottom: 20px;
  padding: 0 20px;
}

.search-section input {
  flex: 1;
  padding: 14px 24px;
  background-color: #f9f8ff;
  margin: 0 !important;
  transition: all 0.3s ease;
  width: 100%;
}

.dark .search-section input {
  background-color: var(--card-color);
}

.search-section > div {
  align-self: flex-start !important;
}

.search-section button,
.apply-channels {
  background: var(--e-global-color-primary);
  line-height: normal;
  color: white;
  border: none;
  font-weight: 600;
  transition: all 0.3s ease;
  cursor: pointer;
}

.search-section button:hover,
.apply-channels:hover {
  background: var(--contrast);
  transform: translateY(-2px);
}

.dark .search-section button:hover,
.dark .apply-channels:hover {
  background: var(--card-alt);
  transform: translateY(-2px);
}

.video-channels-btn {
  margin-top: 20px;
  width: 100%;
  display: flex;
}

.video-channels-btn .apply-channels {
  margin: 0 auto;
}

.search-form .fav-tool {
  position: absolute;
  bottom: 11px;
  right: 10px;
  z-index: 2;
}

.search-form .fav-tool .saved-favs {
  display: flex;
  position: relative;
  align-self: flex-end;
}

/* bottom filters */
.bottom-filters {
  display: flex;
  flex-direction: column;
  gap: 10px;
  background-color: var(--card-color);
  border-radius: 10px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  padding: 15px;
  max-width: 100%;
}

.bottom-filters .bottom-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.bottom-filters i {
  font-size: 20px;
}

.bottom-filters h4 {
  font-size: 15px;
  font-weight: 600;
  color: var(--e-global-color-text);
  border-bottom: 1px dotted var(--e-global-color-primary);
  margin: 0;
  padding: 0;
}

.sort-by {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
}

.filter-group {
  display: flex;
  flex-direction: column;
}

.filter-group select {
  margin-bottom: 0 !important;
}

.filter-group.channels {
  position: relative;
}

.sort-filter {
  width: fit-content;
}

.open-channels-btn,
.sort-filter {
  display: flex;
  align-items: center;
  gap: 5px;
  height: 50px;
  padding: 12px 24px;
  background-color: var(--e-global-color-primary);
  color: white;
  border: none;
  border-radius: 3px;
  font-weight: 500;
  font-size: 15px;
  text-align: center;
  width: fit-content;
  cursor: pointer;
  transition: all 0.3s ease;
}

.dark select.sort-filter {
  background-color: var(--e-global-color-primary) !important;
}

.dark .open-channels-btn:hover,
.dark .open-channels-btn:focus,
.dark .open-channels-btn:active,
.dark .sort-filter:hover,
.dark .sort-filter:focus,
.dark .sort-filter:active {
  background-color: var(--card-color) !important;
}

/* Channels Modal container */
.channels-modal {
  display: none;
  position: absolute;
  z-index: 1000;
  left: 0;
  top: 60px;
  min-width: fit-content;
  width: 100%;
  align-items: center;
  justify-content: center;
  background-color: #fff;
}

/* Channels Modal content */
.channels-modal-content {
  background-color: var(--card-color);
  padding: 20px;
  width: 350px;
  max-width: 90%;
  border-radius: 12px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  text-align: center;
  z-index: 1005;
}

/* Channels Modal Close button */
.close-channels-modal {
  float: right;
  font-size: 24px;
  cursor: pointer;
}

.close-channels-modal:hover {
  color: red;
}

/* Apply button */
.apply-channels {
  display: block;
  width: 100%;
  margin-top: 10px;
}

.video-channels.channel-radio-group {
  width: 100%;
}

.channel-radio-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  max-height: 200px;
  overflow-y: auto;
  padding: 10px;
  background-color: var(--card-color);
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.channel-radio-label {
  position: relative;
  display: flex;
  align-items: center;
  cursor: pointer;
  width: 100%;
  user-select: none;
  margin: 0;
  padding: 5px 10px;
  border-radius: 20px;
  background-color: var(--card-alt);
  transition: all 0.3s ease;
}

.channel-radio-label input {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  height: 0;
  width: 0;
}

.channel-radio-custom {
  position: absolute;
  top: 50%;
  left: 8px;
  transform: translateY(-50%);
  height: 16px;
  width: 16px;
  background-color: transparent;
  border-radius: 50%;
  border: 2px solid var(--e-global-color-primary);
  transition: all 0.3s ease;
}

.channel-radio-label input:checked ~ .channel-radio-custom {
  background-color: var(--e-global-color-primary);
}

.channel-name {
  margin-left: 25px;
  font-size: 14px;
  color: var(--e-global-color-text);
  transition: color 0.3s ease;
}

.channel-radio-label input:checked ~ .channel-name {
  font-weight: bold;
  color: var(--e-global-color-primary);
}

.channel-radio-label:hover,
.channel-radio-label:active,
.channel-radio-label:focus {
  background-color: rgb(var(--taccent) / 0.13);
}

.channel-radio-label:hover .channel-name,
.channel-radio-label:focus .channel-name,
.channel-radio-label:active .channel-name {
  color: #fff !important;
}

.channel-radio-label:hover input:checked ~ .channel-radio-custom,
.channel-radio-label:focus input:checked ~ .channel-radio-custom,
.channel-radio-label:active input:checked ~ .channel-radio-custom {
  background-color: #fff;
}

/* Filter toggle */
.filter-toggle-container {
  --toggle-width: min(500px, 90vw);
  --option-width: calc((var(--toggle-width) - 10px) / 3);
  --toggle-height: 40px;
  --border-width: 2px;
  --border-radius: 3px;
  --transition-speed: 0.3s;
  --padding: 3px;

  display: flex;
  align-items: center;
  position: relative;
  height: var(--toggle-height);
  padding: var(--padding);
  border-radius: var(--border-radius);
  border: var(--border-width) solid var(--e-global-color-primary);
  width: var(--toggle-width);
  gap: 0;
  align-self: center;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(4px);
}

/* Label styles */
.toggle-label {
  color: var(--e-global-color-text);
  font-size: clamp(12px, 3.5vw, 15px);
  font-weight: 600;
  width: var(--option-width);
  text-align: center;
  position: relative;
  z-index: 2;
  margin: 0;
  padding: 2px 0;
  cursor: pointer;
  transition: color var(--transition-speed) ease;
  user-select: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Input styles */
.filter-toggle-container input {
  position: absolute;
  z-index: 3;
  opacity: 0;
  cursor: pointer;
  height: var(--toggle-height);
  margin: 0;
  width: var(--option-width);
}

/* Input positioning */
.filter-toggle-container input[value="genre"] {
  left: var(--padding);
}

.filter-toggle-container input[value="mood"] {
  left: calc(var(--option-width) + var(--padding));
}

.filter-toggle-container input[value="keyword"] {
  left: calc(var(--option-width) * 2 + var(--padding));
}

/* Sliding indicator */
.filter-toggle-container span {
  height: calc(var(--toggle-height) - (var(--padding) * 2));
  width: var(--option-width);
  border-radius: var(--border-radius);
  background: var(--e-global-color-primary);
  position: absolute;
  left: 1px;
  transition: all var(--transition-speed) cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Slide animations */
input[value="genre"]:checked ~ span {
  left: calc(var(--padding) - 2px);
}

input[value="mood"]:checked ~ span {
  left: calc(var(--option-width) + var(--padding));
}

input[value="keyword"]:checked ~ span {
  left: calc(var(--option-width) * 2 + var(--padding) + 2px);
}

/* Selected label styles */
input:checked + .toggle-label {
  color: #fff;
}

/* Hover effects */
.toggle-label:hover {
  opacity: 0.9;
}

/* Focus styles for accessibility */
.filter-toggle-container input:focus-visible + .toggle-label {
  outline: 2px solid var(--e-global-color-primary);
  outline-offset: 2px;
}

/* Genre and Mood Labels */
#genre-labels,
#mood-labels {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  justify-content: center;
}

.genre-label,
.mood-label {
  background-color: var(--card-color);
  color: var(--e-global-color-text);
  padding: 12px 24px;
  border-radius: 3px;
  cursor: pointer;
  transition: all 0.3sease;
  font-size: 14px;
  border: 1px solid var(--e-global-color-primary);
}

.genre-label.active,
.mood-label.active {
  background-color: var(--e-global-color-primary);
  color: #fff;
}

.genre-label:hover,
.mood-label:hover {
  background-color: rgb(var(--taccent) / 0.13);
}

.error-message {
  background-color: #ffebee;
  color: #c62828;
  padding: 10px;
  border-radius: 5px;
  margin-bottom: 20px;
  text-align: center;
  font-weight: bold;
}

/* 
```````````````````````````````````````````````````````````````
 Video Grid Layout 
```````````````````````````````````````````````````````````````
*/

/* Video Grid */
.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
  padding: 20px 0;
  min-height: 400px;
}

/* Video Card Container */
.video-card {
  position: relative;
  background: var(--card-alt);
  color: var(--e-global-color-text);
  border-radius: 16px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

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

.video-thumbnail {
  position: relative;
  width: 100%;
  padding-top: 56.25%;
  overflow: hidden;
  border-radius: 20px 20px 0 0;
}

.video-thumbnail img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

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

.video-info {
  padding: 16px;
}

.video-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 8px;
  line-height: 1.4;
}

.video-author {
  font-size: 14px;
}

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

.video-actions {
  position: absolute;
  top: 8px;
  display: flex;
  gap: 8px;
  width: 100%;
  justify-content: space-between;
  padding: 0 10px;
}

.video-metrics {
  display: flex;
  gap: 12px;
  margin-top: 8px;
  font-size: 13px;
  flex-wrap: wrap;
}

.video-metrics .metric {
  display: flex;
  align-items: center;
  gap: 4px;
}

.video-metrics .metric i {
  font-size: 18px;
  color: var(--e-global-color-primary) !important;
  opacity: 0.8;
}

/* Tooltip Container */
.tooltip-container {
  position: relative;
}

/* Tooltip styles */
.metric-value[data-tooltip] {
  position: relative;
  display: flex;
  align-items: center;
  gap: 5px;
}

.metric-value[data-tooltip]::before,
.metric-value[data-tooltip]::after {
  position: absolute;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease;
  pointer-events: none;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(10px);
}

/* Tooltip bubble */
.metric-value[data-tooltip]::before {
  content: attr(data-tooltip);
  background: var(--e-global-color-primary) !important;
  color: white;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  margin-bottom: 10px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  z-index: 10;
}

/* Tooltip arrow */
.metric-value[data-tooltip]::after {
  content: "";
  border: 6px solid transparent;
  border-top-color: var(--e-global-color-primary) !important;
  margin-bottom: -2px;
  z-index: 10;
}

/* Show tooltip on hover */
.metric-value[data-tooltip]:hover::before,
.metric-value[data-tooltip]:hover::after {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

/* Tooltip positioning */
.video-metrics {
  position: relative;
  z-index: 1;
}

/* Video card youtube new tab button */
.youtube-button {
  background: rgba(0, 0, 0, 0.3);
  border: none;
  border-radius: 50%;
  width: 35px;
  height: 35px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 0.2s;
}

.youtube-button:hover {
  background: rgba(0, 0, 0, 0.5) !important;
}

.save-button i,
.youtube-button i {
  font-size: 20px;
  color: var(--e-global-color-primary);
}

/* UI pagination */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 20px;
  flex-wrap: wrap;
}

.pagination button {
  background-color: var(--e-global-color-primary);
  color: var(--background-color);
  border: none;
  padding: 10px 15px;
  margin: 0 5px;
  cursor: pointer;
  border-radius: 3px;
  transition: background-color 0.3s ease, opacity 0.3s ease;
}

.pagination button:hover:not(:disabled) {
  background-color: rgb(var(--taccent) / 0.13);
}

.pagination button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.pagination .page-numbers {
  display: flex;
  list-style-type: none;
  margin: 0 10px;
  padding: 0;
}

.pagination .page-numbers li {
  margin: 0 5px;
}

.pagination .page-numbers li a {
  color: var(--e-global-color-text);
  text-decoration: none;
  padding: 5px 10px;
  border-radius: 5px;
  transition: background-color 0.3s ease;
}

.pagination .page-numbers li a.active,
.pagination .page-numbers li a:hover {
  background-color: var(--e-global-color-primary);
  color: var(--e-global-color-text);
}

/* Save Button Styles */
.save-button {
  background: rgba(0, 0, 0, 0.3);
  border: none;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  padding: 0 !important;
}

.save-button:hover {
  background: rgba(0, 0, 0, 0.5) !important;
}

.dark .save-button:hover {
  background: rgba(0, 0, 0, 0.5) !important;
}

/* Saved Videos Section */
#saved-videos-section {
  width: 100%;
  margin: 0 auto;
  padding: 20px;
  background-color: #fefefe;
  box-shadow: rgba(0, 0, 0, 0.1) 0 5px 25px, rgba(0, 0, 0, 0.02) 0 5px 10px;
  display: flex;
  flex-direction: column;
  border-radius: 10px;
}

.dark #saved-videos-section {
  background: var(--card-alt);
}

#saved-videos-section .saved-videos-header {
  padding: 20px;
  border-bottom: 1px solid var(--card-color);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
}

#saved-videos-section .saved-videos-header h3 {
  margin-bottom: 0 !important;
  text-align: center;
}

#saved-videos-section .saved-videos-header i {
  font-size: 30px;
}

#saved-videos-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 15px;
  width: 100%;
  padding: 20px;
}

.saved-video-card {
  display: flex;
  gap: 12px;
  padding: 30px 10px;
  cursor: pointer;
  color: var(--e-global-color-text);
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  transition: background-color 0.2s ease;
}

.saved-video-card:hover {
  background-color: rgb(var(--taccent) / 0.13);
}

.saved-video-card i {
  font-size: 20px;
}

.saved-thumbnail {
  position: relative;
  width: 120px;
  height: 67px;
}

.saved-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 10px !important;
}

.saved-info {
  flex: 1;
  min-width: 0;
}

.saved-title {
  font-weight: 500;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.saved-author {
  font-size: 0.9em;
}

.saved-meta {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.saved-date {
  font-size: 16px;
}

#saved-toggle-btn.has-new::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 8px;
  height: 8px;
  background-color: #ff4081;
  border-radius: 50%;
}

.notice-content {
  background: var(--card-color);
  padding: 24px;
  border-radius: 8px;
  text-align: center;
  max-width: 400px;
  width: 90%;
}

.notice-content button {
  background: var(--e-global-color-primary);
  color: white;
  border: none;
  padding: 10px 24px;
  border-radius: 4px;
  cursor: pointer;
  margin-top: 16px;
  transition: color 0.3s ease;
}

.notice-content button:hover {
  background: var(--body-bgl-color-text);
  color: #fff;
}

/* Save Toast */
.save-toast {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: rgb(var(--taccent) / 0.13);
  color: var(--e-global-color-text);
  padding: 12px 24px;
  border-radius: 4px;
  transition: transform 0.3s ease;
  z-index: 999999999;
}

.save-toast.show {
  transform: translateX(-50%) translateY(0);
}

.save-toast.error {
  background-color: #dc3545;
}

/* Modal window styles */
.modal {
  display: none;
  position: fixed;
  z-index: 999999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(5px);
}

.modal-content {
  background-color: #fefefe;
  color: var(--contrast);
  margin: 5% auto;
  padding: 20px 40px;
  border-radius: 10px;
  width: 100%;
  max-width: 900px;
  max-height: 85vh;
  overflow-y: scroll;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  animation: fadeIn 0.3s ease-in-out;
  position: relative;
}

.dark .modal-content {
  background-color: var(--card-color);
}

.modal-body {
  overflow-y: auto;
}

.modal .close {
  color: red;
  float: right;
  font-size: 25px;
  background-color: rgb(var(--taccent) / 0.13);
  border-radius: 50%;
  height: 30px;
  width: 30px;
  font-weight: bold;
  cursor: pointer;
  transition: transform 0.3s ease;
  position: absolute;
  right: 5px;
  text-align: center;
  margin: 0;
  padding: 0;
  z-index: 1;
}

.modal .close:hover {
  transform: scale(1.08);
}

.modal-save-button {
  background: transparent;
  border: none;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  padding: 8px;
  font-size: 16px;
  color: var(--accent);
}

.modal-save-button:hover {
  color: var(--accent) !important;
}

.modal-save-button i {
  font-size: 30px;
  color: var(--e-global-color-primary) !important;
}

.video-header .video-actions {
  position: static;
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 15px 0;
}

.video-header .video-actions .modal-download-tab-btn {
  display: flex;
  gap: 15px;
  align-items: center;
}

.video-header .modal-download-tab-btn a {
  background: var(--e-global-color-primary);
  width: auto !important;
  height: auto !important;
  border-radius: 4px;
  padding: 8px 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}

.video-header .modal-download-tab-btn a:hover {
  background-color: rgba(0, 0, 0, 0.5) !important;
}

.video-header .modal-download-tab-btn i {
  font-size: 20px;
  color: #fff !important;
}

.video-wrapper {
  position: relative;
  padding-bottom: 56.25%; /* 16:9 aspect ratio */
  height: 0;
  overflow: hidden;
}

.video-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.video-details {
  margin-top: 20px;
}

.video-details h2 {
  color: var(--e-global-color-primary);
  margin-bottom: 10px;
  line-height: 1.2;
}

.video-details p {
  margin-bottom: 10px;
}

.video-details .author,
.video-details .duration {
  display: flex;
  align-items: center;
  gap: 10px;
}

.video-details .author,
.video-details .duration,
.video-details .genre,
.video-details .mood {
  font-size: 15px;
  color: var(--e-global-color-text);
}

.video-details .genre i,
.video-details .mood i {
  margin-right: 10px;
}

.video-details .duration i,
.video-details .genre i,
.video-details .mood i {
  font-size: 20px !important;
}

.video-details .description {
  margin-bottom: 15px;
  color: var(--e-global-color-text) !important;
  font-size: 16px;
  background-color: rgb(var(--taccent) / 0.13);
  padding: 20px 25px;
  border-radius: 8px;
  transition: all 0.3s ease;
}

.video-details .description-content {
  position: relative;
}

.video-details .description p {
  margin: 0 0 12px !important;
  font-size: 15px;
  line-height: 1.7;
  transition: all 0.3s ease;
}

.video-details .description p:last-child {
  margin-bottom: 0 !important;
}

.video-details .description-paragraph {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.3s ease, transform 0.3s ease;
  overflow: hidden;
}

.video-details .description-paragraph.hidden {
  display: none;
  opacity: 0;
  transform: translateY(-10px);
  max-height: 0;
}

.video-details .toggle-description {
  background: none;
  border: none;
  color: var(--e-global-color-primary);
  cursor: pointer;
  padding: 8px 16px;
  font-size: 14px;
  margin-top: 15px;
  border-radius: 4px;
  transition: all 0.2s ease;
  text-decoration: none;
  background-color: rgb(var(--taccent) / 0.1);
}

.video-details .toggle-description:hover {
  background-color: rgb(var(--taccent) / 0.2);
}

.video-details .video-tags {
  margin: 30px 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 15px;
  flex-wrap: wrap;
}

.video-details .video-tags p {
  margin: 0 !important;
  background-color: rgb(var(--taccent) / 0.13);
  padding: 10px 20px;
  border-radius: 3px;
  transition: all 0.3s ease;
  width: fit-content;
}

.video-details .video-tags p:hover {
  background-color: rgb(var(--taccent) / 0.05);
  transform: scale(1.03);
}

.video-details .video-tags i {
  color: var(--e-global-color-primary);
}

.video-details .video-tags a {
  background: var(--accent);
  color: #fff;
  padding: 2px 5px;
  border-radius: 4px;
  cursor: pointer;
}

.license-info {
  background-color: rgba(0, 0, 0, 0.02);
  padding: 20px;
  border-radius: 10px;
  margin: 20px 0;
  font-size: 16px;
}

.license-info h3 {
  color: var(--e-global-color-primary);
  margin-bottom: 10px !important;
}

.license-info p {
  margin-bottom: 10px;
  line-height: 1.6;
}

.license-info strong {
  color: var(--e-global-color-text);
}

.disclaimer {
  margin-top: 20px;
  margin-bottom: 60px;
  padding: 10px;
  background-color: rgba(0, 0, 0, 0.02);
  border-radius: 5px;
  font-size: 14px;
  color: var(--e-global-color-text) !important;
  display: flex;
  align-items: center;
  gap: 10px;
}

.disclaimer i {
  font-size: 25px;
  align-self: center;
}

.info-icon {
  color: var(--e-global-color-primary) !important;
  font-size: 18px;
  margin-right: 10px;
  transition: all 0.3s ease;
}

.info-icon:hover {
  color: var(--e-global-color-text) !important;
  transform: scale(1.1);
}

.disclaimer p {
  margin: 0 !important;
  line-height: 1.4;
  color: var(--e-global-color-text);
}

/* Related video in modal */
.related-videos {
  margin-top: 2rem;
  padding: 1rem 0;
  border-top: 1px solid rgb(var(--taccent) / 0.13);
}

.related-videos h3 {
  color: var(--e-global-color-text);
  margin-bottom: 1rem;
}

.carousel-container {
  position: relative;
  padding: 0 40px;
}

.carousel-track {
  display: flex;
  touch-action: pan-y pinch-zoom;
  will-change: transform;
}

.carousel {
  display: flex;
  overflow-x: hidden;
  position: relative;
  scroll-behavior: smooth;
  gap: 1rem;
  padding: 0.5rem 0;
}

.carousel-item {
  flex: 0 0 auto;
  width: 240px;
  margin-right: 20px;
  cursor: pointer;
  color: var(--e-global-color-text);
  transition: transform 0.3s ease;
}

.carousel-item:hover {
  transform: translateY(-5px);
}

.carousel-thumbnail {
  position: relative;
  width: 100%;
}

.carousel-thumbnail:hover .video-actions {
  opacity: 1;
}

.carousel-item .video-actions {
  position: absolute;
  top: 8px;
  display: flex;
  gap: 8px;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.carousel-item .video-actions button,
.carousel-item .video-actions a {
  background: rgb(var(--taccent) / 0.13);
  border: none;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 6px;
  transition: background-color 0.2s ease;
}

.carousel-item .video-actions button:hover,
.carousel-item .video-actions a:hover {
  background: rgba(0, 0, 0, 0.9);
}

.carousel-item img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  border-radius: 8px;
}

.carousel-item .video-info {
  padding: 0.5rem 0;
}

.carousel-item .video-title {
  font-size: 0.9rem;
  margin-bottom: 0.25rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.carousel-item .video-author {
  font-size: 0.8rem;
}

.carousel-item .video-views {
  font-size: 0.8rem;
}

.carousel-button {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--e-global-color-primary);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.3s ease;
  padding: 0 !important;
  z-index: 1;
}

.carousel-button:hover {
  background: var(--e-global-color-text);
  color: #fff;
}

.carousel-button.prev {
  left: 0;
}

.carousel-button.next {
  right: 0;
}

/* Loader styling */
.loading-container {
  margin: 100px auto;
  display: flex;
}

.loading-container.show {
  animation: fadeIn 0.5s forwards;
}

.loading-container.hide {
  animation: fadeOut 1s forwards;
}

.loading-container .loader {
  margin: 0 auto;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: inline-block;
  position: relative;
  background: linear-gradient(
    0deg,
    rgb(var(--taccent) / 0.13) 33%,
    var(--e-global-color-primary) 100%
  );
  box-sizing: border-box;
  animation: rotation 1s linear infinite;
}

.loading-container .loader::after {
  content: "";
  box-sizing: border-box;
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #263238;
}

@keyframes rotation {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes fadeOut {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
    display: none;
  }
}

/* Media queries */
@media (max-width: 768px) {
  .root-container {
    padding: 0 15px;
  }

  .search-section {
    flex-direction: column;
  }

  .search-form .form-container {
    flex-wrap: wrap;
    gap: 45px;
    margin-top: 30px;
  }

  .search-section input {
    font-size: 14px;
    padding: 12px 16px;
    width: 100%;
  }

  .search-section button {
    width: 50%;
  }

  .filter-row {
    flex-direction: column;
  }

  .bottom-filters {
    padding: 10px;
    box-shadow: none;
    flex-direction: column;
  }

  .channel-radio-list {
    max-height: 150px;
  }

  .channel-radio-label {
    flex-basis: calc(50% - 10px);
  }

  .sort-filter,
  .channel-filter {
    min-width: auto;
    width: 100%;
    font-size: 13px;
  }

  .sort-by {
    gap: 10px;
  }

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

  .modal-content {
    width: 95%;
    margin: 10% auto;
    height: 95vh;
  }

  .video-header h2 {
    font-size: 25px !important;
  }

  .genre-label,
  .mood-label {
    font-size: 15px;
    padding: 4px 8px;
  }
}

@media (max-width: 600px) {
  .filter-toggle-container {
    --toggle-height: 36px;
    --toggle-width: min(400px, 90vw);
  }
}

@media (max-width: 480px) {
  .search-form {
    padding: 12px;
  }

  .search-form .form-container .main-content {
    margin-top: 15px;
  }

  .filter-toggle-container {
    --toggle-width: min(300px, 90vw);
  }

  .toggle-label {
    padding: 1px 0;
  }

  .search-section button {
    width: 100%;
  }

  .search-section {
    flex-direction: column;
    gap: 10px;
  }

  .search-section button,
  .apply-channels {
    width: 100%;
    padding: 12px;
    font-size: 14px;
  }

  .filter-toggle-container {
    gap: 8px;
    padding: 8px 0;
  }

  .toggle-label {
    font-size: 14px;
  }

  .switch {
    width: 50px;
    height: 28px;
  }

  .slider:before {
    width: 20px;
    height: 20px;
  }

  #genre-labels,
  #mood-labels {
    gap: 8px;
    justify-content: center;
  }

  .genre-label,
  .mood-label {
    font-size: 12px;
    padding: 6px 10px;
    margin: 2px;
  }

  .bottom-filters {
    padding: 12px;
    max-width: 100%;
  }

  .sort-by {
    flex-direction: column;
    gap: 10px;
  }

  .sort-filter,
  .channel-filter {
    width: 100%;
    font-size: 14px;
    padding: 10px;
  }

  .channel-radio-list {
    max-height: 150px;
  }

  .channel-radio-label {
    flex-basis: 100%;
  }

  .channels-modal-content {
    width: 90%;
  }

  #saved-videos-section {
    width: 100%;
    max-width: 100%;
    right: -100%;
  }

  #saved-videos-container {
    margin-bottom: 60px;
  }

  .saved-video-card {
    flex-direction: column;
    align-items: center;
    text-align: center;
    text-overflow: ellipsis;
  }

  .saved-thumbnail {
    width: 100%;
    max-width: 250px;
    height: auto;
    aspect-ratio: 16/9;
    position: relative;
  }

  .saved-thumbnail .save-button {
    position: absolute;
    top: 10px;
    left: 10px;
  }

  .saved-video-card .saved-info {
    width: 100%;
  }

  .modal-content {
    margin: 0;
    width: 100%;
    height: 100vh;
    border-radius: 0;
    max-height: 100vh;
    padding: 15px;
  }

  .video-details {
    display: flex;
    flex-direction: column;
  }

  .video-grid {
    grid-template-columns: 1fr;
    gap: 15px;
  }

  .video-card {
    max-width: 100%;
  }

  .video-title {
    font-size: 15px;
  }

  .video-author {
    font-size: 13px;
  }

  #saved-videos-container {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  }

  .carousel-container {
    padding: 0 20px;
  }

  .carousel-item {
    width: 200px;
  }

  .related-videos h3 {
    font-size: 18px;
  }

  #saved-toggle-btn {
    top: 150px;
    right: 10px;
    width: 40px;
    height: 40px;
  }
}

@media (max-width: 375px) {
  .filter-toggle-container {
    --toggle-width: min(250px, 90vw);
  }
}

@media (max-width: 320px) {
  .filter-toggle-container {
    --toggle-width: min(200px, 90vw);
  }
}

.share-tool-section .add-to-fav,
.share-tool-section .trow {
  display: none;
}

.share-tool-section,
.similar-tools-section {
  margin-bottom: 70px;
}

.dark .similar-tools-section button:hover,
.similar-tools-section button:hover {
  background-color: transparent !important;
}

.dark .elementor-1543 .elementor-element.elementor-element-afbd4f7::before {
  background: rgb(45 56 70 / 7%);
}

/* For Subpages */
.ytmt-page-container {
  width: 100%;
  max-width: 1300px;
  margin: 0 auto;
}

/* For comment section login notice */
.tool-comment-section .login-notice {
  display: none;
}
