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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
  background: linear-gradient(135deg, #1e1b4b 0%, #312e81 100%);
  color: #f8fafc;
  min-height: 100vh;
  line-height: 1.6;
}

.container {
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem;
}

header {
  text-align: center;
  margin-bottom: 2rem;
}

.back {
  display: inline-block;
  color: #a5b4fc;
  text-decoration: none;
  margin-bottom: 1rem;
  font-size: 0.9rem;
  transition: color 0.2s;
}

.back:hover {
  color: #c7d2fe;
}

h1 {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
}

.subtitle {
  color: #a5b4fc;
  font-size: 1.1rem;
}

main {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.input-section {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 1.5rem;
  backdrop-filter: blur(10px);
}

label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.5rem;
  margin-top: 1rem;
  color: #e2e8f0;
}

label:first-child {
  margin-top: 0;
}

input[type="text"],
input[type="url"],
select {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.2);
  color: #f8fafc;
  font-size: 1rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}

input[type="text"]:focus,
input[type="url"]:focus,
select:focus {
  outline: none;
  border-color: #818cf8;
  box-shadow: 0 0 0 3px rgba(129, 140, 248, 0.3);
}

input[type="text"]::placeholder,
input[type="url"]::placeholder {
  color: #94a3b8;
}

select option {
  background: #1e1b4b;
  color: #f8fafc;
}

input[type="range"] {
  width: 100%;
  height: 8px;
  -webkit-appearance: none;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 4px;
  margin-top: 0.5rem;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  background: #818cf8;
  border-radius: 50%;
  cursor: pointer;
  transition: transform 0.2s;
}

input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.1);
}

.range-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  color: #94a3b8;
  margin-top: 0.25rem;
}

.style-options {
  margin-top: 1rem;
}

.style-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.style-btn {
  padding: 0.5rem 1rem;
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: 6px;
  background: transparent;
  color: #e2e8f0;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s;
}

.style-btn:hover {
  border-color: #818cf8;
  background: rgba(129, 140, 248, 0.1);
}

.style-btn.active {
  border-color: #818cf8;
  background: #818cf8;
  color: #1e1b4b;
}

.primary-btn {
  width: 100%;
  padding: 1rem;
  margin-top: 1.5rem;
  border: none;
  border-radius: 8px;
  background: linear-gradient(135deg, #818cf8, #a855f7);
  color: white;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}

.primary-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(129, 140, 248, 0.4);
}

.preview-section {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 1.5rem;
  backdrop-filter: blur(10px);
}

.preview-section.hidden {
  display: none;
}

.preview-section h2 {
  margin-bottom: 1rem;
  color: #e2e8f0;
}

.preview-container {
  background: white;
  border-radius: 8px;
  padding: 2rem;
  text-align: center;
  margin-bottom: 1.5rem;
}

.badge-preview img {
  max-width: 100%;
  height: auto;
}

.code-section {
  margin-top: 1rem;
}

.code-section h3 {
  font-size: 0.9rem;
  color: #a5b4fc;
  margin-bottom: 0.5rem;
}

.code-block {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 8px;
  padding: 0.75rem 1rem;
  overflow: hidden;
}

.code-block code {
  flex: 1;
  font-family: 'Monaco', 'Menlo', monospace;
  font-size: 0.85rem;
  color: #a5b4fc;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.copy-btn {
  padding: 0.4rem 0.75rem;
  border: none;
  border-radius: 4px;
  background: rgba(129, 140, 248, 0.3);
  color: #e2e8f0;
  font-size: 0.8rem;
  cursor: pointer;
  transition: background 0.2s;
  flex-shrink: 0;
}

.copy-btn:hover {
  background: rgba(129, 140, 248, 0.5);
}

.copy-btn.copied {
  background: #22c55e;
}

.examples-section {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 16px;
  padding: 1.5rem;
}

.examples-section h2 {
  margin-bottom: 1rem;
  color: #e2e8f0;
}

.example-badges {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.example-badge {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
}

.example-badge img {
  height: 24px;
}

.example-badge span {
  color: #94a3b8;
  font-size: 0.9rem;
}

footer {
  text-align: center;
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

footer p {
  color: #64748b;
  font-size: 0.9rem;
}

footer a {
  color: #818cf8;
  text-decoration: none;
}

footer a:hover {
  text-decoration: underline;
}

.note {
  margin-top: 0.5rem;
  font-size: 0.85rem;
}

@media (max-width: 600px) {
  .container {
    padding: 1rem;
  }

  h1 {
    font-size: 1.75rem;
  }

  .style-buttons {
    flex-direction: column;
  }

  .style-btn {
    width: 100%;
    text-align: center;
  }
}
