:root {
  /* Your palette */
  --primary: #ff5c5c;
  --secondary: #ffd93d;
  --accent: #6bcb77;
  --highlight: #4d96ff;

  --bg-deep: #050816;
  --bg-card: #111827;
  --bg-card-soft: #1f2937;

  --text-main: #f9fafb;
  --text-muted: #9ca3af;
  --border-subtle: rgba(249, 250, 251, 0.08);
  --shadow-soft: 0 16px 40px rgba(0, 0, 0, 0.35);

  --radius-card: 18px;
  --radius-pill: 999px;
  --transition-fast: 0.18s ease-out;
}

/* Reset */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

/* Body */

body {
  min-height: 100vh;
  background: radial-gradient(circle at top, #1f2937 0, #030712 55%, #020617 100%);
  color: var(--text-main);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  position: relative;
  overflow-x: hidden;
}

/* Retro brand font just for main title */
.site-title {
  font-family: "Luckiest Guy", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* Neon orbit background shapes */

.bg-orbits,
.bg-shapes {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -2;
}

.bg-orbits::before,
.bg-orbits::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.65;
}

.bg-orbits::before {
  width: 420px;
  height: 420px;
  background: radial-gradient(circle, rgba(255, 92, 92, 0.25), transparent 70%);
  top: -80px;
  left: -60px;
}

.bg-orbits::after {
  width: 420px;
  height: 420px;
  background: radial-gradient(circle, rgba(77, 150, 255, 0.35), transparent 70%);
  bottom: -120px;
  right: -80px;
}

.bg-shapes::before,
.bg-shapes::after {
  content: "";
  position: absolute;
  border-radius: 24px;
  border: 2px solid rgba(255, 217, 61, 0.5);
  transform: rotate(-8deg);
  opacity: 0.35;
}

.bg-shapes::before {
  width: 160px;
  height: 80px;
  top: 18%;
  right: 12%;
}

.bg-shapes::after {
  width: 130px;
  height: 70px;
  bottom: 20%;
  left: 6%;
  border-color: rgba(107, 203, 119, 0.7);
}

/* Layout */

.site-header {
  padding: 1.4rem 1.4rem 0.8rem;
}

.logo-area {
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* New style for the image logo */
.site-logo {
  width: 64px; /* Set the desired width */
  height: 64px; /* Set the desired height */
  /* Optional: You can add border-radius if your image is square 
     and you want rounded corners, or other effects. */
  /* border-radius: 22px; */
}

/* Keep the .logo-area style to align the logo and text */
.logo-area {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.brand-text {
  transform: skewX(-6deg);
}

.site-title {
  margin: 0;
  font-size: 1.7rem;
  letter-spacing: 0.04em;
  text-shadow:
    0 0 14px rgba(77, 150, 255, 0.75),
    0 0 30px rgba(255, 92, 92, 0.7);
}

.site-subtitle {
  margin: 0.15rem 0 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}

main {
  padding: 0.4rem 1.4rem 1.6rem;
}

.hero {
  margin-bottom: 0.9rem;
}

.hero-tagline {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-muted);
  max-width: 520px;
}

.tool-search {
  margin-bottom: 0.9rem;
}

.search-input {
  max-width: 420px;
  border-radius: 999px;
  padding: 0.6rem 0.9rem;
  font-size: 0.9rem;
}

/* Tools grid */

.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
}

/* Cards */

.tool-card {
  background: linear-gradient(145deg, rgba(15, 23, 42, 0.98), rgba(17, 24, 39, 0.95));
  border-radius: var(--radius-card);
  padding: 1rem 1rem 1.15rem;
  border: 1px solid rgba(148, 163, 184, 0.45);
  box-shadow: var(--shadow-soft);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  isolation: isolate;
  transition:
    transform var(--transition-fast),
    box-shadow var(--transition-fast),
    border-color var(--transition-fast),
    background var(--transition-fast);
}

.tool-card::before {
  content: "";
  position: absolute;
  inset: -40%;
  background:
    radial-gradient(circle at 0 0, rgba(255, 92, 92, 0.18), transparent 70%),
    radial-gradient(circle at 100% 100%, rgba(77, 150, 255, 0.18), transparent 70%);
  opacity: 0;
  transition: opacity 0.2s ease-out;
  z-index: -1;
}

.tool-card:hover,
.tool-card:focus-within {
  transform: translateY(-3px) rotate(-0.2deg);
  border-color: rgba(255, 217, 61, 0.8);
  box-shadow:
    0 22px 60px rgba(0, 0, 0, 0.7),
    0 0 30px rgba(255, 92, 92, 0.3);
}

.tool-card:hover::before,
.tool-card:focus-within::before {
  opacity: 1;
}

.tool-header {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.75rem;
}

.tool-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.2rem;
  height: 2.2rem;
  border-radius: var(--radius-pill);
  background: radial-gradient(circle at 30% 0, #ffd93d, #ff5c5c 70%);
  color: #111827;
  font-size: 1.2rem;
  box-shadow:
    0 0 12px rgba(255, 217, 61, 0.9),
    0 0 7px rgba(255, 92, 92, 0.7);
}

.tool-title {
  margin: 0;
  font-size: 1rem;
}

/* Generic body */

.tool-body {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

/* Inputs */

.tool-textarea,
.tool-input,
.inline-inputs input {
  width: 100%;
  border-radius: 14px;
  border: 1px solid var(--border-subtle);
  padding: 0.6rem 0.75rem;
  font-family: inherit;
  font-size: 0.9rem;
  resize: vertical;
  min-height: 60px;
  color: var(--text-main);
  background: radial-gradient(circle at 0 0, #111827, #020617);
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.8);
  transition:
    border-color var(--transition-fast),
    box-shadow var(--transition-fast),
    background-color var(--transition-fast),
    transform var(--transition-fast);
}

.tool-textarea::placeholder,
.tool-input::placeholder {
  color: rgba(148, 163, 184, 0.8);
}

.tool-textarea:focus,
.tool-input:focus,
.inline-inputs input:focus {
  border-color: var(--highlight);
  box-shadow:
    0 0 0 1px rgba(77, 150, 255, 0.6),
    0 0 15px rgba(77, 150, 255, 0.45);
  outline: none;
}

/* Color input */

#color-input {
  width: 100%;
  height: 42px;
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.7);
  padding: 0;
  background: #020617;
  cursor: pointer;
}

/* Buttons */

.tool-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

button {
  border-radius: 999px;
  border: 1px solid rgba(15, 23, 42, 0.95);
  padding: 0.4rem 1rem;
  font-size: 0.83rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  color: #020617;
  background: linear-gradient(135deg, var(--secondary), var(--primary));
  box-shadow:
    0 12px 25px rgba(0, 0, 0, 0.5),
    0 0 14px rgba(255, 217, 61, 0.7);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  transform: translateY(0);
  transition:
    transform var(--transition-fast),
    box-shadow var(--transition-fast),
    filter var(--transition-fast),
    background-position var(--transition-fast);
  background-size: 160% 160%;
  background-position: 0% 50%;
}

button:hover,
button:focus-visible {
  outline: none;
  transform: translateY(-1px) scale(1.01);
  box-shadow:
    0 18px 38px rgba(0, 0, 0, 0.7),
    0 0 18px rgba(255, 92, 92, 0.8);
  background-position: 100% 50%;
}

button:active {
  transform: translateY(0) scale(0.99);
  box-shadow:
    0 6px 16px rgba(0, 0, 0, 0.6),
    0 0 12px rgba(255, 92, 92, 0.7);
  filter: brightness(0.98);
}

/* Inline inputs */

.inline-inputs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.inline-inputs label {
  display: flex;
  flex-direction: column;
  font-size: 0.78rem;
  color: var(--text-muted);
  flex: 1 1 80px;
}

/* Counter */

.counter-stats {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Color display */

.color-display {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
}

.color-display code {
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: rgba(77, 150, 255, 0.18);
  border: 1px solid rgba(148, 163, 184, 0.7);
}

/* Notepad */

.tool-hint {
  margin: 0;
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Timers */

.timer-display {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono",
    "Courier New", monospace;
  font-size: 1.2rem;
  letter-spacing: 0.06em;
  padding: 0.35rem 0.7rem;
  border-radius: 14px;
  background: radial-gradient(circle at 10% 0, rgba(77, 150, 255, 0.2), #020617 80%);
  text-align: center;
  border: 1px solid rgba(148, 163, 184, 0.7);
}

/* Results */

.tool-result {
  font-size: 1rem;
  text-align: center;
  margin: 0.3rem 0 0;
}

/* QR */

.qr-output {
  margin-top: 0.5rem;
  display: flex;
  justify-content: center;
}

/* Footer */

.site-footer {
  text-align: center;
  padding: 0.8rem 1.4rem 1.4rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Responsive */

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

  main {
    padding-inline: 1rem;
  }

  .tools-grid {
    grid-template-columns: 1fr;
  }

  .logo-badge {
    width: 58px;
    height: 58px;
  }

  .tool-card {
    padding-inline: 0.9rem;
  }
}
