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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen,
    Ubuntu, Cantarell, sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.container {
  background: white;
  padding: 40px;
  border-radius: 20px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
  max-width: 600px;
  width: 100%;
}

h1 {
  text-align: center;
  color: #333;
  margin-bottom: 10px;
  font-size: 2.5em;
  font-weight: 700;
}

p {
  text-align: center;
  color: #666;
  margin-bottom: 30px;
}

.url-form {
  margin-bottom: 30px;
}

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

input[type='url'] {
  flex: 1;
  padding: 15px;
  border: 2px solid #e1e5e9;
  border-radius: 10px;
  font-size: 16px;
  transition: border-color 0.3s ease;
}

input[type='url']:focus {
  outline: none;
  border-color: #667eea;
}

button {
  padding: 15px 30px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

button:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(102, 126, 234, 0.3);
}

button:active {
  transform: translateY(0);
}

.result {
  background: #f8f9fa;
  padding: 25px;
  border-radius: 15px;
  margin-bottom: 20px;
  border-left: 4px solid #28a745;
}

.result h3 {
  color: #28a745;
  margin-bottom: 15px;
  font-size: 1.2em;
}

.url-result {
  display: flex;
  gap: 10px;
  margin-bottom: 15px;
}

.url-result input {
  flex: 1;
  padding: 12px;
  border: 1px solid #ddd;
  border-radius: 8px;
  background: white;
  font-family: monospace;
  font-size: 14px;
}

.copy-btn {
  padding: 12px 20px;
  background: #28a745;
  font-size: 14px;
}

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

.original-url {
  font-size: 14px;
  color: #666;
  margin-bottom: 10px;
}

.original-url a {
  color: #667eea;
  text-decoration: none;
}

.original-url a:hover {
  text-decoration: underline;
}

.stats-link {
  font-size: 14px;
}

.stats-link a {
  color: #667eea;
  text-decoration: none;
  font-weight: 600;
}

.stats-link a:hover {
  text-decoration: underline;
}

.error {
  background: #f8d7da;
  padding: 25px;
  border-radius: 15px;
  margin-bottom: 20px;
  border-left: 4px solid #dc3545;
}

.error h3 {
  color: #dc3545;
  margin-bottom: 10px;
  font-size: 1.2em;
}

.error p {
  color: #721c24;
  text-align: left;
}

.api-docs {
  background: #e9ecef;
  padding: 20px;
  border-radius: 15px;
  text-align: center;
}

.api-docs h3 {
  color: #495057;
  margin-bottom: 10px;
  font-size: 1.1em;
}

.api-docs p {
  color: #6c757d;
  margin-bottom: 0;
}

.api-docs a {
  color: #667eea;
  text-decoration: none;
  font-weight: 600;
}

.api-docs a:hover {
  text-decoration: underline;
}

@media (max-width: 768px) {
  .container {
    padding: 20px;
  }

  .input-group {
    flex-direction: column;
  }

  .url-result {
    flex-direction: column;
  }

  h1 {
    font-size: 2em;
  }
}
