.tivan-wrapper{max-width:980px;margin:1rem auto;font-family:system-ui,-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Ubuntu,'Helvetica Neue',Arial;position:relative}
.tivan-header{display:flex;justify-content:space-between;align-items:center;background:#0b0d12;border:3px solid #2a2f45;color:#fff;padding:.5rem 1rem;border-radius:12px;margin-bottom:.5rem;position:relative;z-index:1}
.tivan-equation{font-weight:900;font-size:1.6rem;letter-spacing:.6px;text-shadow:0 2px 0 #2a2f45,0 0 8px rgba(255,213,77,.2)}
.tivan-scoreboard{font-weight:800;color:#fed715;text-shadow:0 1px 0 #2a2f45}
.tivan-canvas{display:block;width:100%;height:auto;image-rendering:pixelated;border-radius:14px;border:4px solid #2a2f45;box-shadow:0 10px 26px rgba(0,0,0,.28),0 0 0 6px #0b0d12 inset;position:relative;z-index:1}
.tivan-overlay{position:absolute;inset:0;display:flex;justify-content:center;align-items:center;z-index:999;pointer-events:auto}
.tivan-hidden{display:none !important;pointer-events:none !important}
.tivan-overlay .tivan-panel{background:#0b0d12;color:#fff;border:4px solid #2a2f45;border-radius:16px;padding:1rem 1.2rem;max-width:560px;width:100%;box-shadow:0 14px 36px rgba(0,0,0,.4)}
.tivan-title{margin:.2rem 0 1rem;font-size:1.7rem}
.tivan-panel label{display:flex;gap:.5rem;align-items:center;margin:.5rem 0}
.tivan-panel label span{min-width:170px}
.tivan-panel input,.tivan-panel select{flex:1;background:#151823;color:#fff;border:2px solid #2a2f45;border-radius:12px;padding:.5rem .7rem}
.tivan-btn{display:inline-block;background:#fed715;color:#0b0d12;border:0;border-radius:12px;padding:.7rem 1.1rem;font-weight:900;cursor:pointer;margin-top:.7rem;box-shadow:0 3px 0 #c9a60b}
.tivan-btn:active{transform:translateY(1px)}
.tivan-msg{margin-top:.5rem;color:#fe0879;font-weight:700}
.tivan-dpad{display:none;gap:.4rem;justify-content:center;margin:.8rem 0}
.dpad{background:#0037b3;color:#fff;border:3px solid #000;border-radius:10px;padding:.6rem .9rem;font-weight:900;box-shadow:3px 3px 0 #000}
.dpad.up,.dpad.down{display:block;margin:.25rem auto}
.tivan-countdown{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);font-size:4rem;font-weight:900;color:#fed715;text-shadow:0 6px 0 #2a2f45}
@media (max-width:768px){.tivan-dpad{display:flex;flex-direction:column;align-items:center}.tivan-header{flex-direction:column;gap:.35rem}.tivan-equation{font-size:1.3rem}}
.tivan-top15{max-height:240px;overflow:auto;background:#0b0d12;border:3px solid #2a2f45;border-radius:12px;padding:.6rem}
.tivan-top15 li{padding:.25rem 0}
.tivan-leaderboard ol{padding-left:1.2rem}
