:root {
  --bg1: #050816;
  --bg2: #10072f;
  --accent: #5b8dff;
  --accent2: #ff6bcb;
  --glass-bg: rgba(255, 255, 255, 0.08);
  --glass-border: rgba(255, 255, 255, 0.35);
  --radius-lg: 24px;
  --blur: 24px;
}

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

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text", sans-serif;
  color: #f5f5ff;
  min-height: 100vh;
  background: radial-gradient(circle at 0% 0%, #1b1635, var(--bg1)),
              radial-gradient(circle at 100% 100%, #28104a, var(--bg2));
  overflow-x: hidden;
}

/* Animated background */
.bg-animated {
  position: fixed;
  inset: -30%;
  background: conic-gradient(
    from 180deg,
    rgba(91, 141, 255, 0.25),
    rgba(255, 107, 203, 0.25),
    rgba(91, 141, 255, 0.1)
  );
  filter: blur(80px);
  opacity: 0.7;
  animation: rotateGradient 30s linear infinite;
  z-index: -2;
}

@keyframes rotateGradient {
  0%   { transform: rotate(0deg) scale(1.1); }
  50%  { transform: rotate(180deg) scale(1.2); }
  100% { transform: rotate(360deg) scale(1.1); }
}

/* glass */
.glass {
  background: radial-gradient(circle at 0 0, rgba(255, 255, 255, 0.16), transparent 55%),
              var(--glass-bg);
  border-radius: var(--radius-lg);
  border: 1px solid var(--glass-border);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.04) inset,
    0 20px 60px rgba(0, 0, 0, 0.65),
    0 0 60px rgba(91, 141, 255, 0.25);
  backdrop-filter: blur(var(--blur)) saturate(140%);
  -webkit-backdrop-filter: blur(var(--blur)) saturate(140%);
  position: relative;
  overflow: hidden;
}
.glass::before {
  content: "";
  position: absolute;
  inset: -40%;
  background:
    radial-gradient(circle at 10% 0%, rgba(255, 255, 255, 0.2), transparent 50%),
    radial-gradient(circle at 80% 120%, rgba(255, 107, 203, 0.18), transparent 60%);
  mix-blend-mode: screen;
  opacity: 0.7;
  animation: liquidMove 18s ease-in-out infinite alternate;
  pointer-events: none;
}

@keyframes liquidMove {
  0%   { transform: translate3d(-5%, -5%, 0) rotate(0deg); }
  50%  { transform: translate3d(5%, 10%, 0) rotate(6deg); }
  100% { transform: translate3d(-3%, 5%, 0) rotate(-4deg); }
}

.page-shell {
  position: relative;
  z-index: 1;
}

/* navbar */
.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 32px;
  margin: 16px auto;
  max-width: 1120px;
}
.logo {
  font-weight: 700;
  letter-spacing: 0.04em;
}
.logo span {
  color: var(--accent2);
}
.navbar nav a {
  color: #f5f5ff;
  text-decoration: none;
  margin-left: 20px;
  font-size: 0.9rem;
  opacity: 0.85;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.navbar nav a:hover {
  opacity: 1;
  transform: translateY(-1px);
}

/* hero */
.hero {
  display: flex;
  justify-content: center;
  padding: 40px 16px 16px;
}
.hero-content {
  max-width: 960px;
  padding: 28px 32px 32px;
  text-align: left;
}
.hero h1 {
  font-size: clamp(2rem, 3.2vw, 2.8rem);
  margin: 0 0 10px;
}
.hero p {
  margin: 0 0 24px;
  opacity: 0.9;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}
.search {
  flex: 1 1 260px;
  min-width: 0;
  padding: 10px 14px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 999px;
  color: #f5f5ff;
  outline: none;
  background: rgba(3, 7, 18, 0.45);
  box-shadow: 0 0 0 1px rgba(0,0,0,0.35) inset;
}
.search::placeholder {
  color: rgba(245, 245, 255, 0.58);
}
.btn-primary {
  border-radius: 999px;
  padding: 10px 18px;
  border: 1px solid rgba(255, 255, 255, 0.4);
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: #050816;
  font-weight: 600;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  white-space: nowrap;
}
.btn-primary:hover {
  transform: translateY(-1px) scale(1.02);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.6);
}

/* tools */
.tools-section-title {
  max-width: 1120px;
  margin: 0 auto;
  padding: 8px 18px 2px;
  opacity: 0.85;
  font-size: 0.95rem;
}

.tools-grid {
  max-width: 1120px;
  margin: 8px auto 40px;
  padding: 0 16px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
}
.tool-card {
  padding: 18px 18px 20px;
  cursor: pointer;
  transform: translateY(0) translateZ(0);
  transition:
    transform 0.24s ease,
    box-shadow 0.24s ease,
    border-color 0.24s ease,
    background 0.24s ease;
}
.tool-card h2 {
  font-size: 1.05rem;
  margin: 0 0 6px;
}
.tool-card p {
  margin: 0;
  font-size: 0.9rem;
  opacity: 0.86;
}
.tool-card:hover {
  transform: translateY(-4px) scale(1.02);
  border-color: rgba(255, 255, 255, 0.55);
  box-shadow:
    0 26px 80px rgba(0, 0, 0, 0.9),
    0 0 80px rgba(255, 107, 203, 0.32);
  background: radial-gradient(circle at 0 0, rgba(255,255,255,0.22), transparent 55%),
              rgba(255,255,255,0.11);
}

/* about */
.about {
  max-width: 860px;
  margin: 0 auto 40px;
  padding: 24px 24px 26px;
}
.about h2 {
  margin-top: 0;
}

/* modal */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at 10% 0, rgba(5,5,15,0.9), rgba(3,3,10,0.95));
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  z-index: 20;
}
.modal-backdrop.active {
  display: flex;
}
.modal {
  max-width: 720px;
  width: 100%;
  padding: 22px 22px 20px;
}
.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
  position: relative;
  z-index: 1;
}
.modal-title {
  font-size: 1.25rem;
  margin: 0;
}
.modal-close {
  background: transparent;
  border: none;
  color: #f5f5ff;
  font-size: 1.4rem;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 999px;
}
.modal-close:hover {
  background: rgba(255,255,255,0.12);
}
.modal-body {
  position: relative;
  z-index: 1;
  font-size: 0.92rem;
}
.modal-body label {
  display: block;
  margin-bottom: 4px;
  opacity: 0.8;
}
.modal-body input,
.modal-body textarea,
.modal-body select {
  width: 100%;
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(5, 8, 22, 0.8);
  color: #f5f5ff;
  outline: none;
  margin-bottom: 10px;
  font-family: inherit;
  font-size: 0.9rem;
}
.modal-body textarea {
  resize: vertical;
  min-height: 80px;
  max-height: 200px;
}
.modal-body .result {
  margin-top: 6px;
  padding: 10px 10px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.28);
  background: rgba(5, 8, 22, 0.85);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 0.85rem;
  word-break: break-all;
  white-space: pre-wrap;
}
.btn-secondary {
  border-radius: 12px;
  padding: 8px 14px;
  border: 1px solid rgba(255,255,255,0.32);
  background: rgba(7, 12, 30, 0.9);
  color: #f5f5ff;
  cursor: pointer;
  font-size: 0.9rem;
  margin-right: 8px;
  transition: background 0.18s ease, transform 0.18s ease;
}
.btn-secondary:hover {
  background: rgba(16, 23, 50, 1);
  transform: translateY(-1px);
}

/* responsive */
@media (max-width: 640px) {
  .navbar {
    padding: 10px 14px;
    margin: 10px;
  }
  .navbar nav {
    display: none;
  }
  .hero-content {
    padding: 20px 18px 22px;
  }
  .tools-grid {
    gap: 14px;
  }
  .modal {
    padding: 18px 16px 16px;
  }
}

.footer {
  max-width: 1120px;
  margin: 0 auto 24px;
  padding: 12px 20px;
  font-size: 0.86rem;
}
.footer-inner {
  display: flex;
  gap: 16px;
  align-items: center;
  flex-wrap: wrap;
  opacity: 0.9;
}
.footer-inner a {
  color: #f5f5ff;
  text-decoration: none;
  opacity: 0.85;
}
.footer-inner a:hover {
  opacity: 1;
  text-decoration: underline;
}

