* { box-sizing:border-box; }
html { overflow-x:clip; color-scheme:light; }
html[data-theme="dark"] { color-scheme:dark; }
body {
  min-height:100vh; margin:0; padding:24px; display:grid; place-items:center;
  overflow-x:clip; background:#fff; color:#000;
  font:15px/1.5 Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  -webkit-tap-highlight-color:transparent;
}
main {
  width:min(520px,100%); padding:42px 34px 32px; background:#fff; color:#000;
  border:1px solid #e7e7e7; border-radius:18px;
  box-shadow:0 14px 36px rgba(0,0,0,.10),0 3px 10px rgba(0,0,0,.05);
}
h1 {
  margin:0 0 28px; text-align:center; font-size:clamp(2.2rem,7vw,3.4rem);
  line-height:1.02; font-weight:850; letter-spacing:-.075em;
}
.coolanas-auth-wrapper { display:flex; justify-content:center; width:100%; }
.coolanas-auth-switch {
  position:relative; display:flex; flex-direction:column; align-items:center;
  width:100%; padding-top:42px;
}
.coolanas-auth-toggle { position:absolute; top:0; left:calc(50% - 25px); width:50px; height:20px; opacity:0; }
.coolanas-auth-slider {
  position:absolute; z-index:3; top:0; left:calc(50% - 25px); width:50px; height:20px;
  border:2px solid #111; border-radius:5px; background:#fff; box-shadow:4px 4px #111;
  cursor:pointer; transition:background .3s ease;
}
.coolanas-auth-slider::before {
  content:""; position:absolute; left:-2px; bottom:2px; width:20px; height:20px;
  border:2px solid #111; border-radius:5px; background:#fff; box-shadow:0 3px 0 #111;
  transition:transform .3s ease;
}
.coolanas-auth-toggle:checked + .coolanas-auth-slider { background:#111; }
.coolanas-auth-toggle:checked + .coolanas-auth-slider::before { transform:translateX(30px); }
.coolanas-auth-card-side { position:absolute; top:0; left:50%; width:1px; height:22px; pointer-events:none; }
.coolanas-auth-card-side::before,.coolanas-auth-card-side::after {
  position:absolute; top:0; width:90px; color:#111; font-weight:700; transition:opacity .25s ease;
}
.coolanas-auth-card-side::before { content:"Log in"; right:42px; text-align:right; text-decoration:underline; }
.coolanas-auth-card-side::after { content:"Sign up"; left:42px; text-align:left; text-decoration:none; }
.coolanas-auth-toggle:checked ~ .coolanas-auth-card-side::before { text-decoration:none; opacity:.55; }
.coolanas-auth-toggle:checked ~ .coolanas-auth-card-side::after { text-decoration:underline; opacity:1; }
.coolanas-auth-flip-inner {
  position:relative; width:min(340px,100%); height:310px; perspective:1000px;
  transform-style:preserve-3d; transition:transform .8s cubic-bezier(.2,.75,.25,1);
}
.coolanas-auth-toggle:checked ~ .coolanas-auth-flip-inner { transform:rotateY(180deg); }
.coolanas-auth-front,.coolanas-auth-back {
  position:absolute; inset:0; display:flex; flex-direction:column; justify-content:center;
  gap:14px; padding:22px 20px; border:2px solid #111; border-radius:7px;
  background:#f1f1f1; box-shadow:4px 4px #111;
  -webkit-backface-visibility:hidden; backface-visibility:hidden;
}
.coolanas-auth-back { transform:rotateY(180deg); }
.coolanas-auth-title { margin:0 0 6px; color:#111; text-align:center; font-size:25px; font-weight:900; }
.coolanas-auth-form { display:flex; flex-direction:column; align-items:center; gap:18px; }
.coolanas-auth-input {
  width:100%; height:46px; padding:7px 12px; border:2px solid #111; border-radius:5px;
  background:#fff; color:#111; box-shadow:4px 4px #111; outline:none;
  font-family:inherit; font-size:15px; font-weight:600; line-height:1.2;
}
.coolanas-auth-input::placeholder { color:#666; opacity:.85; }
.coolanas-auth-input:focus { border-color:#666; box-shadow:4px 4px #666; }
.coolanas-auth-button {
  display:flex; align-items:center; justify-content:center; width:132px; min-height:42px;
  margin:8px 0 0; padding:8px 14px; border:2px solid #111; border-radius:5px;
  background:#fff; color:#111; box-shadow:4px 4px #111; font-family:inherit; font-size:16px; font-weight:700; line-height:1.2;
  cursor:pointer; transition:transform .12s ease,box-shadow .12s ease,background .2s ease;
}
.coolanas-auth-button:active { box-shadow:0 0 #111; transform:translate(3px,3px); }
.coolanas-auth-button:disabled { opacity:.55; cursor:wait; }
.coolanas-auth-toggle:focus-visible + .coolanas-auth-slider { outline:2px solid #777; outline-offset:5px; }
.status { margin:18px 2px 0; color:#a00000; font-size:13px; text-align:center; overflow-wrap:anywhere; }
.status[hidden] { display:none; }
.status.success { color:#176b35; }
.coolanas-auth-legacy { display:flex; justify-content:center; margin-top:24px; }
.coolanas-auth-legacy button {
  display:grid; place-items:center; width:40px; height:40px; padding:9px;
  border:1px solid #ddd; border-radius:8px; background:#fff; cursor:pointer;
}
.coolanas-auth-legacy button img { display:block; width:20px; height:20px; }
.coolanas-auth-legacy button {
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease, background-color .18s ease;
}
.coolanas-auth-legacy button:hover {
  transform: translateY(-2px);
  border-color: #aaa;
  box-shadow: 0 5px 12px rgba(0,0,0,.10);
}
.coolanas-auth-legacy button:active {
  transform: translateY(0) scale(.96);
  box-shadow: 0 1px 3px rgba(0,0,0,.08);
}
@media (prefers-reduced-motion: reduce) {
  .coolanas-auth-legacy button { transition: none; }
}
button:focus-visible { outline:2px solid #777; outline-offset:3px; }
button:disabled { opacity:.55; cursor:wait; }
.theme-toggle {
  position:fixed; top:18px; right:18px; z-index:5; display:grid; place-items:center;
  width:42px; min-width:42px; min-height:42px; padding:0; border:1px solid #111;
  border-radius:50%; background:#fff; color:#111; font:600 13px/1 ui-sans-serif,system-ui,sans-serif;
  cursor:pointer;
}
html[data-theme="dark"] body { background:#111; color:#f5f5f5; }
html[data-theme="dark"] main { background:#1d1d1f; color:#f5f5f5; border-color:#444; }
html[data-theme="dark"] .theme-toggle { background:#292a2d; border-color:#777; color:#f5f5f5; }
@media(max-width:480px) {
  body { padding:16px; }
  main { padding:36px 18px 24px; }
  .coolanas-auth-flip-inner { height:310px; }
  .coolanas-auth-front,.coolanas-auth-back { padding:20px 16px; }
  .theme-toggle { top:12px; right:12px; }
}
