/* Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Inter", system-ui, sans-serif;
}

:root {
  --bg: #ffffff;
  --text: #222;
  --card: #fafafa;
  --border: #ddd;

  --neon: #00c7d9;
  --neon-soft: rgba(0, 199, 217, 0.35);
}

body {
  background: var(--bg);
  color: var(--text);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 2rem;
  min-height: 100vh;
  transition: background 0.3s, color 0.3s;
}

body.dark {
  --bg: #0b0b0d;
  --text: #e8e8e8;
  --card: #0f0f12;
  --border: rgba(255, 255, 255, 0.08);

  --neon: #00eaff;
  --neon-soft: rgba(0, 234, 255, 0.3);
}

header h1 {
  text-align: center;
  font-size: 1.8rem;
  margin-bottom: 2.5rem;
  letter-spacing: 0.5px;

  color: var(--text);
  border-bottom: 2px solid var(--neon);
  padding-bottom: 0.5rem;

  width: 100%;
  max-width: 500px;
  transition: color 0.3s, border-color 0.3s;
}

aside {
  background: var(--card);
  padding: 2rem;
  border-radius: 0.8rem;
  border: 1px solid var(--neon-soft);
  width: 100%;
  transition: background 0.3s, border-color 0.3s;
}

label {
  display: flex;
  flex-direction: column;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 1rem;
  font-size: 0.95rem;
  transition: color 0.3s;
}

input[type="url"] {
  padding: 0.8rem;
  border-radius: 0.5rem;
  font-size: 1rem;
  background: var(--bg);
  color: var(--text);

  border: 1px solid var(--border);
  transition: 0.2s, background 0.3s, color 0.3s;
}

input[type="url"]:focus {
  border-color: var(--neon);
  box-shadow: 0 0 6px var(--neon-soft);
  outline: none;
}

button {
  background: var(--neon);
  color: #fff;
  border: none;
  padding: 0.8rem 1.2rem;
  border-radius: 0.5rem;
  font-size: 1rem;
  cursor: pointer;
  transition: 0.25s ease;
}

button:hover {
  background: #009fb0;
}

#themeToggle {
  background: transparent;
  color: var(--neon);
  border: 1px solid var(--neon);
  padding: 0.4rem 1rem;
  border-radius: 0.4rem;
  font-size: 0.9rem;
  cursor: pointer;
  margin-bottom: 1rem;
}
#themeToggle:hover {
  background: var(--neon);
  color: #0b0b0d;
}

#urlResult {
  margin-top: 1.2rem;
  font-size: 0.95rem;
  color: var(--neon);
  word-break: break-all;
}

@media (max-width: 480px) {
  header h1 {
    font-size: 1.4rem;
  }

  aside {
    padding: 1.5rem;
  }
}

#resultContainer {
  margin-top: 1rem;
  gap: 0.5rem;
  align-items: center;
}

#shortLink {
  color: var(--neon);
  text-decoration: underline;
  cursor: pointer;
}

#message {
  opacity: 0;
  transition: opacity 0.3s ease;
  color: var(--neon);
}
