* {
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  max-width: 900px;
  margin: 0 auto;
  padding: 2rem;
  background: #f5f5f5;
}

h1 {
  color: #333;
  text-align: center;
  margin-bottom: 0.5rem;
}

.subtitle {
  text-align: center;
  color: #666;
  margin-bottom: 2rem;
}

.input-group {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

input[type="url"] {
  flex: 1;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  border: 2px solid #ddd;
  border-radius: 8px;
  outline: none;
  transition: border-color 0.2s;
}

input[type="url"]:focus {
  border-color: #007bff;
}

button {
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s;
}

.convert-btn {
  background: #007bff;
  color: white;
}

.convert-btn:hover {
  background: #0056b3;
}

.convert-btn:disabled {
  background: #ccc;
  cursor: not-allowed;
}

.copy-btn {
  background: #28a745;
  color: white;
}

.copy-btn:hover {
  background: #1e7e34;
}

.result-container {
  position: relative;
  margin-top: 1rem;
}

.result-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.result-header h3 {
  margin: 0;
  color: #333;
}

textarea {
  width: 100%;
  min-height: 400px;
  padding: 1rem;
  font-family: 'Consolas', 'Monaco', monospace;
  font-size: 0.9rem;
  line-height: 1.5;
  border: 2px solid #ddd;
  border-radius: 8px;
  resize: vertical;
  background: white;
}

.loading {
  text-align: center;
  padding: 2rem;
  color: #666;
}

.error {
  background: #fee;
  border: 1px solid #fcc;
  color: #c00;
  padding: 1rem;
  border-radius: 8px;
  margin-top: 1rem;
}

.success-msg {
  color: #28a745;
  font-size: 0.9rem;
  margin-right: 0.5rem;
}

.hidden {
  display: none;
}
