:root {
  --navy-900: #0a1733;
  --navy-800: #0f2350;
  --blue-600: #2563eb;
  --indigo-500: #6366f1;
  --cyan-500: #06b6d4;
  --cyan-400: #22d3ee;
  --text-dark: #0e1626;
  --text-body: #3a4459;
  --text-light: #6b7691;
  --bg-light: #f5f7fc;
  --bg-soft: #eef2fb;
  --card-shadow: 0 18px 50px -22px rgba(15, 35, 80, 0.35);
  --grad-brand: linear-gradient(120deg, #2563eb 0%, #4f46e5 45%, #06b6d4 100%);
  --grad-text: linear-gradient(120deg, #1d4ed8 0%, #6366f1 50%, #06b6d4 100%);
  --radius: 18px;
}

* { box-sizing: border-box; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  padding: 0 0 4rem;
  margin: 0;
  background:
    radial-gradient(900px 500px at 85% -8%, rgba(34, 211, 238, 0.10), transparent 60%),
    radial-gradient(800px 500px at 5% 4%, rgba(99, 102, 241, 0.10), transparent 55%),
    var(--bg-light);
  color: var(--text-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

/* Top bar */
.tools-header {
  background: rgba(245, 247, 252, 0.8);
  backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid rgba(20, 45, 99, 0.08);
  position: sticky; top: 0; z-index: 100;
}
.tools-header-inner {
  max-width: 1200px; margin: 0 auto; padding: 0.9rem 1.5rem;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}
.tools-brand {
  display: flex; align-items: center; gap: 0.7rem; text-decoration: none;
  font-size: 1.25rem; font-weight: 800; color: var(--navy-900); letter-spacing: -0.02em;
}
.tools-brand img { width: 34px; height: 34px; }
.tools-back {
  display: inline-flex; align-items: center; gap: 0.5rem; text-decoration: none;
  color: var(--blue-600); font-weight: 600; font-size: 0.92rem;
  padding: 0.5rem 1rem; border-radius: 50px; border: 1px solid rgba(37, 99, 235, 0.25);
  transition: all 0.25s ease;
}
.tools-back:hover { background: var(--blue-600); color: #fff; border-color: transparent; }

/* Hero strip */
.tools-hero { max-width: 1200px; margin: 2.6rem auto 0; padding: 0 1.5rem; text-align: center; }
.tools-eyebrow {
  display: inline-block; font-size: 0.78rem; font-weight: 700; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--blue-600); margin-bottom: 0.7rem;
}
.section-title {
  text-align: center; font-size: clamp(1.8rem, 4vw, 2.6rem); font-weight: 800;
  color: var(--navy-900); letter-spacing: -0.025em; margin: 0 0 0.8rem;
}
.section-title .grad {
  background: var(--grad-text); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.section-description { text-align: center; max-width: 720px; margin: 0 auto; color: var(--text-light); font-size: 1.02rem; }

/* Cards */
.card-container {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 1.4rem; max-width: 1200px; margin: 2.6rem auto 0; padding: 0 1.5rem;
}
.card {
  background: rgba(255, 255, 255, 0.82); backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.7); border-radius: var(--radius);
  box-shadow: var(--card-shadow); padding: 1.6rem; text-align: left;
  transition: transform 0.35s cubic-bezier(0.4,0,0.2,1), box-shadow 0.35s; overflow: hidden;
  font-size: 0.95rem; position: relative;
}
.card::after {
  content: ''; position: absolute; inset: 0 0 auto 0; height: 4px;
  background: var(--grad-brand); transform: scaleX(0); transform-origin: left; transition: transform 0.4s;
}
.card:hover { transform: translateY(-6px); box-shadow: 0 30px 60px -28px rgba(15,35,80,0.5); }
.card:hover::after { transform: scaleX(1); }
.card h2 {
  font-size: 1.25rem; margin: 0 0 1.2rem; color: var(--navy-900); font-weight: 700;
  text-align: left; padding-bottom: 0.7rem; position: relative;
}
.card h2:after {
  content: ""; position: absolute; bottom: 0; left: 0;
  width: 44px; height: 3px; border-radius: 3px; background: var(--grad-brand);
}

label { font-size: 0.9rem; color: var(--text-dark); margin-bottom: 6px; display: block; font-weight: 600; }

input[type="text"], input[type="number"], textarea, select {
  width: 100%; padding: 0.6rem 0.75rem; border: 1px solid #d8e0ee; border-radius: 10px;
  font-size: 0.9rem; margin-bottom: 0.85rem; background: #fff; color: var(--text-dark);
  transition: border-color 0.25s, box-shadow 0.25s; font-family: inherit;
}
input[type="text"]:focus, input[type="number"]:focus, textarea:focus, select:focus {
  border-color: var(--blue-600); outline: none; box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.checkbox-label { display: flex; align-items: center; cursor: pointer; margin-bottom: 0.5rem; font-size: 0.88rem; font-weight: 500; color: var(--text-body); }
.checkbox-label input[type="checkbox"], .checkbox-label input[type="radio"] { margin-right: 8px; width: 16px; height: 16px; accent-color: var(--blue-600); }

button {
  background: var(--grad-brand); color: #fff; border: none; padding: 0.7rem 1rem;
  border-radius: 10px; font-size: 0.92rem; cursor: pointer; font-weight: 600; font-family: inherit;
  display: block; width: 100%; margin-bottom: 0.85rem;
  transition: transform 0.25s ease, box-shadow 0.25s ease; box-shadow: 0 12px 24px -14px rgba(37,99,235,0.8);
}
button:hover { transform: translateY(-2px); box-shadow: 0 16px 30px -14px rgba(37,99,235,0.9); }
button:active { transform: translateY(0); }

textarea { resize: vertical; height: 80px; font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 0.85rem; }

.result-container {
  background: var(--bg-soft); border: 1px solid #e0e6f2; border-radius: 10px;
  padding: 0.85rem; margin-top: 0.5rem; min-height: 44px; word-break: break-all;
  font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 0.88rem; color: var(--navy-900);
}

.time-row { display: flex; gap: 0.6rem; margin-bottom: 0.85rem; }
.time-field { flex: 1; }
.time-field select { margin-bottom: 0; }
.time-field label { font-size: 0.82rem; margin-bottom: 5px; }

.options-group { margin-bottom: 1rem; }
.checkbox-group { display: flex; flex-wrap: wrap; gap: 0.6rem 0.9rem; margin-top: 5px; }
.button-group { display: flex; align-items: center; gap: 0.8rem; margin-bottom: 1rem; }
.button-group button { margin-bottom: 0; width: auto; }
.button-group .checkbox-label { margin-bottom: 0; }

.tools-footer { max-width: 1200px; margin: 3rem auto 0; padding: 1.5rem; text-align: center; color: var(--text-light); font-size: 0.85rem; }
.tools-footer a { color: var(--blue-600); text-decoration: none; }
.tools-footer a:hover { text-decoration: underline; }

@media (max-width: 768px) {
  .card-container { grid-template-columns: 1fr; }
  .time-row { flex-wrap: wrap; }
  .time-field { min-width: calc(33.333% - 10px); }
}
