@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@700;800;900;1000&display=swap');
[hidden]{display:none!important}:root{font-family:Nunito,'Segoe UI',sans-serif;color:#12243d;background:#8fd9ee;font-synthesis:none}*{box-sizing:border-box}body{margin:0;min-height:100vh;background:radial-gradient(circle at 8% 17%,#ffe36f 0 5.5%,transparent 5.7%),radial-gradient(circle at 94% 80%,#ff7fa8 0 7%,transparent 7.2%),linear-gradient(145deg,#6fe0cf,#68aef2 55%,#8b70e3)}button{font:inherit}.traffic-app{min-height:calc(100dvh - 66px);padding:14px clamp(10px,3.5vw,42px) 24px}.topbar{height:66px;display:flex;align-items:center;justify-content:space-between;color:#fff;background:#10243d;border:2px solid #ffffff70;border-radius:19px;padding:10px 18px;box-shadow:0 7px #15335445}.topbar>div:first-child{display:flex;flex-direction:column}.topbar span{color:#66ebcd;font-size:.62rem;letter-spacing:1.8px;font-weight:1000}.topbar strong{font-size:1.08rem}.score{padding:7px 12px;border:1px solid #ffffff55;border-radius:99px;background:#ffffff17;font-size:.78rem;font-weight:1000}
.start-screen{width:min(1120px,100%);min-height:calc(100dvh - 120px);margin:auto;display:grid;grid-template-columns:.9fr 1.1fr;align-items:center;gap:30px}.kicker{color:#184f78;font-size:.67rem;letter-spacing:1.8px;font-weight:1000}.intro-copy h1{max-width:560px;margin:10px 0 14px;font-size:clamp(2.8rem,5.8vw,5.1rem);line-height:.91;letter-spacing:-3px}.intro-copy h1 em{color:#5d3bc8;font-style:normal}.intro-copy p{max-width:520px;color:#344d70;font-weight:800;line-height:1.5}.start-button{margin-top:13px;padding:13px 22px;border:3px solid #fff;border-radius:15px;background:#10243d;color:#fff;font-weight:1000;box-shadow:0 6px #1b355f55;cursor:pointer}.start-button b{margin-left:12px;color:#66ebcd}.city-preview{position:relative;height:350px;overflow:hidden;border:4px solid #fff;border-radius:30px;background:linear-gradient(#a7eaff 0 57%,#85c96b 57%);box-shadow:0 11px #27326830}.sun{position:absolute;right:8%;top:7%;color:#ffd83f;font-size:3.4rem}.cloud{position:absolute;left:11%;top:8%;color:#fff;font-size:4rem}.building{position:absolute;bottom:43%;width:20%;border:4px solid #27375c;border-bottom:0;background:repeating-linear-gradient(90deg,#fff 0 10%,#7fcbef 10% 23%,#fff 23% 34%);border-radius:8px 8px 0 0}.building:before{content:'';position:absolute;left:40%;top:-24px;width:20%;height:24px;background:#ffce55;border:4px solid #27375c;border-bottom:0}.b1{left:4%;height:30%;background-color:#ffbd70}.b2{left:28%;height:40%;background-color:#fd8eb1}.b3{right:5%;height:34%;background-color:#9c8eea}.preview-road{position:absolute;left:-4%;right:-4%;bottom:0;height:43%;background:#303b4a;border-top:8px solid #e8eef3;transform:perspective(450px) rotateX(9deg)}.preview-road:after{content:'';position:absolute;left:0;right:0;top:52%;border-top:6px dashed #ffe059}.preview-road i{position:absolute;z-index:2;left:15%;top:30%;font-size:4rem;filter:drop-shadow(0 6px #10192666);transform:scaleX(-1)}.preview-road b,.preview-road strong,.preview-road em{position:absolute;z-index:2;top:-58px;font-style:normal;font-size:3.1rem}.preview-road b{left:38%}.preview-road strong{left:61%}.preview-road em{right:6%}.rules-strip{grid-column:1/-1;display:grid;grid-template-columns:repeat(5,1fr);gap:8px;margin-top:-28px}.rules-strip span{padding:10px 8px;text-align:center;background:#ffffffc9;border:2px solid #fff;border-radius:13px;color:#233d5c;font-size:.72rem;font-weight:1000;box-shadow:0 4px #35436a22}
.game-screen{width:min(1160px,100%);margin:9px auto 0}.game-top{height:38px;display:grid;grid-template-columns:1fr auto 1fr;align-items:center;color:#fff}.game-top>button{justify-self:start;padding:7px 12px;border:1px solid #ffffff70;border-radius:99px;background:#10243dcc;color:#fff;font-weight:900;cursor:pointer}.game-top>div:nth-child(2){display:flex;align-items:center;gap:8px}.game-top>div:nth-child(2) span{padding:4px 9px;border-radius:99px;background:#ffffff2d;font-size:.72rem;font-weight:900}#hearts{justify-self:end;color:#ff356d;font-size:1.3rem;letter-spacing:2px}.workspace{display:grid;grid-template-columns:1.15fr .85fr;gap:14px}.road-card,.code-card{background:#fffffff2;border:4px solid #fff;border-radius:25px;box-shadow:0 9px #27336b35}.road-card{padding:15px}.code-card{padding:15px;display:flex;flex-direction:column}.panel-heading{display:flex;align-items:center;justify-content:space-between;gap:8px}.panel-heading>div{display:flex;flex-direction:column}.panel-heading>div span{color:#24735e;font-size:.58rem;letter-spacing:1.5px;font-weight:1000}.panel-heading strong{font-size:1.04rem}.panel-heading>span{padding:5px 8px;border-radius:9px;background:#fff0af;color:#755300;font-size:.65rem;font-weight:1000}.mission-text{min-height:35px;margin:7px 0 9px;color:#425673;font-size:.76rem;font-weight:800}.road{position:relative;height:240px;overflow:hidden;border:4px solid #cbdbe8;border-radius:19px;background:linear-gradient(#83d7f0 0 42%,#74bd65 42% 56%,#354453 56%)}.road:before{content:'';position:absolute;left:0;right:0;bottom:18%;border-top:5px dashed #ffe06a}.road:after{content:'';position:absolute;left:0;right:0;top:56%;height:8px;background:#f2f3f5;box-shadow:0 140px #f2f3f5}.lane-line{position:absolute;z-index:1;left:6%;right:8%;bottom:45%;height:3px;background:#ffffff40}.car{--progress:0;position:absolute;z-index:5;left:calc(3% + var(--progress) * 82%);bottom:20%;transition:left .55s ease}.car span{display:block;font-size:3.1rem;filter:drop-shadow(0 6px #111a2566);transform:scaleX(-1)}.car.crash{animation:shake .18s 4}.checkpoints{position:absolute;inset:0}.checkpoint{position:absolute;z-index:3;left:calc((var(--pos) / (var(--total) + 1)) * 82% + 4%);top:46%;transform:translate(-50%,-100%);display:flex;flex-direction:column;align-items:center}.checkpoint:after{content:'';width:5px;height:29px;background:#26394e}.checkpoint span{display:grid;place-items:center;width:48px;height:48px;border:3px solid #fff;border-radius:14px;background:#fff;font-size:1.6rem;box-shadow:0 5px #23334d44}.checkpoint b{position:absolute;right:-5px;top:-6px;display:grid;place-items:center;width:20px;height:20px;border-radius:50%;background:#10243d;color:#fff;font-size:.62rem}.checkpoint.passed span{background:#bdf3d6;outline:4px solid #37c47c}.checkpoint.danger span{background:#ffd2dc;outline:4px solid #ed3d65}.finish{position:absolute;z-index:2;right:1.5%;top:24%;display:flex;flex-direction:column;align-items:center}.finish span{font-size:3.2rem}.finish b{padding:3px 6px;border-radius:5px;background:#10243d;color:#fff;font-size:.52rem}.event-list{display:flex;justify-content:center;gap:6px;flex-wrap:wrap;margin-top:9px}.event-list span{display:flex;align-items:center;gap:5px;padding:5px 8px;border-radius:9px;background:#e9f0f7;color:#2e4762;font-size:.66rem;font-weight:900}.event-list b{display:grid;place-items:center;width:17px;height:17px;border-radius:50%;background:#10243d;color:#fff;font-size:.55rem}
.program{min-height:122px;max-height:160px;overflow:auto;display:flex;align-content:flex-start;flex-wrap:wrap;gap:7px;margin:11px 0;padding:9px;border:2px dashed #7794aa;border-radius:14px;background:#eef4f7}.program p{margin:auto;color:#6b7b8b;font-size:.75rem;font-weight:900}.program-step{min-height:36px;display:grid;grid-template-columns:22px 1fr auto;align-items:center;gap:6px;padding:4px 7px;border:2px solid #fff;border-radius:10px;background:#fff;color:#17304a;box-shadow:0 3px #becbd3;font-size:.67rem;font-weight:1000;cursor:pointer}.program-step>span{display:grid;place-items:center;width:20px;height:20px;border-radius:50%;background:#193e59;color:#fff;font-size:.58rem}.program-step em{padding:3px 5px;border-radius:6px;background:#d9f5e9;color:#116244;font-style:normal}.program-step.active{color:#fff;background:#2e75d3;box-shadow:0 3px #164a91}.program-step.active em{color:#12375a;background:#fff}.program-step.error{background:#ffd3dc;border-color:#ef4168;box-shadow:0 3px #bf274b}.palette{display:grid;grid-template-columns:repeat(2,1fr);gap:7px}.palette button{min-height:52px;display:grid;grid-template-columns:31px 1fr auto;align-items:center;gap:5px;padding:5px 7px;border:2px solid #d6e0e7;border-radius:12px;color:#17304a;background:#fff;box-shadow:0 4px #bdcbd3;font-size:.66rem;font-weight:1000;cursor:pointer;text-align:left}.palette button>span{font-size:1.2rem;text-align:center}.palette button em{padding:4px 5px;border-radius:6px;background:#d9f5e9;color:#116244;font-style:normal;font-size:.58rem}.edit-row{display:flex;justify-content:space-between;margin-top:8px}.edit-row button{border:0;background:transparent;color:#516b80;font-size:.7rem;font-weight:1000;cursor:pointer}.run{margin-top:7px;padding:11px;border:0;border-radius:12px;background:linear-gradient(100deg,#ff765c,#ef376c);color:#fff;font-weight:1000;box-shadow:0 5px #b92750;cursor:pointer}.feedback{min-height:43px;margin-top:9px;padding:8px;border-radius:11px;background:#fff0ad;text-align:center;font-size:.7rem;font-weight:900}.feedback.good{color:#11653f;background:#c7f1d9}.feedback.bad{color:#8b1838;background:#ffd2dd}button:disabled{opacity:.48;cursor:default}.result-screen{width:min(650px,100%);margin:55px auto;padding:38px 22px;text-align:center;background:#fffffff2;border:4px solid #fff;border-radius:30px;box-shadow:0 10px #26366b38}.trophy{font-size:4.5rem}.result-screen>span{color:#24735e;font-size:.67rem;letter-spacing:2px;font-weight:1000}.result-screen h1{margin:7px 0;font-size:3rem}.result-screen p{color:#52617a;font-weight:800}.result-screen button{margin-top:14px;padding:11px 17px;border:0;border-radius:12px;background:#10243d;color:#fff;font-weight:1000;cursor:pointer}@keyframes shake{25%{transform:translateX(-7px)}75%{transform:translateX(7px)}}
@media(max-width:760px){.traffic-app{padding:8px}.topbar{height:54px;padding:7px 11px}.topbar strong{font-size:.9rem}.start-screen{display:block;min-height:0;margin-top:14px}.intro-copy{text-align:center}.kicker{font-size:.57rem}.intro-copy h1{margin:7px auto 9px;font-size:2.45rem;letter-spacing:-1.6px}.intro-copy p{margin:0 auto;font-size:.77rem}.start-button{margin-top:10px;padding:9px 17px}.city-preview{height:190px;margin-top:13px;border-radius:21px}.cloud{font-size:2.8rem}.sun{font-size:2.6rem}.preview-road i{font-size:3rem}.preview-road b,.preview-road strong,.preview-road em{top:-42px;font-size:2rem}.rules-strip{grid-template-columns:repeat(5,1fr);gap:4px;margin-top:7px}.rules-strip span{padding:6px 2px;font-size:.5rem}.game-screen{margin-top:4px}.game-top{height:33px}.game-top>button{font-size:.65rem;padding:5px 7px}.game-top>div:nth-child(2) strong{font-size:.75rem}.workspace{grid-template-columns:1fr;gap:6px}.road-card,.code-card{padding:7px;border-width:3px;border-radius:17px}.mission-text{min-height:0;margin:4px 0 6px;font-size:.62rem}.road{height:132px;border-radius:13px}.road:after{box-shadow:0 72px #f2f3f5}.car span{font-size:2rem}.checkpoint span{width:34px;height:34px;border-radius:9px;font-size:1.05rem}.checkpoint:after{height:16px}.finish span{font-size:2rem}.event-list{margin-top:5px}.event-list span{padding:3px 5px;font-size:.52rem}.program{min-height:45px;max-height:75px;margin:5px 0;padding:4px;gap:4px}.program-step{min-height:27px;grid-template-columns:17px 1fr auto;padding:2px 4px;font-size:.52rem}.program-step>span{width:16px;height:16px}.palette{grid-template-columns:repeat(3,1fr);gap:4px}.palette button{min-height:40px;display:flex;flex-direction:column;justify-content:center;gap:0;padding:3px;text-align:center;font-size:.49rem}.palette button>span{font-size:.85rem;line-height:1}.palette button em{font-size:.45rem;padding:2px 3px}.edit-row{margin-top:3px}.run{margin-top:3px;padding:7px}.feedback{min-height:31px;margin-top:5px;padding:5px;font-size:.58rem}.panel-heading strong{font-size:.8rem}.panel-heading>span{font-size:.5rem;padding:3px 5px}.panel-heading>div span{font-size:.48rem}.result-screen{margin-top:25px}}
@media(max-width:380px){.city-preview{height:165px}.rules-strip span{font-size:.45rem}.road{height:115px}.event-list{display:none}.program{max-height:58px}.feedback{font-size:.53rem}}
/* v86 viewport polish */
#start-screen.start-screen{min-height:calc(100dvh - 145px)}
body:has(#start-screen:not([hidden])){overflow:hidden}

/* v87: Kodlama Oyunları katalog girişi ve zorluk seçimi */
#start-screen.start-screen{height:calc(100dvh - 130px);min-height:0;grid-template-columns:1.08fr .92fr;grid-template-rows:auto minmax(0,1fr);align-items:center;gap:13px 20px;padding:12px 24px 4px}
.catalog-heading{grid-column:1/-1;display:flex;align-items:end;justify-content:space-between;gap:24px}
.catalog-heading>div{display:flex;flex-direction:column}
.catalog-heading h1{margin:3px 0 0;font-size:clamp(2.4rem,4.5vw,4rem);line-height:.95;letter-spacing:-2.5px}
.catalog-heading h1 em{color:#5d3bc8;font-style:normal}
.catalog-heading p{max-width:470px;margin:0;color:#344d70;text-align:right;font-size:.84rem;font-weight:900;line-height:1.4}
.featured-game{position:relative;align-self:stretch;min-height:0;padding:9px;border:4px solid #fff;border-radius:27px;background:#ffffffb8;box-shadow:0 10px #27326830}
.featured-game .city-preview{height:calc(100% - 63px);min-height:260px;border:0;border-radius:19px;box-shadow:none}
.game-badge{position:absolute;z-index:8;left:-13px;top:-13px;display:flex;align-items:center;gap:7px;padding:8px 11px;border:3px solid #fff;border-radius:17px;background:#10243d;color:#fff;box-shadow:0 5px #10243d55}
.game-badge span{font-size:2.7rem;line-height:1}.game-badge b{display:grid;place-items:center;width:31px;height:31px;border-radius:50%;background:#ffde4b;color:#10243d;font-size:.76rem}
.game-summary{height:63px;display:flex;flex-direction:column;justify-content:center;padding:6px 10px 0}
.game-summary strong{font-size:1.05rem}.game-summary span{color:#526880;font-size:.66rem;font-weight:900}
.level-panel{align-self:stretch;display:flex;flex-direction:column;justify-content:center;padding:18px;background:#ffffffe8;border:4px solid #fff;border-radius:27px;box-shadow:0 10px #27326830}
.level-title{display:flex;flex-direction:column;margin-bottom:10px}.level-title span{color:#24735e;font-size:.59rem;letter-spacing:1.6px;font-weight:1000}.level-title strong{font-size:1.3rem}
.level-grid{display:grid;gap:9px}.level{min-height:92px;display:grid;grid-template-columns:62px 1fr 24px;align-items:center;gap:9px;padding:10px 13px;border:3px solid #fff;border-radius:18px;color:#152c47;text-align:left;box-shadow:0 5px #2435552e;cursor:pointer;transition:.17s transform,.17s box-shadow}.level:hover{transform:translateY(-4px);box-shadow:0 9px #2435552e}.level>span{display:grid;place-items:center;width:58px;height:58px;border-radius:17px;background:#ffffffb5;font-size:2.65rem;filter:drop-shadow(0 4px #26334a30)}.level>div{display:flex;flex-direction:column}.level strong{font-size:1.15rem}.level small{font-size:.68rem;font-weight:900}.level>b{display:grid;place-items:center;width:23px;height:23px;border-radius:50%;background:#10243d;color:#fff}.level.easy{background:#bff2d8}.level.medium{background:#ffe28e}.level.hard{background:#ffb5c8}.skills{display:flex;justify-content:center;gap:5px;flex-wrap:wrap;margin-top:12px}.skills span{padding:5px 7px;border-radius:99px;background:#e9eff5;color:#53677c;font-size:.58rem;font-weight:1000}
@media(max-width:760px){
  body:has(#start-screen:not([hidden])){overflow:auto}
  #start-screen.start-screen{display:grid;grid-template-columns:1fr;grid-template-rows:auto 170px auto;height:auto;min-height:0;gap:7px;padding:8px 4px 2px;margin-top:0}
  .catalog-heading{grid-column:1;align-items:center;gap:8px}.catalog-heading h1{font-size:1.65rem;letter-spacing:-1px}.catalog-heading p{max-width:48%;font-size:.56rem;line-height:1.25}
  .featured-game{height:170px;padding:5px;border-radius:17px}.featured-game .city-preview{height:125px;min-height:125px;margin:0;border-radius:12px}.game-badge{left:-4px;top:-5px;padding:4px 6px;border-radius:11px}.game-badge span{font-size:1.75rem}.game-badge b{width:23px;height:23px;font-size:.58rem}.game-summary{height:36px;padding:3px 7px 0}.game-summary strong{font-size:.68rem}.game-summary span{font-size:.45rem}
  .level-panel{padding:7px;border-width:3px;border-radius:16px}.level-title{margin-bottom:5px;align-items:center}.level-title span{font-size:.48rem}.level-title strong{font-size:.82rem}.level-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:5px}.level{min-height:89px;display:flex;flex-direction:column;justify-content:center;gap:1px;padding:5px 3px;text-align:center;border-radius:12px}.level>span{width:44px;height:44px;border-radius:12px;font-size:2rem}.level strong{font-size:.76rem}.level small{font-size:.48rem;line-height:1.15}.level>b{display:none}.skills{display:none}
}
@media(max-width:380px){#start-screen.start-screen{grid-template-rows:auto 150px auto}.featured-game{height:150px}.featured-game .city-preview{height:108px;min-height:108px}.level{min-height:79px}.level>span{width:39px;height:39px;font-size:1.7rem}}

/* v89: eksik algoritmada çalıştır düğmesi artık açıklayıcı geri bildirim verir */
.run.incomplete{background:linear-gradient(100deg,#f89a5b,#ef5b83);box-shadow:0 5px #b94060}.feedback.hint{color:#5a3c00;background:#ffe38b}.program.nudge{animation:code-nudge .18s 3}@keyframes code-nudge{25%{transform:translateX(-5px)}75%{transform:translateX(5px)}}
