.afex-flow-root{
  font-family: system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  color:#fff;
  max-width:1100px;
  margin:0 auto;
  padding:10px;
}

/* Sections */
.afex-flow-section{
  margin:16px 0;
  padding:14px 16px;
  background:rgba(8,12,20,0.55);
  border-radius:14px;
  box-shadow:0 0 18px rgba(0,255,200,0.12);
}

.afex-flow-section h2,
.afex-flow-section h3{
  margin:0 0 8px 0;
  font-size:22px;
}

.afex-flow-section p{
  margin:4px 0 8px 0;
  font-size:15px;
  opacity:0.95;
}

/* Kidz row */
.afex-flow-kidz-row{
  display:flex;
  flex-wrap:wrap;
  gap:18px;
  justify-content:center;
  align-items:flex-end;
}
.afex-flow-kidz{
  text-align:center;
  font-size:13px;
}
.afex-flow-kidz-head{
  width:28px;
  height:28px;
  border-radius:50%;
  margin:0 auto 2px auto;
}
.afex-flow-kidz-body{
  width:22px;
  height:55px;
  border-radius:10px;
  margin:0 auto;
  transform-origin:bottom center;
}
.afex-flow-kidz-label{
  margin-top:2px;
}

/* Screen common */
.afex-flow-screen-wrap{
  margin-top:8px;
  padding:10px;
  border-radius:14px;
  background:radial-gradient(circle at 20% 0%, rgba(80,255,210,0.25), rgba(0,0,0,0.9));
  box-shadow:0 0 25px rgba(0,255,200,0.22) inset;
  position:relative;
}
.afex-flow-screen{
  width:100%;
  max-width:680px;
  height:220px;
  margin:0 auto;
  border-radius:12px;
  box-shadow:0 0 18px rgba(0,0,0,0.9);
  position:relative;
  overflow:hidden;
}
.afex-flow-screen::before{
  content:'';
  position:absolute;
  left:0; top:0;
  right:0; bottom:0;
  background:repeating-linear-gradient(
    to bottom,
    rgba(0,0,0,0),
    rgba(0,0,0,0) 4px,
    rgba(0,255,80,0.12) 5px
  );
  pointer-events:none;
}
.afex-flow-screen-train{
  background:radial-gradient(circle at 50% 10%, rgba(0,200,255,0.18), rgba(0,0,0,1));
}
.afex-flow-screen-game{
  background:radial-gradient(circle at 50% 10%, rgba(0,255,140,0.22), rgba(0,0,0,1));
}
.afex-flow-canvas{
  width:100%;
  height:100%;
  display:block;
}
.afex-flow-hud{
  position:absolute;
  right:10px;
  top:6px;
  font-size:11px;
  color:rgba(180,255,220,0.9);
  text-align:right;
}
.afex-flow-hud div{ line-height:1.2; }

/* Controls layout */
.afex-flow-controls{
  margin-top:12px;
  display:flex;
  flex-wrap:wrap;
  gap:18px;
  align-items:flex-start;
}
.afex-flow-control-block{
  min-width:260px;
  flex:1 1 260px;
  padding:10px;
  border-radius:12px;
}
.afex-flow-control-osc{
  background:linear-gradient(135deg, rgba(0,180,255,0.18), rgba(3,12,25,0.9));
  box-shadow:0 0 16px rgba(0,200,255,0.25);
}
.afex-flow-control-lfo{
  background:linear-gradient(135deg, rgba(0,255,120,0.18), rgba(4,16,20,0.9));
  box-shadow:0 0 16px rgba(0,255,140,0.25);
}

.afex-flow-label{
  font-size:14px;
  margin-bottom:4px;
}

.afex-flow-slider{
  width:260px;
  max-width:100%;
  margin:2px 0 6px 0;
}

.afex-flow-wave-buttons,
.afex-flow-mod-buttons,
.afex-flow-osc-wave-buttons{
  display:flex;
  flex-wrap:wrap;
  gap:6px;
  margin-top:2px;
}

.afex-flow-btn-pill{
  padding:5px 10px;
  border-radius:999px;
  border:1px solid rgba(150,220,255,0.7);
  background:rgba(5,12,20,0.8);
  color:#e5ffff;
  font-size:13px;
  cursor:pointer;
}
.afex-flow-btn-pill.selected{
  background:linear-gradient(135deg,#00ffc4,#00a6ff);
  color:#000;
  border:none;
}

.afex-flow-toggle{
  display:inline-block;
  padding:6px 14px;
  border-radius:999px;
  font-size:14px;
  border:1px solid rgba(160,220,255,0.8);
  background:rgba(10,16,24,0.95);
  cursor:pointer;
}
.afex-flow-toggle.on{
  background:linear-gradient(135deg,#00ffc4,#00a6ff);
  color:#000;
  border:none;
}
.afex-flow-toggle.off{
  background:rgba(20,20,30,0.9);
  color:rgba(230,240,255,0.9);
}

/* Game panel */
.afex-flow-game-title{
  font-size:20px;
  color:#8bff9e;
  text-shadow:0 0 8px rgba(0,255,140,0.6);
  margin-bottom:4px;
}
.afex-flow-game-top{
  margin-top:6px;
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  align-items:center;
  justify-content:space-between;
}
.afex-flow-game-status{
  font-size:15px;
  font-weight:600;
  color:rgba(200,255,230,0.98);
}
.afex-flow-game-warning{
  font-size:13px;
  color:#ffb3b3;
  margin-top:4px;
}
.afex-flow-game-buttons{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
}
.afex-flow-btn{
  padding:7px 14px;
  border-radius:999px;
  border:none;
  cursor:pointer;
  font-size:14px;
}
.afex-flow-btn.primary{
  background:rgba(0,200,255,0.95);
  color:#000;
}
.afex-flow-btn.secondary{
  background:rgba(0,0,0,0.7);
  color:#fff;
  border:1px solid rgba(0,255,220,0.6);
}

.afex-flow-help{
  font-size:13px;
  opacity:0.9;
  margin-top:6px;
}

/* Game controls */
.afex-flow-game-controls{
  margin-top:10px;
  padding:10px;
  border-radius:12px;
  background:rgba(4,18,10,0.9);
  box-shadow:0 0 14px rgba(0,255,120,0.2);
}
.afex-flow-game-controls-block{
  margin-bottom:8px;
}

/* Mobile tweaks */
@media (max-width:700px){
  .afex-flow-controls{
    flex-direction:column;
  }
  .afex-flow-screen{
    height:190px;
  }
  .afex-flow-kidz-row{
    gap:12px;
  }
}
