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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: #0f0f0f;
  color: #eee;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
}

.container {
  width: 100%;
  max-width: 640px;
  text-align: center;
}

h1 {
  font-size: 1.8rem;
  margin-bottom: 8px;
  background: linear-gradient(135deg, #667eea, #764ba2);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.desc {
  color: #888;
  margin-bottom: 28px;
  font-size: 0.95rem;
}

.input-group {
  display: flex;
  gap: 10px;
}

.input-group textarea {
  flex: 1;
  padding: 14px 18px;
  border: 1px solid #333;
  border-radius: 12px;
  background: #1a1a1a;
  color: #eee;
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.2s;
  resize: vertical;
  font-family: inherit;
  line-height: 1.5;
}

.input-group textarea:focus {
  border-color: #667eea;
}

.extracted-url {
  margin-top: 10px;
  padding: 8px 14px;
  background: rgba(102, 126, 234, 0.1);
  border-radius: 8px;
  font-size: 0.85rem;
  color: #a5b4fc;
  word-break: break-all;
  animation: fadeIn 0.3s;
}

.extracted-url span {
  color: #888;
}

.input-group button {
  padding: 14px 28px;
  border: none;
  border-radius: 12px;
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: #fff;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: opacity 0.2s;
}

.input-group button:hover {
  opacity: 0.9;
}

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

#pasteBtn {
  padding: 14px 18px;
  border: 1px solid #444;
  border-radius: 12px;
  background: #1a1a1a;
  color: #ccc;
  font-size: 0.95rem;
  font-weight: 400;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s;
}

#pasteBtn:hover {
  background: #2a2a2a;
}

#pasteBtn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.status {
  margin-top: 20px;
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 0.9rem;
  animation: fadeIn 0.3s;
}

.status.loading {
  background: rgba(102, 126, 234, 0.15);
  color: #a5b4fc;
}

.status.error {
  background: rgba(239, 68, 68, 0.15);
  color: #fca5a5;
}

.status.success {
  background: rgba(34, 197, 94, 0.15);
  color: #86efac;
}

.result {
  margin-top: 24px;
  animation: fadeIn 0.4s;
}

#videoContainer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

#videoPreview {
  width: 100%;
  max-width: 100%;
  border-radius: 12px;
  background: #000;
  outline: none;
}

.download-link {
  text-decoration: none;
}

.btn-download {
  padding: 14px 40px;
  border: none;
  border-radius: 12px;
  background: linear-gradient(135deg, #22c55e, #16a34a);
  color: #fff;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s;
}

.btn-download:hover {
  opacity: 0.9;
}

.btn-save-photos {
  padding: 14px 40px;
  border: none;
  border-radius: 12px;
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  color: #fff;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s;
  white-space: nowrap;
}

.btn-save-photos:hover {
  opacity: 0.9;
}

.btn-save-photos:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-sm {
  padding: 10px 20px;
  font-size: 0.85rem;
}

.btn-row {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}

.image-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

#imageContainer {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
}

#imageContainer img {
  width: 100%;
  border-radius: 10px;
  cursor: pointer;
  transition: transform 0.2s;
}

#imageContainer img:hover {
  transform: scale(1.02);
}

.hidden {
  display: none !important;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 480px) {
  .input-group {
    flex-direction: column;
  }
  h1 {
    font-size: 1.4rem;
  }
}

#audioContainer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.audio-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.audio-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: #eee;
}

.audio-artist {
  font-size: 0.85rem;
  color: #888;
}

#audioPlayer {
  width: 100%;
  border-radius: 12px;
  outline: none;
}

#albumContainer {
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

#albumContainer h3 {
  font-size: 1.1rem;
  color: #eee;
}

.album-track {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: #1a1a1a;
  border-radius: 10px;
  transition: background 0.2s;
}

.album-track:hover {
  background: #242424;
}

.track-num {
  color: #666;
  font-size: 0.85rem;
  min-width: 24px;
}

.track-name {
  flex: 1;
  color: #ccc;
  font-size: 0.9rem;
}

.track-play {
  background: none;
  border: 1px solid #444;
  color: #ccc;
  border-radius: 8px;
  padding: 6px 12px;
  cursor: pointer;
  font-size: 0.85rem;
  transition: background 0.2s;
}

.track-play:hover {
  background: #2a2a2a;
}

.track-dl {
  color: #22c55e;
  text-decoration: none;
  font-size: 1.1rem;
  padding: 4px 8px;
  border-radius: 6px;
  transition: background 0.2s;
}

.track-dl:hover {
  background: rgba(34, 197, 94, 0.15);
}
