:root{
  --bg:#ffffff;
  --surface:#ffffff;
  --card:#ffffff;
  --text:#0f172a;
  --muted:#64748b;
  --border:#e2e8f0;
  --shadow: 0 8px 30px rgba(15,23,42,.08);

  --pill:#f1f5f9;
  --pillHover:#e9eef5;
  --pillActive:#0f172a;
  --pillActiveText:#ffffff;

  --radius:18px;
  --max:1080px;
  --font: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial;
}

[data-theme="dark"]{
  --bg:#0b1220;
  --surface:#0f172a;
  --card:#0f172a;
  --text:#e5e7eb;
  --muted:#9ca3af;
  --border:#243044;
  --shadow: 0 10px 40px rgba(0,0,0,.35);

  --pill:#111b2d;
  --pillHover:#16233a;
  --pillActive:#e5e7eb;
  --pillActiveText:#0b1220;
}

*{ box-sizing:border-box; }
html,body{ height:100%; }
body{
  margin:0;
  font-family:var(--font);
  color:var(--text);
  background:var(--bg);
}

.container{ max-width:var(--max); margin:0 auto; padding:0 18px; }
.main{ padding:26px 0 40px; }

/* ===== Header ===== */
.site-header{
  position:sticky; top:0; z-index:50;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: blur(10px);
  border-bottom:1px solid var(--border);
}

.site-header .container{
  padding:10px 18px;
}

.header-inner{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:18px;
}

.brand{
  display:flex; align-items:center; gap:10px;
  text-decoration:none; color:var(--text);
  font-weight:800;
}

.brand__dot,
.brand-dot{
  width:10px; height:10px; border-radius:999px;
  background:#111;
  display:inline-block;

  /* 2 pulses then stop */
  animation: dotPulse 1.8s ease-in-out 2;
}
@keyframes dotPulse{
  0%{ transform: scale(1); opacity:.85; }
  50%{ transform: scale(1.7); opacity:.30; }
  100%{ transform: scale(1); opacity:.85; }
}

.nav-panel{
  display:flex;
  gap:12px;
  align-items:center;
  flex-wrap:wrap;
}

.nav-wrap{
  display:flex;
  align-items:center;
  gap:10px;
  position:relative;
}

.nav-toggle{
  display:none;
  background:none;
  border:none;
  font-size:20px;
}

.nav-panel .nav-item{
  display:inline-flex;
  align-items:center;
  gap:6px;
  text-decoration:none;
  color:var(--text);
  font-size:14px;
  font-weight:600;
  padding:8px 14px;
  border-radius:999px;
  background:var(--pill);
  border:1px solid color-mix(in srgb, var(--text) 8%, transparent);
  white-space:nowrap;
}

.nav-panel .nav-item:hover{
  background:var(--pillHover);
}

.nav-panel .nav-item.is-active{
  background:var(--pillActive);
  color:var(--pillActiveText);
  border-color:transparent;
}

.nav-panel button.nav-item{
  cursor:pointer;
}

.btn--sm{
  padding:8px 12px;
  font-size:13px;
}

/* ===== Hero ===== */
.hero{ padding:18px 0 18px; }
.eyebrow{ margin:0 0 10px; color:var(--muted); font-size:14px; }
.h1{ margin:0 0 10px; font-size:42px; letter-spacing:-0.02em; line-height:1.05; }
.sub{ margin:0; color:var(--muted); max-width:70ch; line-height:1.5; }

/* Hero title animation (blinds flip) */
.blind-title{
  display:inline-block;
  perspective:900px;
  cursor:pointer;
}
.blind-title .char{
  display:inline-block;
  transform-style:preserve-3d;
  transition: transform .55s cubic-bezier(.65,0,.35,1), opacity .55s ease;
  transform-origin:center center;
  white-space:pre;
}
.blind-title .char.flipping{
  transform:rotateX(90deg);
  opacity:.5;
}

/* ===== Card / Tool ===== */
.card{
  background:var(--card);
  border:1px solid var(--border);
  border-radius:var(--radius);
  box-shadow:var(--shadow);
  padding:18px;
}

.tool-top{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:14px;
  flex-wrap:wrap;
}

.label{ font-size:14px; color:var(--muted); }
.switch{ display:flex; gap:10px; align-items:center; color:var(--muted); font-size:14px; user-select:none; }
.switch input{ transform:scale(1.1); }

.textarea{
  width:100%;
  margin-top:10px;
  padding:14px 14px;
  border-radius:14px;
  border:1px solid var(--border);
  background:color-mix(in srgb, var(--card) 92%, var(--bg));
  color:var(--text);
  font-size:16px;
  line-height:1.45;
  resize:vertical;
  outline:none;
  min-height:220px;
}
.textarea:focus{ border-color: color-mix(in srgb, var(--text) 25%, var(--border)); }

.convert-buttons{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  margin-top:12px;
}

.btn{
  appearance:none;
  border:1px solid transparent;
  background:var(--pillActive);
  color:var(--pillActiveText);
  padding:12px 14px;
  border-radius:999px;
  cursor:pointer;
  font-weight:700;
  font-size:14px;
  line-height:1;
}
.btn:hover{ opacity:.92; }
.btn:active{ transform: translateY(1px); }

.btn--ghost{
  background:var(--pill);
  color:var(--text);
  border-color:var(--border);
  font-weight:700;
}

.tool-bottom{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
  margin-top:12px;
  flex-wrap:wrap;
}

.muted{ color:var(--muted); font-size:14px; }

.actions{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  justify-content:flex-end;
}

/* Copy button – minimalist, ușor evidențiat */
#copyBtn{
  border-color: rgba(134, 156, 193, 1);
  color: rgba(0, 0, 0, 1);
  background:color-mix(in srgb, var(--pill) 88%, transparent);
  box-shadow:0 0 0 1px color-mix(in srgb, var(--text) 6%, transparent);
}

#copyBtn:hover{
  background:color-mix(in srgb, var(--pillHover) 90%, transparent);
  box-shadow:0 4px 16px rgba(15,23,42,.10);
}

#copyBtn:active{
  transform:translateY(1px);
  box-shadow:0 0 0 rgba(0,0,0,0);
}

/* Toast */
.toast{
  margin-top:12px;
  padding:10px 12px;
  border-radius:14px;
  background:color-mix(in srgb, var(--pill) 78%, transparent);
  border:1px solid var(--border);
  color:var(--text);
  display:none;
}

/* Footer */
.footer{
  border-top:1px solid var(--border);
  padding:18px 0;
}
.footer-inner{
  display:flex; justify-content:space-between; gap:12px;
  flex-wrap:wrap; align-items:center;
}
.footer a{ color:var(--muted); text-decoration:none; margin-left:12px; }
.footer a:hover{ color:var(--text); }

/* ===== Mobile: hamburger dropdown + layout tweaks ===== */
@media (max-width: 820px){
  .nav-panel{ display:none; }        /* hide pills */
  .nav-toggle{ display:inline-flex; align-items:center; gap:8px; padding:8px 10px; border:1px solid var(--border); border-radius:12px; background:var(--pill); cursor:pointer; }

  .bars{ font-size:18px; }

  .nav-wrap.is-open .nav-panel{
    display:flex;
    position:absolute;
    right:0;
    top: calc(100% + 10px);
    min-width: 240px;
    flex-direction:column;
    align-items:stretch;
    gap:10px;
    padding:12px;
    background:var(--surface);
    border:1px solid var(--border);
    border-radius:16px;
    box-shadow:var(--shadow);
  }

  .nav-wrap.is-open .nav-item{
    width:100%;
    justify-content:flex-start;
  }

  .h1{ font-size:34px; }
  .textarea{ min-height:200px; }

  /* Mobile: Copy full width, counts under */
  .tool-bottom{ flex-direction:column; align-items:stretch; }
  .actions{ width:100%; justify-content:stretch; }
  .actions .btn-ghost{ width:100%; justify-content:center; padding:14px 14px; border-radius:16px; }
  .muted{ width:100%; text-align:left; }
}
