* {
  box-sizing: border-box;
}

body {
  font-family: system-ui, -apple-system, sans-serif;
  max-width: 700px;
  margin: 50px auto;
  padding: 20px;
  background: #1a1a1a;
  color: #fff;
}

h1 {
  margin-bottom: 8px;
  font-size: 1.5rem;
}

.subtitle {
  color: #888;
  margin-bottom: 24px;
  font-size: 0.9rem;
}

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

input {
  flex: 1;
  padding: 12px;
  border: 1px solid #333;
  border-radius: 8px;
  background: #2a2a2a;
  color: #fff;
  font-size: 14px;
}

input:focus {
  outline: none;
  border-color: #fe2c55;
}

button {
  padding: 12px 24px;
  background: #fe2c55;
  color: #fff;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  transition: background 0.2s;
}

button:hover {
  background: #e52950;
}

button:disabled {
  background: #666;
  cursor: not-allowed;
}

.result {
  display: none;
  margin-top: 20px;
}

.result.visible {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.caption-box {
  flex: 1;
  background: #2a2a2a;
  border-radius: 8px;
  padding: 16px;
  position: relative;
  min-height: 120px;
}

.caption-label {
  font-size: 0.75rem;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.caption-text {
  font-size: 1rem;
  line-height: 1.5;
  word-wrap: break-word;
  padding-right: 60px;
}

.copy-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 6px 12px;
  font-size: 12px;
  background: #444;
}

.copy-btn:hover {
  background: #555;
}

.copy-btn.copied {
  background: #25a56a;
}

.thumbnail-container {
  width: 150px;
  flex-shrink: 0;
  border-radius: 8px;
  overflow: hidden;
  background: #2a2a2a;
}

.thumbnail-container img {
  width: 100%;
  height: auto;
  display: block;
}

.error-box {
  background: #3a2a2a;
  border: 1px solid #ff6b6b;
  color: #ff6b6b;
  padding: 16px;
  border-radius: 8px;
  display: none;
}

.error-box.visible {
  display: block;
}

.ad-container {
  margin: 20px 0;
  min-height: 90px;
  width: 100%;
  display: block;
}

.ad-container ins {
  display: block;
  width: 100%;
}

.seo-content {
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid #333;
  color: #666;
  font-size: 0.85rem;
  line-height: 1.6;
}

.seo-content h2 {
  font-size: 1rem;
  color: #888;
  margin-bottom: 10px;
}

@media (max-width: 500px) {
  .result.visible {
    flex-direction: column-reverse;
  }
  
  .thumbnail-container {
    width: 100%;
    max-width: 200px;
  }
}