body {
  background-color: #000000;
  color: #FFFFFF !important;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: 768px;
  background-color: #000000;
  color: #FFFFFF !important;
}

/* Mobile-optimized search results */
.result-card {
  background-color: #1a1a1a;
  border-radius: 12px;
  margin-top: 1rem;
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
}

.result-card:active {
  transform: scale(0.98);
}

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

.result-thumbnail {
  width: 100%;
  height: auto;
  display: block;
  aspect-ratio: 16/9;
  object-fit: cover;
}

.duration-badge {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background-color: rgba(0, 0, 0, 0.85);
  color: #FFFFFF;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  font-family: monospace;
}

.result-content {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
}

.result-title {
  font-size: 0.95rem;
  font-weight: 500;
  line-height: 1.4;
  color: #FFFFFF;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.result-actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: auto;
}

/* Improve checkbox and label for mobile */
.form-check-input {
  width: 1.25rem;
  height: 1.25rem;
  cursor: pointer;
}

.form-check-label {
  font-size: 0.9rem;
  cursor: pointer;
  user-select: none;
}

/* Download button optimizations */
.btn-download {
  width: 100%;
  padding: 0.75rem;
  font-weight: 600;
  font-size: 1rem;
  border-radius: 8px;
  touch-action: manipulation;
}

/* Tablet and desktop adjustments */
@media (min-width: 576px) {
  .result-thumbnail {
    height: 100%;
    min-height: 120px;
  }

  .result-actions {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }

  .btn-download {
    width: auto;
    min-width: 120px;
  }

  .result-title {
    font-size: 1rem;
  }
}

@media (min-width: 768px) {
  .result-title {
    font-size: 1.05rem;
  }

  .btn-download {
    padding: 0.5rem 1.5rem;
  }
}

/* Modal improvements for mobile */
.modal-content {
  margin: 0.5rem;
}

@media (max-width: 575px) {
  .modal-dialog {
    margin: 0.5rem;
  }
}

/* Search input improvements */
.input-group-lg .form-control {
  font-size: 1rem;
  padding: 0.75rem 1rem;
}

.input-group-lg .btn {
  font-size: 1rem;
  padding: 0.75rem 1rem;
}

/* Loading and alert styles */
.alert {
  border-radius: 8px;
  margin-top: 1rem;
}

/* Improve touch targets */
.btn {
  min-height: 44px;
  touch-action: manipulation;
}

input[type="text"],
input[type="checkbox"] {
  touch-action: manipulation;
}
