
:root{
  --bg:#180031;
  --card:rgba(255,255,255,.06);
  --stroke:rgba(255,255,255,.10);
  --text:#ffffff;
  --muted:rgba(255,255,255,.78);
  --muted2:rgba(255,255,255,.62);
  --btn:#2DA8FF; /* tech sky blue */
  --btnText:#ffffff;
  --ghost:rgba(255,255,255,.10);
  --ghostHover:rgba(255,255,255,.16);
  --shadow:0 28px 80px rgba(0,0,0,.45);
  --focus: 0 0 0 4px rgba(45,168,255,.22);
}

.ttfd-theme-light{
  --bg:#f6f2ff;
  --card:#ffffff;
  --stroke:rgba(16,24,40,.10);
  --text:#0f172a;
  --muted:rgba(15,23,42,.80);
  --muted2:rgba(15,23,42,.65);
  --btn:#2DA8FF;
  --btnText:#ffffff;
  --ghost:rgba(15,23,42,.08);
  --ghostHover:rgba(15,23,42,.12);
  --shadow:0 24px 70px rgba(2,6,23,.18);
  --focus: 0 0 0 4px rgba(45,168,255,.20);
}

.ttfd-page{
  min-height:100vh;
  background:var(--bg);
  color:var(--text);
  padding:0;
  box-sizing:border-box;
  font-family:ui-sans-serif,system-ui,-apple-system,Segoe UI,Roboto,Arial;
  display:flex;
  flex-direction:column;
}

.ttfd-sr-only{
  position:absolute;
  width:1px;
  height:1px;
  padding:0;
  margin:-1px;
  overflow:hidden;
  clip:rect(0,0,0,0);
  white-space:nowrap;
  border:0;
}

.ttfd-shell{
  width:100%;
  max-width:980px;
  margin:auto auto;
}

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

.ttfd-brand{display:flex; align-items:center; gap:14px; min-width:0;}
.ttfd-logo{width:140px; height:auto; max-width:60vw; flex:0 0 auto;}
.ttfd-sub{margin:0; color:var(--muted); font-size:14px;}

.ttfd-card{
  background:var(--card);
  border:1px solid var(--stroke);
  border-radius:18px;
  padding:18px;
  box-shadow:var(--shadow);
  backdrop-filter: blur(10px);
}

.ttfd-grid{display:grid; gap:14px;}
.ttfd-field label{display:block; font-weight:600; margin:0 0 8px; font-size:13px; color:var(--muted);}

.ttfd-input-row{display:flex; gap:10px; align-items:stretch;}
.ttfd-textarea-row{align-items:flex-start;}

input, textarea, select{
  width:100%;
  box-sizing:border-box;
  padding:12px 12px;
  border-radius:12px;
  border:1px solid var(--stroke);
  background:rgba(0,0,0,.14);
  color:var(--text);
  outline:none;
  font-size:14px;
}

input:focus, textarea:focus, select:focus, .ttfd-switch input:focus-visible + .ttfd-slider{
  box-shadow:var(--focus);
  border-color:rgba(45,168,255,.55);
}

.ttfd-theme-light input,
.ttfd-theme-light textarea,
.ttfd-theme-light select{
  background:rgba(15,23,42,.03);
}

textarea{resize:vertical; min-height:220px;}

.ttfd-btn{
  border:none;
  border-radius:12px;
  padding:11px 14px;
  font-weight:600;
  font-size:14px;
  cursor:pointer;
  white-space:nowrap;
  transition:transform .06s ease, opacity .12s ease, background .12s ease;
}

.ttfd-btn:active{transform:translateY(1px);}

.ttfd-btn-primary{
  background:var(--btn);
  font-size:14px;
  color:var(--btnText);
}

.ttfd-btn-primary:hover{opacity:.95;}

.ttfd-btn-ghost{
  background:var(--ghost);
  color:var(--text);
  font-size:14px;
  font-weight:600;
  border:1px solid var(--stroke);
}

.ttfd-btn-ghost:hover{background:var(--ghostHover);}

.ttfd-actions{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  justify-content:flex-start;
  padding-top:4px;
}

.ttfd-drop{
  border:1px dashed rgba(255,255,255,.22);
  border-radius:16px;
  padding:14px;
  background:rgba(0,0,0,.10);
}

.ttfd-theme-light .ttfd-drop{
  border-color:rgba(15,23,42,.18);
  background:rgba(15,23,42,.02);
}

.ttfd-drop.is-over{
  border-color:rgba(45,168,255,.85);
  box-shadow:0 0 0 4px rgba(45,168,255,.18);
}

.ttfd-drop-hint{
  display:flex;
  align-items:center;
  gap:10px;
  margin:0 0 12px;
  color:var(--muted2);
  font-size:13px;
}

.ttfd-dot{
  width:10px;
  height:10px;
  border-radius:999px;
  background:var(--btn);
  box-shadow:0 0 0 6px rgba(45,168,255,.16);
  flex:0 0 auto;
}

.ttfd-help{
  margin:10px 2px 0;
  color:var(--muted2);
  font-size:12.5px;
}

.ttfd-footer{
  text-align:center;
  color:var(--muted2);
  font-size:12.5px;
}

.ttfd-legal{
  display:flex;
  justify-content:center;
  gap:10px;
  align-items:center;
  margin-bottom:6px;
}

.ttfd-legal a{
  color:var(--text);
  text-decoration:underline;
  text-underline-offset:3px;
  opacity:.9;
}

.ttfd-bmc-link{
  display:inline-flex;
  align-items:center;
  text-decoration:none;
  opacity:1;
}

.ttfd-bmc-logo{
  width:auto;
  height:28px;
  flex:0 0 auto;
}

/* Toggle switch */
.ttfd-toggle{
  display:flex;
  align-items:center;
  gap:10px;
  color:var(--muted2);
  font-size:13px;
  user-select:none;
}

.ttfd-switch{
  position:relative;
  display:inline-block;
  width:54px;
  height:30px;
}

.ttfd-switch input{
  opacity:0;
  width:0;
  height:0;
}

.ttfd-slider{
  position:absolute;
  cursor:pointer;
  top:0; left:0; right:0; bottom:0;
  background:rgba(255,255,255,.18);
  border:1px solid var(--stroke);
  transition:.15s ease;
  border-radius:999px;
}

.ttfd-slider:before{
  position:absolute;
  content:"";
  height:22px;
  width:22px;
  left:4px;
  top:50%;
  transform:translateY(-50%);
  background:rgba(255,255,255,.92);
  transition:.15s ease;
  border-radius:999px;
}

.ttfd-switch input:checked + .ttfd-slider{
  background:rgba(45,168,255,.30);
  border-color:rgba(45,168,255,.55);
}

.ttfd-switch input:checked + .ttfd-slider:before{
  transform:translate(24px,-50%);
  background:var(--btn);
}

body{margin:0;background:var(--bg);}

.ttfd-topbar{
  position:sticky;
  top:0;
  z-index:20;
  background:var(--bg);
  padding:16px 16px;
}

.ttfd-bottombar{
  background:var(--bg);
  padding:14px 16px;
}

.ttfd-mainwrap{
  flex:1;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:22px 16px;
}

.ttfd-footer{
  text-align:center;
  color:var(--muted2);
  font-size:12.5px;
}

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


/* Logo swap (dark vs light theme) */
.ttfd-logo--dark{display:block;}
.ttfd-logo--light{display:none;}
.ttfd-theme-light .ttfd-logo--dark{display:none;}
.ttfd-theme-light .ttfd-logo--light{display:block;}

@media (max-width:720px){
  .ttfd-topbar{padding:10px 12px;}
  .ttfd-header{flex-direction:row; align-items:center; gap:10px;}
  .ttfd-brand{flex:1 1 auto; min-width:0;}
  .ttfd-logo{width:126px; max-width:42vw;}
  .ttfd-sub{display:none;}
  .ttfd-toggle{gap:8px; font-size:12px; flex:0 0 auto;}
  .ttfd-switch{width:48px; height:26px;}
  .ttfd-slider:before{width:18px; height:18px; left:3px;}
  .ttfd-switch input:checked + .ttfd-slider:before{transform:translate(21px,-50%);}
  .ttfd-mainwrap{justify-content:flex-start; padding:10px 12px 16px;}
}

@media (min-width:721px){
  .ttfd-mainwrap{justify-content:flex-start; padding:14px 16px 24px;}
}
