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

body {
  background: #0a0a0a;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Inter, Roboto, sans-serif;
  color: #e5e5e5;
  line-height: 1.6;
  padding: 3.5rem 1.25rem 2.5rem;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.container {
  max-width: 560px;
  width: 100%;
  margin: 0 auto;
}

@media (min-width: 860px) {
  .container { max-width: 640px; }
  .quickfacts { grid-template-columns: repeat(4, 1fr); }
}

.logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 0.6rem;
}

.logo i {
  font-size: 1.4rem;
  color: #f0f0f0;
}

.logo h1 {
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: -0.5px;
  color: #f5f5f5;
}

.logo span {
  color: #777;
  font-weight: 400;
}

.tagline {
  text-align: center;
  color: #777;
  font-size: 0.92rem;
  margin-bottom: 2.2rem;
}

.card {
  background: #141414;
  border-radius: 22px;
  padding: 1.5rem;
  border: 1px solid #242424;
  margin-bottom: 2rem;
}

.badge-row {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 1rem;
}

.api-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #161616;
  color: #888;
  font-size: 0.75rem;
  padding: 7px 14px;
  border-radius: 40px;
  border: 1px solid #262626;
}

.features {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: #232323;
  border: 1px solid #232323;
  border-radius: 20px;
  overflow: hidden;
  margin-bottom: 1.6rem;
}

.feature-item {
  background: #131313;
  padding: 1.8rem 1.2rem;
  text-align: center;
}

.feature-item i {
  font-size: 1.7rem;
  color: #ccc;
  margin-bottom: 0.8rem;
  display: block;
}

.feature-item h4 {
  font-size: 0.95rem;
  font-weight: 600;
  color: #eee;
  margin-bottom: 0.4rem;
}

.feature-item p {
  font-size: 0.76rem;
  color: #777;
  max-width: 320px;
  margin: 0 auto;
  line-height: 1.5;
}

.input-wrapper {
  display: flex;
  align-items: center;
  background: #1c1c1c;
  border-radius: 60px;
  padding: 4px 4px 4px 18px;
  border: 1px solid #2a2a2a;
  transition: border-color 0.15s;
}

.input-wrapper:focus-within {
  border-color: #4a4a4a;
}

.input-wrapper > i {
  color: #666;
  font-size: 0.9rem;
  margin-right: 10px;
  flex-shrink: 0;
}

.input-wrapper input {
  flex: 1;
  min-width: 0;
  background: transparent;
  border: none;
  padding: 14px 0;
  color: #f0f0f0;
  font-size: 0.95rem;
  outline: none;
  font-family: inherit;
}

.input-wrapper input::placeholder {
  color: #555;
}

.input-wrapper input:disabled {
  opacity: 0.6;
}

.btn-paste {
  background: transparent;
  border: none;
  color: #888;
  width: 38px;
  height: 38px;
  min-width: 38px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 0.9rem;
  transition: 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.btn-paste:hover {
  background: #262626;
  color: #eee;
}

.btn-download {
  background: #f0f0f0;
  border: none;
  color: #0a0a0a;
  font-weight: 600;
  padding: 0 20px;
  height: 44px;
  border-radius: 60px;
  cursor: pointer;
  font-size: 0.9rem;
  font-family: inherit;
  transition: 0.15s;
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  margin-left: 4px;
  flex-shrink: 0;
}

.btn-download:hover {
  background: #fff;
}

.btn-download:active {
  transform: scale(0.96);
}

.btn-download:disabled,
.btn-paste:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

@media (max-width: 480px) {
  .btn-label { display: none; }
  .btn-download { padding: 0 16px; }
}

#status {
  margin-top: 0.9rem;
  padding: 0.7rem 1rem;
  border-radius: 14px;
  background: #1a1a1a;
  border-left: 3px solid #3a3a3a;
  font-size: 0.85rem;
  color: #999;
  display: none;
  align-items: center;
  gap: 8px;
}

#status.show { display: flex; }
#status.loading { color: #aaa; }
#status.success { border-left-color: #666; color: #e5e5e5; }
#status.error   { border-left-color: #666; color: #ccc; }

.result-container {
  margin-top: 1.2rem;
  display: none;
  background: #101010;
  border-radius: 18px;
  padding: 1.2rem;
  border: 1px solid #232323;
}

.result-container.show { display: block; }

.result-video {
  width: 100%;
  max-height: 420px;
  border-radius: 12px;
  background: #000;
  display: block;
}

.photo-grid {
  display: none;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
}

.photo-grid.show { display: grid; }

.photo-item { position: relative; }

.photo-item img {
  width: 100%;
  aspect-ratio: 9 / 16;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid #262626;
  background: #000;
  display: block;
}

.photo-item .num {
  position: absolute;
  top: 5px;
  left: 5px;
  font-size: 0.62rem;
  font-weight: 700;
  color: #eee;
  background: rgba(10, 10, 10, 0.75);
  border: 1px solid #333;
  padding: 2px 6px;
  border-radius: 40px;
}

.photo-item .savebtn {
  position: absolute;
  bottom: 5px;
  right: 5px;
  width: 28px;
  height: 28px;
  min-width: 28px;
  border-radius: 50%;
  border: 1px solid #3a3a3a;
  background: rgba(10, 10, 10, 0.85);
  color: #f0f0f0;
  font-size: 0.75rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: 0.15s;
}

.photo-item .savebtn:hover {
  background: #fff;
  color: #0a0a0a;
  border-color: #fff;
}

.photo-item .savebtn:disabled { opacity: 0.55; cursor: wait; }

.result-meta {
  margin-top: 0.9rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
  gap: 0.5rem;
}

.result-meta .stat {
  background: #1a1a1a;
  padding: 0.5rem 0.6rem;
  border-radius: 10px;
  text-align: center;
  font-size: 0.72rem;
  color: #777;
}

.result-meta .stat strong {
  display: block;
  color: #eee;
  font-size: 0.95rem;
}

.result-title {
  color: #ccc;
  font-size: 0.88rem;
  margin: 0.9rem 0 0;
  padding: 0.7rem 0.8rem;
  background: #1a1a1a;
  border-radius: 10px;
  word-break: break-word;
  max-height: 70px;
  overflow-y: auto;
}

.result-actions {
  display: flex;
  gap: 0.6rem;
  margin-top: 1rem;
  flex-wrap: wrap;
}

.result-actions button {
  flex: 1;
  min-width: 120px;
  text-align: center;
  padding: 0.7rem;
  border-radius: 40px;
  font-weight: 600;
  font-size: 0.82rem;
  transition: 0.15s;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-family: inherit;
}

.btn-video {
  background: #262626;
  color: #f0f0f0;
  border: 1px solid #3a3a3a;
}
.btn-video:hover { background: #333; }

.btn-audio {
  background: transparent;
  color: #aaa;
  border: 1px solid #333;
}
.btn-audio:hover { background: #1e1e1e; }

.btn-zip {
  background: #f0f0f0;
  color: #0a0a0a;
  border: 1px solid #f0f0f0;
}
.btn-zip:hover { background: #fff; }

.result-actions button:disabled { opacity: 0.5; cursor: wait; }

.steps {
  margin-bottom: 1.6rem;
}

.steps h3 {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.05rem;
  font-weight: 600;
  color: #f0f0f0;
  letter-spacing: -0.2px;
  margin-bottom: 1rem;
}

.steps h3 i {
  color: #777;
  font-size: 1rem;
}

.step-list {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.step-item {
  display: flex;
  gap: 0.9rem;
  align-items: flex-start;
  background: #131313;
  padding: 0.9rem 1.1rem;
  border-radius: 16px;
  border: 1px solid #212121;
  border-left: 3px solid #333;
}

.step-number {
  background: #1a1a1a;
  border: 1px solid #2a2a2a;
  color: #999;
  width: 28px;
  height: 28px;
  min-width: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.8rem;
  margin-top: 1px;
}

.step-content {
  flex: 1;
  min-width: 0;
}

.step-content strong {
  display: block;
  color: #eee;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 2px;
}

.step-content span {
  color: #888;
  font-size: 0.83rem;
  line-height: 1.55;
}

.step-content b {
  color: #bbb;
  font-weight: 600;
}

.quickfacts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.7rem;
  background: #131313;
  border: 1px solid #212121;
  border-radius: 18px;
  padding: 1.1rem;
  margin-bottom: 1.6rem;
}

.qf-item {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 0.82rem;
  color: #aaa;
}

.qf-item i {
  color: #666;
  font-size: 0.85rem;
  width: 16px;
  text-align: center;
  flex-shrink: 0;
}

.footer-note {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-align: center;
  font-size: 0.75rem;
  color: #4a4a4a;
  border-top: 1px solid #1c1c1c;
  padding-top: 1.6rem;
}

.footer-sub {
  color: #3a3a3a;
  font-size: 0.7rem;
}

.footer-sub a {
  color: #666;
  text-decoration: none;
  border-bottom: 1px solid #333;
}

.footer-sub a:hover {
  color: #999;
  border-bottom-color: #666;
}

@media (max-width: 480px) {
  body { padding: 2.5rem 1rem 2rem; }
  .card { padding: 1.1rem; }
  .photo-grid { grid-template-columns: repeat(2, 1fr); }
  .result-actions { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}

