/**
 * YouTube Shorts Trend Finder CSS
 * Styling for the YouTube Shorts Trend Finder page
 */

.youtube-shorts-finder-container {
  margin: 2rem 0;
  padding: 1rem;
  background-color: rgba(25, 25, 35, 0.7);
  border-radius: 15px;
  box-shadow: 0 8px 32px rgba(78, 0, 142, 0.25);
  backdrop-filter: blur(10px);
}

.finder-row {
  display: flex;
  flex-wrap: wrap;
  margin: 0 -15px;
}

.finder-column {
  padding: 0 15px;
  margin-bottom: 30px;
}

.input-settings-column {
  flex: 0 0 100%;
  max-width: 100%;
}

.result-column {
  flex: 0 0 100%;
  max-width: 100%;
}

.input-panel,
.options-panel {
  background: rgba(35, 35, 45, 0.8);
  border-radius: 10px;
  padding: 20px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(131, 80, 190, 0.3);
}

.input-heading {
  font-size: 1.25rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 1.5rem;
}

.form-control {
  background-color: rgba(30, 30, 40, 0.7);
  border: 1px solid rgba(131, 80, 190, 0.5);
  color: #fff;
  border-radius: 8px;
  padding: 10px 15px;
  font-size: 14px;
}

.form-control:focus {
  background-color: rgba(40, 40, 50, 0.7);
  border-color: rgba(161, 90, 255, 0.8);
  box-shadow: 0 0 0 0.2rem rgba(161, 90, 255, 0.25);
  color: #fff;
}

.custom-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='6' viewBox='0 0 8 6'%3E%3Cpath fill='%23a15aff' d='M0 0l4 6 4-6z'/%3E%3C/svg%3E");
  background-position: right 15px center;
  background-repeat: no-repeat;
  background-size: 8px 6px;
  padding-right: 30px;
}

.custom-range {
  height: 8px;
  padding: 0;
  background-color: rgba(30, 30, 40, 0.7);
  border-radius: 4px;
  appearance: none;
}

.custom-range::-webkit-slider-thumb {
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #a15aff;
  cursor: pointer;
  border: none;
  box-shadow: 0 0 5px rgba(161, 90, 255, 0.5);
}

.custom-range::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #a15aff;
  cursor: pointer;
  border: none;
  box-shadow: 0 0 5px rgba(161, 90, 255, 0.5);
}

.range-values {
  font-size: 12px;
  color: #aaa;
  margin-top: 8px;
}

.range-values span {
  padding: 0 5px;
}

#resultCountValue {
  color: #a15aff;
  font-weight: 600;
}

.ai-analysis-checkbox {
  display: block;
  position: relative;
  padding-left: 35px;
  margin-top: 15px;
  cursor: pointer;
  font-size: 15px;
  user-select: none;
  color: #fff;
}

.ai-analysis-checkbox input {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  height: 0;
  width: 0;
}

.checkmark {
  position: absolute;
  top: 0;
  left: 0;
  height: 22px;
  width: 22px;
  background-color: rgba(30, 30, 40, 0.7);
  border: 1px solid rgba(131, 80, 190, 0.5);
  border-radius: 4px;
}

.ai-analysis-checkbox:hover input ~ .checkmark {
  background-color: rgba(40, 40, 50, 0.7);
}

.ai-analysis-checkbox input:checked ~ .checkmark {
  background-color: #a15aff;
}

.checkmark:after {
  content: "";
  position: absolute;
  display: none;
}

.ai-analysis-checkbox input:checked ~ .checkmark:after {
  display: block;
}

.ai-analysis-checkbox .checkmark:after {
  left: 8px;
  top: 4px;
  width: 6px;
  height: 10px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.find-trends-button {
  background: linear-gradient(135deg, #8350be 0%, #a15aff 100%);
  color: white;
  border: none;
  border-radius: 8px;
  padding: 12px 25px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  width: 100%;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(129, 80, 190, 0.3);
}

.find-trends-button:hover {
  background: linear-gradient(135deg, #9660d5 0%, #b16aff 100%);
  box-shadow: 0 6px 20px rgba(129, 80, 190, 0.4);
  transform: translateY(-2px);
}

.find-trends-button:active {
  transform: translateY(0px);
}

.find-trends-button i {
  margin-right: 10px;
}

.loading-spinner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 250px;
}

.spinner {
  width: 50px;
  height: 50px;
  border: 4px solid rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  border-top: 4px solid #a15aff;
  animation: spin 1s linear infinite;
}

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

.loading-spinner p {
  margin-top: 15px;
  color: #a15aff;
  font-size: 16px;
}

.error-message,
.no-results-message {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 200px;
  text-align: center;
  color: #ff5a5a;
  padding: 20px;
}

.error-message i,
.no-results-message i {
  font-size: 40px;
  margin-bottom: 15px;
}

.no-results-message {
  color: #a15aff;
}

.result-section {
  background: rgba(35, 35, 45, 0.8);
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(131, 80, 190, 0.3);
  overflow: hidden;
}

.result-header {
  padding: 15px 20px;
  border-bottom: 1px solid rgba(131, 80, 190, 0.3);
}

.result-header h3 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 600;
  color: #fff;
}

.carousel-container {
  position: relative;
  padding: 20px;
  min-height: 600px;
}

.shorts-carousel {
  display: flex;
  overflow: hidden;
}

.shorts-carousel-item {
  flex: 0 0 100%;
  transition: transform 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  width: 100%;
}

.shorts-embed {
  margin-bottom: 15px;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  width: 100%;
  display: flex;
  justify-content: center;
}

.shorts-info {
  margin-top: 10px;
  text-align: center;
  max-width: 90%;
}

.shorts-title {
  font-size: 16px;
  font-weight: 600;
  color: #fff;
  margin-bottom: 5px;
}

.shorts-channel {
  font-size: 14px;
  color: #a15aff;
  margin-bottom: 5px;
}

.shorts-stats {
  display: flex;
  justify-content: center;
  gap: 15px;
  font-size: 12px;
  color: #aaa;
}

.carousel-controls {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 10px 0 20px;
}

.carousel-control {
  background-color: rgba(30, 30, 40, 0.7);
  border: 1px solid rgba(131, 80, 190, 0.5);
  color: #a15aff;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.carousel-control:hover {
  background-color: rgba(40, 40, 50, 0.9);
  border-color: #a15aff;
  transform: scale(1.1);
  box-shadow: 0 4px 12px rgba(161, 90, 255, 0.3);
}

.carousel-control.active {
  background-color: #a15aff;
  color: white;
  border-color: #a15aff;
}

.carousel-indicators {
  display: flex;
  justify-content: center;
  margin: 0 15px;
  gap: 8px;
}

.carousel-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: rgba(131, 80, 190, 0.3);
  transition: all 0.3s ease;
  cursor: pointer;
}

.carousel-indicator.active {
  width: 12px;
  height: 12px;
  background-color: #a15aff;
}

.ai-analysis-section {
  padding: 20px;
  border-top: 1px solid rgba(131, 80, 190, 0.3);
  background-color: rgba(35, 35, 50, 0.7);
}

.ai-analysis-header {
  margin-bottom: 15px;
}

.ai-analysis-header h3 {
  font-size: 1.2rem;
  font-weight: 600;
  color: #fff;
  margin: 0;
  display: flex;
  align-items: center;
}

.ai-analysis-header i {
  color: #a15aff;
  margin-right: 10px;
}

.ai-analysis-content {
  font-size: 14px;
  line-height: 1.6;
  color: #f0f0f0;
  padding: 10px;
  border-radius: 8px;
  background-color: rgba(25, 25, 35, 0.7);
}

.ai-analysis-content h2 {
  font-size: 1.3rem;
  margin-top: 20px;
  margin-bottom: 10px;
  color: #a15aff;
  border-bottom: 1px solid rgba(131, 80, 190, 0.3);
  padding-bottom: 8px;
}

.ai-analysis-content h3 {
  font-size: 1.1rem;
  margin-top: 15px;
  margin-bottom: 10px;
  color: #a15aff;
}

.ai-analysis-content h4 {
  font-size: 1rem;
  margin-top: 15px;
  margin-bottom: 10px;
  color: #a15aff;
}

.ai-analysis-content p {
  margin-bottom: 15px;
}

.ai-analysis-content strong {
  color: #a15aff;
}

.ai-analysis-content ul, 
.ai-analysis-content ol {
  margin-bottom: 15px;
  padding-left: 20px;
}

.ai-analysis-content li {
  margin-bottom: 8px;
}

.toast-notification {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background-color: rgba(35, 35, 45, 0.9);
  color: #fff;
  padding: 10px 20px;
  border-radius: 5px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s, opacity 0.3s;
  transform: translateY(100px);
  opacity: 0;
  z-index: 1000;
  border-left: 4px solid #a15aff;
}

.toast-notification.show {
  transform: translateY(0);
  opacity: 1;
}

/* API Status Notification Styles */
.api-status-notification {
  position: fixed;
  bottom: 20px;
  right: 20px;
  padding: 12px 18px;
  border-radius: 10px;
  font-size: 14px;
  z-index: 1000;
  max-width: 300px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  transition: all 0.3s ease;
  opacity: 0.95;
}

.api-status-notification:hover {
  opacity: 1;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

.api-status-notification strong {
  display: block;
  margin-bottom: 5px;
  font-size: 15px;
}

.api-status-notification small {
  display: block;
  margin-top: 5px;
  opacity: 0.8;
}

/* Responsive styles */
@media (min-width: 768px) {
  .input-settings-column {
    flex: 0 0 40%;
    max-width: 40%;
  }
  
  .result-column {
    flex: 0 0 60%;
    max-width: 60%;
  }
  
  .shorts-embed {
    width: 320px;
    height: 570px;
  }
}

@media (max-width: 767px) {
  .shorts-embed {
    width: 280px;
    height: 500px;
  }
  
  .carousel-container {
    min-height: 550px;
  }
}
