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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica,
    Arial, sans-serif;
  font-size: 14px;
  color: #333;
  background: #f5f5f5;
}

.container {
  width: 360px;
  min-height: 200px;
  background: white;
  padding: 20px;
}

.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 1px solid #e0e0e0;
}

.header h2 {
  font-size: 18px;
  font-weight: 600;
  color: #1a1a1a;
}

/* UNUSED START: version label */
.version {
  font-size: 12px;
  color: #888;
}
/* UNUSED END */

.activation-section {
  margin-bottom: 20px;
  padding: 16px;
  background: #f8f9fa;
  border-radius: 8px;
  border: 1px solid #e0e0e0;
}

.activation-section label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  color: #333;
  font-size: 13px;
}

.activation-section input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #d0d0d0;
  border-radius: 6px;
  font-size: 13px;
  margin-bottom: 12px;
  transition: border-color 0.2s ease;
}

.activation-section input:focus {
  outline: none;
  border-color: #ff7700;
  box-shadow: 0 0 0 2px rgba(94, 53, 177, 0.1);
}

.activate-btn {
  width: 100%;
  padding: 10px 16px;
  background: #ff7700;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-bottom: 12px;
}

.activate-btn:hover {
  background: #512da8;
}

/* UNUSED START: old buy link */
.buy-key-link {
  display: block;
  text-align: center;
  font-size: 12px;
  color: #ff7700;
  text-decoration: none;
}

.buy-key-link:hover {
  text-decoration: underline;
}
/* UNUSED END */

/* UNUSED START: url input section */
.url-input-section {
  margin-bottom: 20px;
  padding: 16px;
  background: #f8f9fa;
  border-radius: 8px;
  border: 1px solid #e0e0e0;
}

.url-input-section label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  color: #333;
  font-size: 13px;
}

.url-input-section input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #d0d0d0;
  border-radius: 6px;
  font-size: 13px;
  margin-bottom: 12px;
  transition: border-color 0.2s ease;
}
/* UNUSED END */

.url-input-section input:focus {
  outline: none;
  border-color: #ff7700;
  box-shadow: 0 0 0 2px rgba(94, 53, 177, 0.1);
}

.process-btn {
  width: 100%;
  padding: 10px 16px;
  background: #4caf50;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.process-btn:hover {
  background: #45a049;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(76, 175, 80, 0.3);
}

.process-btn:active {
  transform: translateY(0);
}

.divider {
  text-align: center;
  margin: 20px 0;
  position: relative;
  color: #888;
  font-size: 12px;
  font-weight: 500;
}

.divider::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background: #e0e0e0;
  z-index: 1;
}

.divider span {
  background: white;
  padding: 0 12px;
  position: relative;
  z-index: 2;
}

.status {
  padding: 12px 16px;
  background: #f8f9fa;
  border-radius: 8px;
  margin-bottom: 16px;
  font-size: 13px;
  color: #666;
  text-align: center;
}

.status.info {
  background: #e3f2fd;
  color: #1565c0;
}

.status.success {
  background: #e8f5e9;
  color: #2e7d32;
}

.status.error {
  background: #ffebee;
  color: #c62828;
}

.video-info {
  margin-bottom: 20px;
  padding: 12px;
  background: #333;
  border-radius: 8px;
}

.video-title {
  font-weight: 500;
  margin-bottom: 8px;
  color: #1a1a1a;
  line-height: 1.4;
}

.video-meta {
  display: flex;
  gap: 12px;
  font-size: 12px;
  color: #666;
}

.download-btn {
  width: 100%;
  padding: 12px 20px;
  background: #ff7700;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s ease;
}

.download-btn + .download-btn {
  margin-top: 10px;
}

.download-btn:hover:not(:disabled) {
  background: #512da8;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(94, 53, 177, 0.3);
}

.download-btn:active:not(:disabled) {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(94, 53, 177, 0.3);
}

.download-btn:disabled {
  background: #ccc;
  cursor: not-allowed;
  opacity: 0.7;
}

.btn-icon {
  font-size: 16px;
}

.progress-container {
  margin-top: 20px;
}

.progress-bar {
  height: 8px;
  background: #e0e0e0;
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 8px;
}

.progress-fill {
  height: 100%;
  background: #ff7700;
  width: 0;
  transition: width 0.3s ease;
  position: relative;
}

.progress-fill::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.3) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(100%);
  }
}

.progress-info {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: #666;
}

.error {
  margin-top: 16px;
  padding: 12px;
  background: #ffebee;
  color: #c62828;
  border-radius: 6px;
  font-size: 13px;
  line-height: 1.4;
}

.help-content {
  margin-top: 16px;
  padding: 12px 16px;
  background: #f8f9fa;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  font-size: 13px;
}

.help-content h4 {
  font-weight: 600;
  margin-bottom: 8px;
  color: #333;
}

.help-content p {
  line-height: 1.5;
  margin-bottom: 8px;
}

.help-content p:last-child {
  margin-bottom: 0;
}

.footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid #e0e0e0;
}

.settings-btn,
.help-btn {
  width: 32px;
  height: 32px;
  border: 1px solid #e0e0e0;
  background: white;
  border-radius: 6px;
  cursor: pointer;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.settings-btn:hover,
.help-btn:hover {
  background: #f5f5f5;
  border-color: #ccc;
}

.hidden {
  display: none !important;
}

/* Embed detected notification */
/* UNUSED START: embed notice */
.embed-detected {
  margin-bottom: 20px;
  padding: 12px 16px;
  background: #e8f5e9;
  border: 1px solid #4caf50;
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.embed-notice {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
}

.embed-icon {
  font-size: 20px;
  color: #4caf50;
}

.embed-text {
  font-size: 13px;
  color: #2e7d32;
  font-weight: 500;
}
/* UNUSED END */

/* Loading animation */
/* UNUSED START: loading spinner */
.loading-spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid #e0e0e0;
  border-top: 2px solid #ff7700;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-right: 8px;
  vertical-align: middle;
}
/* UNUSED END */

/* Loading state for status */
.status.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.status.loading::before {
  content: "";
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid #e0e0e0;
  border-top: 2px solid #ff7700;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  flex-shrink: 0;
}

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

/* Batch download progress styles */
/* UNUSED START: batch progress */
.batch-progress {
  margin-top: 16px;
  padding: 12px;
  background: #f8f9fa;
  border-radius: 8px;
  border: 1px solid #e0e0e0;
}

.batch-progress-text {
  font-size: 13px;
  color: #333;
  margin-bottom: 8px;
  text-align: center;
}

.batch-progress-bar {
  height: 8px;
  background: #e0e0e0;
  border-radius: 4px;
  overflow: hidden;
}

.batch-progress-fill {
  height: 100%;
  background: #4caf50;
  transition: width 0.3s ease;
  position: relative;
}

.batch-progress-fill::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.3) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  animation: shimmer 1.5s infinite;
}
/* UNUSED END */
