/* ===========================
   SkyUID v1.2 — Blue→Teal Glossy UI (updates: 256 length, pill-only advanced, themed privacy, strength meter)
   One CSS file only
   =========================== */
:root{
  --bg1:#f6f8ff;
  --bg2:#ffffff;
  --glass:rgba(10,20,60,0.06);
  --border:rgba(10,20,60,0.12);
  --text:#0b1220;
  --muted:#5a6a8a;

  --acc1:#2a98ff;
  --acc2:#12d6b0;

  --radius:16px;
  --shadow:0 18px 50px rgba(10,20,60,0.12);
  --shadow-soft:0 10px 28px rgba(10,20,60,0.10);
  --blur:14px;
}
.theme-dark{
  --bg1:#0b1220;
  --bg2:#0f172a;
  --glass:rgba(255,255,255,0.08);
  --border:rgba(255,255,255,0.16);
  --text:#e9f1ff;
  --muted:#a9b6cf;
  --shadow:0 20px 50px rgba(0,0,0,0.38);
  --shadow-soft:0 12px 30px rgba(0,0,0,0.28);
}

/* Base */
*{box-sizing:border-box}
html,body{height:100%}
html.preload body{opacity:0}
html{background:
    radial-gradient(1200px 800px at 20% -10%, rgba(42,152,255,0.18), transparent 60%),
    radial-gradient(900px 600px at 120% 20%, rgba(18,214,176,0.18), transparent 55%),
    linear-gradient(180deg, var(--bg1), var(--bg2));
  transition: background .4s ease, color .4s ease;
}
body{
  margin:0;
  font-family:'Inter',system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;
  color:var(--text);
  background: transparent;
  overflow-x:hidden;
}

/* Background floating layer */
.bg-layer::before{
  content:"";
  position:fixed; inset:0; pointer-events:none;
  background:
    radial-gradient(900px 600px at 80% 120%, rgba(42,152,255,0.25), transparent 60%),
    radial-gradient(800px 600px at -10% 30%, rgba(18,214,176,0.22), transparent 60%);
  filter: blur(50px);
  animation: floatGrad 20s ease-in-out infinite alternate;
  z-index:-1;
}
.bg-layer{position:fixed; inset:0; z-index:-1;}
@keyframes floatGrad{0%{transform:translateY(0)}100%{transform:translateY(-22px)}}

/* Header */
.site-header{
  position:sticky; top:0; z-index:10;
  backdrop-filter:saturate(140%) blur(10px);
  background:linear-gradient(180deg, rgba(255,255,255,0.7), rgba(255,255,255,0.35));
  border-bottom:1px solid var(--border);
}
.theme-dark .site-header{
  background:linear-gradient(180deg, rgba(15,23,42,0.85), rgba(15,23,42,0.5));
}
.site-header .brand{
  max-width:1200px; margin:0 auto; padding:14px 20px;
  display:flex; align-items:center; gap:10px;
}
.brand-mark{width:26px; height:26px; border-radius:6px;
  background:linear-gradient(135deg, var(--acc1), var(--acc2));
  box-shadow:0 0 0 2px rgba(255,255,255,0.25) inset;
}
.brand-text{font-weight:700; letter-spacing:0.2px}
.header-actions{ position:absolute; right:16px; top:8px; display:flex; gap:8px; }
.icon-btn{
  width:36px; height:36px; border-radius:10px; border:1px solid var(--border);
  background:linear-gradient(135deg, rgba(255,255,255,0.9), rgba(255,255,255,0.6));
  box-shadow:var(--shadow-soft); cursor:pointer;
  display:grid; place-items:center;
}
.theme-dark .icon-btn{
  background:linear-gradient(135deg, rgba(255,255,255,0.08), rgba(255,255,255,0.04));
}
.icon-sun{ width:18px; height:18px; display:inline-block; border-radius:50%;
  background:linear-gradient(135deg, var(--acc1), var(--acc2)); }

/* Layout */
.container{
  max-width:1100px;
  margin:34px auto 60px;
  padding:0 20px;
  display:grid;
  grid-template-columns: 1fr;
  gap:22px;
}
@media (min-width:900px){
  .container{ grid-template-columns: 1.1fr 0.9fr; align-items:start; }
  .card-intro{grid-column:1 / -1}
}

/* Cards (glossy) */
.card{
  position:relative;
  background:linear-gradient(180deg, rgba(255,255,255,0.75), rgba(255,255,255,0.55));
  border:1px solid var(--border);
  box-shadow:var(--shadow);
  border-radius:16px;
  padding:24px;
  backdrop-filter: blur(14px) saturate(130%);
  -webkit-backdrop-filter: blur(14px) saturate(130%);
  overflow:hidden;
  transition: transform .25s ease, background .35s ease, box-shadow .35s ease;
}
.theme-dark .card{
  background:linear-gradient(180deg, rgba(255,255,255,0.14), rgba(255,255,255,0.08));
}
.card::after{
  content:"";
  position:absolute; left:10%; right:10%; top:-40px; height:80px;
  background:linear-gradient(180deg, rgba(255,255,255,0.6), transparent 65%);
  filter:blur(22px); pointer-events:none;
}
.card:hover{ transform: translateY(-2px) }
.card h1,.card h2{margin:0 0 10px}
.card p{margin:0; color:var(--muted)}
.reveal{opacity:0; transform:translateY(20px); animation:reveal .7s ease forwards}
.reveal:nth-child(1){animation-delay:0.05s}
.reveal:nth-child(2){animation-delay:0.15s}
.reveal:nth-child(3){animation-delay:0.25s}
@keyframes reveal{to{opacity:1; transform:translateY(0)}}

/* Form layout */
.grid{ display:grid; gap:14px; margin-top:14px; grid-template-columns:1fr 1fr }
@media (max-width:640px){ .grid{ grid-template-columns:1fr } }
.grid-1{ display:grid; gap:14px; margin-top:14px; grid-template-columns:1fr }
.field span{display:block; font-size:0.95rem; color:#445; margin-bottom:6px}
.theme-dark .field span{color:#dfe7ff}
input[type="text"]{
  width:100%; padding:12px 12px; border-radius:12px; border:1px solid var(--border);
  background:rgba(255,255,255,0.8); color:var(--text); outline:none;
  transition: box-shadow .2s, border-color .2s, transform .05s;
}
.theme-dark input[type="text"]{ background:rgba(255,255,255,0.08); }
input[type="text"]:focus{
  border-color: rgba(42,152,255,0.55);
  box-shadow:0 0 0 4px rgba(42,152,255,0.18);
}

/* Slider */

.slider-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.slider-head span:first-child {
  font-weight: 600;
}

.slider-head strong {
  display: flex;
  align-items: baseline;
  gap: 4px;
  font-weight: 600;
}

.slider-head strong span#lengthValue {
  font-size: 1.1em;
  font-variant-numeric: tabular-nums; /* even spacing for numbers */
}

	.slider-head{display:flex; align-items:center; justify-content:space-between; margin-bottom:8px}
		input[type="range"]{
		  width:100%;
		  appearance:none; height:10px; border-radius:999px;
		  background:linear-gradient(90deg, var(--acc1), var(--acc2));
		  outline:none; border:1px solid var(--border);
		}
		input[type="range"]::-webkit-slider-thumb{
		  appearance:none; width:22px; height:22px; border-radius:6px; background:#fff;
		  border:2px solid rgba(0,0,0,0.12); box-shadow:0 4px 12px rgba(0,0,0,0.18);
		}
		.theme-dark input[type="range"]::-webkit-slider-thumb{
		  background:#eaf3ff; border-color:rgba(0,0,0,0.35);
		}
		.slider-scale{display:flex; justify-content:space-between; font-size:0.85rem; color:var(--muted); margin-top:6px}

.slider-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.slider-head span:first-child {
  font-weight: 600;
}

.slider-head strong {
  display: flex;
  align-items: baseline;
  gap: 4px;
  font-weight: 600;
}

.slider-head strong span#lengthValue {
  font-size: 1.1em;
  font-weight: 700;
  color: var(--acc1); /* accent color for the number */
  font-variant-numeric: tabular-nums; /* even spacing for numbers */
}

.slider-head strong::after {
  content: "chars";
  font-size: 0.85em;
  color: var(--muted);
}
		

/* Pills */
/* Pills */
.pill-bar,
.options-bar {
  display: flex;
  gap: 8px;
}

.pill-bar .pill,
.options-bar .pill {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  white-space: nowrap;
  padding: 10px;
  font-weight: 700;
  font-size: 0.92rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(255,255,255,0.9), rgba(255,255,255,0.7));
  color: #1c2540;
  cursor: pointer;
  transition: background 0.25s ease, box-shadow 0.25s ease, transform 0.1s ease, color 0.25s ease;
}

.theme-dark .pill-bar .pill,
.theme-dark .options-bar .pill {
  background: linear-gradient(180deg, rgba(255,255,255,0.12), rgba(255,255,255,0.06));
  color: #e7f0ff;
}

.pill-bar .pill:hover,
.options-bar .pill:hover {
  background: linear-gradient(135deg, var(--acc1), var(--acc2));
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgba(42,152,255,0.25);
}

.pill-bar .pill.active,
.options-bar .pill.active {
  background: linear-gradient(135deg, var(--acc1), var(--acc2));
  color: #fff;
  border-color: transparent;
  box-shadow: 0 8px 20px rgba(42,152,255,0.25);
}

.pill-bar .pill:active,
.options-bar .pill:active {
  transform: translateY(1px);
  box-shadow: inset 0 0 0 2px rgba(255,255,255,0.25);
}

@media (max-width: 420px) {
  .pill-bar .pill,
  .options-bar .pill {
    padding: 8px;
    font-size: 0.84rem;
    border-radius: 8px;
  }
}

.pill-hint {
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.88rem;
}


/* Presets */
.presets{ display:flex; gap:8px; flex-wrap:nowrap; justify-content:space-between; margin-bottom:10px }
.preset-btn{ flex:1 1 0; min-width:0; white-space:nowrap }
.preset-btn.active{ color:#fff; background:linear-gradient(135deg, var(--acc1), var(--acc2)); border-color:transparent }

/* Buttons */
.btn{
  border:none; cursor:pointer; user-select:none;
  border-radius:12px; padding:12px 16px; font-weight:700;
  color:var(--text); background:rgba(255,255,255,0.7);
  transition: transform .08s ease, box-shadow .25s ease, background .25s ease, color .25s ease;
  box-shadow: var(--shadow-soft);
}
.btn:active{ transform: translateY(1px) }
.btn-primary{
  color:#fff; background: linear-gradient(135deg, var(--acc1), var(--acc2));
  box-shadow: 0 12px 32px rgba(42,152,255,0.35);
}
.btn-primary:hover{ box-shadow: 0 16px 36px rgba(42,152,255,0.45) }
.btn-secondary{ color:#0a1930; background:#fff; }
.theme-dark .btn-secondary{ color:#06101f; background:#eaf1ff }
.btn-ghost{ background:transparent; border:1px solid var(--border); color:inherit; }
.btn.small{ padding:8px 12px; border-radius:10px; font-size:0.9rem }
.actions{ display:flex; gap:12px; flex-wrap:wrap; margin-top:16px }

/* Result */
.result{ display:flex; gap:12px; align-items:stretch; margin-top:16px; flex-wrap:wrap }
.output{
  flex:1 1 340px;
  background:linear-gradient(180deg, rgba(255,255,255,0.9), rgba(255,255,255,0.7));
  border:1px solid var(--border);
  border-radius:12px;
  padding:16px;
  text-align:center;
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-weight:900; font-size:1.7rem; letter-spacing:0.5px;
  min-height:60px;
  display:flex; align-items:center; justify-content:center;
  transition: transform .22s ease, background .22s ease, box-shadow .22s ease, opacity .22s;
  position:relative;
  word-break: break-all;
}
.theme-dark .output{
  background:linear-gradient(180deg, rgba(255,255,255,0.16), rgba(255,255,255,0.10));
}
.output.bump{ transform:scale(1.02); box-shadow:0 12px 28px rgba(42,152,255,0.28) }
.output:hover{ cursor:pointer }
.copied-tip{
  position:absolute; right:10px; top:10px; font-size:0.85rem; padding:4px 8px; border-radius:8px;
  color:#fff; background:linear-gradient(135deg, var(--acc1), var(--acc2));
  opacity:0; transform:translateY(-6px); transition:opacity .2s ease, transform .2s ease;
  pointer-events:none;
}
.copied-tip.show{ opacity:1; transform:translateY(0) }

/* History */
.card-history .history-head{ display:flex; justify-content:space-between; align-items:center; gap:10px; margin-bottom:8px; }
.history-list{ list-style:none; padding:0; margin:0; display:grid; gap:10px; }
.history-list li{
  background:linear-gradient(180deg, rgba(255,255,255,0.9), rgba(255,255,255,0.7));
  border:1px solid var(--border);
  border-left:4px solid transparent;
  border-image: linear-gradient(180deg, var(--acc1), var(--acc2)) 1;
  border-radius:12px; padding:10px 12px;
  font-family: ui-monospace, Menlo, Consolas, monospace;
  display:flex; justify-content:space-between; align-items:center;
  gap:10px; cursor:pointer;
  transition: transform .15s ease, background .2s ease;
  opacity:0; transform:translateY(6px);
  animation: itemIn .25s ease forwards;
}
.theme-dark .history-list li{ background:linear-gradient(180deg, rgba(255,255,255,0.16), rgba(255,255,255,0.10)); }
.history-list li:hover{ transform:translateY(-1px) }
.history-list code{ opacity:0.98; word-break:break-all }
@keyframes itemIn{ to{opacity:1; transform:translateY(0)} }
.muted{ color:var(--muted); margin-top:10px; font-size:0.92rem }
.muted.small{ font-size:0.9rem }
.muted.tiny{ font-size:0.8rem }

/* Cookie banner */
.cookie-banner{
  position: fixed; left:50%; transform:translateX(-50%);
  bottom:-140px;
  display:flex; gap:12px; align-items:center; justify-content:space-between;
  width:min(860px, calc(100% - 24px));
  background: linear-gradient(180deg, rgba(255,255,255,0.9), rgba(255,255,255,0.7));
  border:1px solid var(--border);
  backdrop-filter: blur(12px) saturate(130%);
  -webkit-backdrop-filter: blur(12px) saturate(130%);
  border-radius:14px; padding:12px; z-index:50;
  box-shadow: var(--shadow-soft);
  transition: bottom .45s ease;
}
.theme-dark .cookie-banner{ background: linear-gradient(180deg, rgba(15,23,42,0.85), rgba(15,23,42,0.6)); }
.cookie-banner.show{ bottom:14px }
.cookie-text{ color:inherit; font-size:0.95rem }
.cookie-actions{ display:flex; gap:8px }

/* Footer */
.site-footer{
  max-width:1100px; margin:40px auto 70px; padding:0 20px; color:var(--muted);
  text-align:center;
}

/* A11y */
:focus-visible{ outline:3px solid rgba(42,152,255,0.45); outline-offset:3px; border-radius:10px }

/* Three equal-width inputs */
.grid-3 {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(3, 1fr);
  margin-top: 14px;
}
@media (max-width: 900px) {
  .grid-3 { grid-template-columns: 1fr; }
}

/* Privacy & Analytics */
.privacy-row{
  display:flex; align-items:center; gap:14px; margin-top:12px;
  padding:12px;
  background:linear-gradient(180deg, rgba(255,255,255,0.8), rgba(255,255,255,0.6));
  border:1px solid var(--border);
  border-radius:12px;
  box-shadow: var(--shadow-soft);
}
.theme-dark .privacy-row{
  background:linear-gradient(180deg, rgba(255,255,255,0.14), rgba(255,255,255,0.08));
}
.switch{ position:relative; width:56px; height:32px; display:inline-block }
.switch input{ display:none }
.slider-switch{
  position:absolute; inset:0; border-radius:999px;
  background:linear-gradient(135deg, rgba(255,255,255,0.9), rgba(255,255,255,0.75));
  border:1px solid var(--border);
  transition:background .25s ease, box-shadow .25s ease, border-color .25s ease;
  box-shadow:var(--shadow-soft);
}
.slider-switch::after{
  content:""; position:absolute; width:26px; height:26px; top:2px; left:2px; border-radius:8px;
  background:#fff; box-shadow:0 4px 12px rgba(0,0,0,0.18); transition: left .25s ease;
}
.switch input:checked + .slider-switch{
  background:linear-gradient(135deg, var(--acc1), var(--acc2));
  border-color:transparent;
}
.switch input:checked + .slider-switch::after{ left:28px }

/* Strength Meter (theme-aware) */
.strength-meter {
  width: 100%;
  height: 10px;
  border-radius: 6px;
  background: var(--glass);
  border: 1px solid var(--border);
  overflow: hidden;
  box-shadow: var(--shadow-soft) inset;
}

.strength-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--acc1), var(--acc2));
  transition: width 0.3s ease, background 0.3s ease;
}

.strength-label {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  margin-top: 4px;
}

/* ===========================
   Generate Button (primary action)
   =========================== */
.btn-generate {
  margin-top: 16px;
  width: 100%;
  border: none;
  cursor: pointer;
  user-select: none;
  border-radius: 12px;
  padding: 14px 20px;
  font-weight: 700;
  font-size: 1rem;
  color: #fff;
  background: linear-gradient(135deg, var(--acc2), var(--acc1)); /* reversed gradient */
  box-shadow: 0 12px 32px rgba(18, 214, 176, 0.35);
  transition: transform 0.08s ease, box-shadow 0.25s ease, background 0.25s ease;
}
.btn-generate:hover {
  box-shadow: 0 16px 36px rgba(18, 214, 176, 0.45);
}
.btn-generate:active {
  transform: translateY(1px);
}

/* ===========================
   Output Action Buttons
   =========================== */
.output-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 12px;
}
.output-actions .btn {
  flex: 1 1 calc(25% - 8px);
  padding: 10px 12px;
  font-size: 0.9rem;
  border-radius: 10px;
  text-align: center;
}
@media (max-width: 500px) {
  .output-actions .btn {
    flex: 1 1 100%;
  }
}

/* Tooltip */
.field > span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 4px; /* keeps tooltip from overlapping pills */
}

.tooltip {
  display: inline-flex;
  align-items: center;
  font-size: 0.85em;
  color: var(--acc1);
  cursor: pointer;
  position: relative;
  pointer-events: auto; /* hover/click on icon works */
}

.tooltip-text {
  visibility: hidden;
  pointer-events: none; /* prevents blocking pill clicks */
  width: 240px;
  background-color: var(--bg2);
  color: var(--text);
  text-align: left;
  border-radius: 6px;
  padding: 8px;
  position: absolute;
  z-index: 999;
  bottom: 125%;
  left: 50%;
  transform: translateX(-50%);
  opacity: 0;
  transition: opacity 0.3s;
  font-size: 0.85em;
  box-shadow: var(--shadow-soft);
}

.theme-dark .tooltip-text {
  background-color: var(--bg2);
  color: var(--text);
}

.tooltip:hover .tooltip-text {
  visibility: visible;
  opacity: 1;
}

.tooltip-text::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  margin-left: -5px;
  border-width: 5px;
  border-style: solid;
  border-color: var(--bg2) transparent transparent transparent;
}

.theme-dark .tooltip-text::after {
  border-color: var(--bg2) transparent transparent transparent;
}

/* Copied tip styling */
.copied-tip {
  position: absolute;
  top: -2rem;
  left: 50%;
  transform: translateX(-50%) scale(0.9);
  background: linear-gradient(90deg, #0077b6, #00b4d8);
  color: #fff;
  padding: 4px 10px;
  font-size: 0.75rem;
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
  z-index: 10;
  white-space: nowrap;
}

/* Show state */
.copied-tip.show {
  opacity: 1;
  transform: translateX(-50%) scale(1);
}
.spin-glow {
  animation: spin 0.5s ease forwards;
  box-shadow: 0 0 12px rgba(42,152,255,0.6);
}
@keyframes spin {
  from { transform: rotate(0deg) scale(1); }
  to { transform: rotate(180deg) scale(1.1); }
}
